Fixed an infinite loop on beatmaps starting at time 0. (blame: 18e57fd
)
There's probably a better fix, though... Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
e712d57a2c
commit
74f7ac18b9
|
@ -271,7 +271,7 @@ public class Game extends BasicGameState {
|
||||||
float dimLevel = Options.getBackgroundDim();
|
float dimLevel = Options.getBackgroundDim();
|
||||||
if (trackPosition < firstObjectTime) {
|
if (trackPosition < firstObjectTime) {
|
||||||
if (timeDiff < approachTime)
|
if (timeDiff < approachTime)
|
||||||
dimLevel += (1f - dimLevel) * ((float) timeDiff / Math.min(approachTime, firstObjectTime));
|
dimLevel += (1f - dimLevel) * ((float) timeDiff / approachTime);
|
||||||
else
|
else
|
||||||
dimLevel = 1f;
|
dimLevel = 1f;
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ public class Game extends BasicGameState {
|
||||||
timeDiff = firstObjectTime - trackPosition;
|
timeDiff = firstObjectTime - trackPosition;
|
||||||
if (timeDiff < approachTime) {
|
if (timeDiff < approachTime) {
|
||||||
float[] xy = gameObjects[0].getPointAt(trackPosition);
|
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) {
|
} else if (objectIndex < beatmap.objects.length) {
|
||||||
// normal object
|
// normal object
|
||||||
|
|
Loading…
Reference in New Issue
Block a user