From 74f7ac18b9d9f8d10db11b4fa0c7b061e5294d8b Mon Sep 17 00:00:00 2001 From: Jeffrey Han Date: Mon, 8 Jun 2015 18:13:49 -0400 Subject: [PATCH] Fixed an infinite loop on beatmaps starting at time 0. (blame: 18e57fd) There's probably a better fix, though... Signed-off-by: Jeffrey Han --- src/itdelatrisu/opsu/states/Game.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index 5fa7ef8c..8b0ef535 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -271,7 +271,7 @@ public class Game extends BasicGameState { float dimLevel = Options.getBackgroundDim(); if (trackPosition < firstObjectTime) { if (timeDiff < approachTime) - dimLevel += (1f - dimLevel) * ((float) timeDiff / Math.min(approachTime, firstObjectTime)); + dimLevel += (1f - dimLevel) * ((float) timeDiff / approachTime); else dimLevel = 1f; } @@ -301,7 +301,7 @@ public class Game extends BasicGameState { timeDiff = firstObjectTime - trackPosition; if (timeDiff < approachTime) { float[] xy = gameObjects[0].getPointAt(trackPosition); - autoXY = getPointAt(autoMouseX, autoMouseY, xy[0], xy[1], 1f - ((float) timeDiff / Math.min(approachTime, firstObjectTime))); + autoXY = getPointAt(autoMouseX, autoMouseY, xy[0], xy[1], 1f - ((float) timeDiff / approachTime)); } } else if (objectIndex < beatmap.objects.length) { // normal object