mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 19:53:23 +08:00
Ensure travel distance is calculated for all sliders
This commit is contained in:
parent
274444ed67
commit
b20ff22af0
@ -74,6 +74,13 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
|
|||||||
|
|
||||||
private void setDistances(double clockRate)
|
private void setDistances(double clockRate)
|
||||||
{
|
{
|
||||||
|
if (BaseObject is Slider currentSlider)
|
||||||
|
{
|
||||||
|
computeSliderCursorPosition(currentSlider);
|
||||||
|
TravelDistance = currentSlider.LazyTravelDistance;
|
||||||
|
TravelTime = Math.Max(currentSlider.LazyTravelTime / clockRate, min_delta_time);
|
||||||
|
}
|
||||||
|
|
||||||
// We don't need to calculate either angle or distance when one of the last->curr objects is a spinner
|
// We don't need to calculate either angle or distance when one of the last->curr objects is a spinner
|
||||||
if (BaseObject is Spinner || lastObject is Spinner)
|
if (BaseObject is Spinner || lastObject is Spinner)
|
||||||
return;
|
return;
|
||||||
@ -87,13 +94,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
|
|||||||
scalingFactor *= 1 + smallCircleBonus;
|
scalingFactor *= 1 + smallCircleBonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BaseObject is Slider currentSlider)
|
|
||||||
{
|
|
||||||
computeSliderCursorPosition(currentSlider);
|
|
||||||
TravelDistance = currentSlider.LazyTravelDistance;
|
|
||||||
TravelTime = Math.Max(currentSlider.LazyTravelTime / clockRate, min_delta_time);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector2 lastCursorPosition = getEndCursorPosition(lastObject);
|
Vector2 lastCursorPosition = getEndCursorPosition(lastObject);
|
||||||
|
|
||||||
JumpDistance = (BaseObject.StackedPosition * scalingFactor - lastCursorPosition * scalingFactor).Length;
|
JumpDistance = (BaseObject.StackedPosition * scalingFactor - lastCursorPosition * scalingFactor).Length;
|
||||||
|
Loading…
Reference in New Issue
Block a user