1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-05 23:14:47 +08:00

Fix slider ball rotation not being updated when rewinding to a slider

This commit is contained in:
Dean Herbert
2025-02-07 18:57:26 +09:00
Unverified
parent a068d88b84
commit fab5cfd275
@@ -66,8 +66,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
Slider slider = drawableSlider.HitObject;
Position = slider.CurvePositionAt(completionProgress);
//0.1 / slider.Path.Distance is the additional progress needed to ensure the diff length is 0.1
var diff = slider.CurvePositionAt(completionProgress) - slider.CurvePositionAt(Math.Min(1, completionProgress + 0.1 / slider.Path.Distance));
// 0.1 / slider.Path.Distance is the additional progress needed to ensure the diff length is 0.1
double checkDistance = 0.1 / slider.Path.Distance;
var diff = slider.CurvePositionAt(Math.Min(1 - checkDistance, completionProgress)) - slider.CurvePositionAt(Math.Min(1, completionProgress + checkDistance));
// Ensure the value is substantially high enough to allow for Atan2 to get a valid angle.
// Needed for when near completion, or in case of a very short slider.