From f97cab58156cf8abda751dd8e8689f6e7da6028f Mon Sep 17 00:00:00 2001 From: HoLLy Date: Sat, 15 Jun 2019 19:14:24 +0200 Subject: [PATCH] Prevent speedRequired from being NaN --- osu.Game.Rulesets.Catch/Replays/CatchAutoGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Catch/Replays/CatchAutoGenerator.cs b/osu.Game.Rulesets.Catch/Replays/CatchAutoGenerator.cs index 8f10f51461..c85518717a 100644 --- a/osu.Game.Rulesets.Catch/Replays/CatchAutoGenerator.cs +++ b/osu.Game.Rulesets.Catch/Replays/CatchAutoGenerator.cs @@ -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;