1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 17:32:54 +08:00

Merge pull request #3608 from smoogipoo/fix-diffcalc-slider-distance

Fix slider travel distances sometimes not being considered
This commit is contained in:
Dean Herbert 2018-10-21 20:46:17 +09:00 committed by GitHub
commit a13f3068c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,15 +75,13 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
{ {
computeSliderCursorPosition(lastSlider); computeSliderCursorPosition(lastSlider);
lastCursorPosition = lastSlider.LazyEndPosition ?? lastCursorPosition; lastCursorPosition = lastSlider.LazyEndPosition ?? lastCursorPosition;
TravelDistance = lastSlider.LazyTravelDistance * scalingFactor;
} }
// Don't need to jump to reach spinners // Don't need to jump to reach spinners
if (!(BaseObject is Spinner)) if (!(BaseObject is Spinner))
JumpDistance = (BaseObject.StackedPosition * scalingFactor - lastCursorPosition * scalingFactor).Length; JumpDistance = (BaseObject.StackedPosition * scalingFactor - lastCursorPosition * scalingFactor).Length;
// Todo: BUG!!! Last slider's travel distance is considered ONLY IF we ourselves are also a slider!
if (BaseObject is Slider)
TravelDistance = (lastSlider?.LazyTravelDistance ?? 0) * scalingFactor;
} }
private void setTimingValues() private void setTimingValues()