1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 12:35:34 +08:00

Prevent speedRequired from being NaN

This commit is contained in:
HoLLy 2019-06-15 19:14:24 +02:00
parent d735d4cd7f
commit f97cab5815

View File

@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Catch.Replays
double timeAvailable = h.StartTime - lastTime;
//So we can either make it there without a dash or not.
double speedRequired = positionChange / timeAvailable;
double speedRequired = positionChange == 0 ? 0 : positionChange / timeAvailable;
bool dashRequired = speedRequired > movement_speed && h.StartTime != 0;
bool impossibleJump = speedRequired > movement_speed * 2 && h.StartTime != 0;