1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +08:00

Fix the ctb auto mod speedup in some occasions

This commit is contained in:
Corentin PALLARD 2021-01-29 02:53:26 +01:00
parent 1d76cfe585
commit da4c207a73

View File

@ -45,6 +45,9 @@ namespace osu.Game.Rulesets.Catch.Replays
float positionChange = Math.Abs(lastPosition - h.EffectiveX);
double timeAvailable = h.StartTime - lastTime;
if (timeAvailable < 0)
return;
// So we can either make it there without a dash or not.
// If positionChange is 0, we don't need to move, so speedRequired should also be 0 (could be NaN if timeAvailable is 0 too)
// The case where positionChange > 0 and timeAvailable == 0 results in PositiveInfinity which provides expected beheaviour.