mirror of
https://github.com/ppy/osu.git
synced 2026-06-05 17:04:35 +08:00
Fix slider ball rotation not being updated when rewinding to a slider
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user