mirror of
https://github.com/ppy/osu.git
synced 2025-01-23 06:52:58 +08:00
Fix incorrect osu!catch snap display when last object is a juice stream
Addresses https://github.com/ppy/osu/discussions/29678.
This commit is contained in:
parent
fb66e9bfa2
commit
171ac0f510
@ -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.
|
// The implementation below is probably correct but should be checked if/when exposed via controls.
|
||||||
|
|
||||||
float expectedDistance = DurationToDistance(before, after.StartTime - before.GetEndTime());
|
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;
|
return actualDistance / expectedDistance;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user