1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 02:09:52 +08:00

Merge pull request #29681 from peppy/fix-catch-snap-value

Fix incorrect osu!catch snap display when last object is a juice stream
This commit is contained in:
Dan Balasescu
2024-09-02 18:33:32 +09:00
committed by GitHub
Unverified
@@ -18,7 +18,9 @@ namespace osu.Game.Rulesets.Catch.Edit
// The implementation below is probably correct but should be checked if/when exposed via controls.
float expectedDistance = DurationToDistance(before, after.StartTime - before.GetEndTime());
float actualDistance = Math.Abs(((CatchHitObject)before).EffectiveX - ((CatchHitObject)after).EffectiveX);
float previousEndX = (before as JuiceStream)?.EndX ?? ((CatchHitObject)before).EffectiveX;
float actualDistance = Math.Abs(previousEndX - ((CatchHitObject)after).EffectiveX);
return actualDistance / expectedDistance;
}