mirror of
https://github.com/osukey/osukey.git
synced 2025-05-15 02:27:33 +09:00
Prevent speedRequired from being NaN
This commit is contained in:
parent
d735d4cd7f
commit
f97cab5815
@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Catch.Replays
|
|||||||
double timeAvailable = h.StartTime - lastTime;
|
double timeAvailable = h.StartTime - lastTime;
|
||||||
|
|
||||||
//So we can either make it there without a dash or not.
|
//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 dashRequired = speedRequired > movement_speed && h.StartTime != 0;
|
||||||
bool impossibleJump = speedRequired > movement_speed * 2 && h.StartTime != 0;
|
bool impossibleJump = speedRequired > movement_speed * 2 && h.StartTime != 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user