add 5s delay after last hitobj

This commit is contained in:
yugecin 2016-11-12 18:44:04 +01:00
parent a066d3fe48
commit 7276705533

View File

@ -766,7 +766,13 @@ public class Game extends BasicGameState {
*/ */
private void updateGame(int mouseX, int mouseY, int delta, int trackPosition, int keys) { private void updateGame(int mouseX, int mouseY, int delta, int trackPosition, int keys) {
// map complete! // map complete!
if (objectIndex >= gameObjects.length || (MusicController.trackEnded() && objectIndex > 0)) { boolean complete = objectIndex >= gameObjects.length;
if (GameMod.AUTO.isActive() && complete) {
if (gameObjects.length > 0) {
complete = trackPosition >= gameObjects[gameObjects.length - 1].getEndTime() + 5000;
}
}
if (complete || (MusicController.trackEnded() && objectIndex > 0)) {
// track ended before last object was processed: force a hit result // track ended before last object was processed: force a hit result
if (MusicController.trackEnded() && objectIndex < gameObjects.length) if (MusicController.trackEnded() && objectIndex < gameObjects.length)
gameObjects[objectIndex].update(true, delta, mouseX, mouseY, false, trackPosition); gameObjects[objectIndex].update(true, delta, mouseX, mouseY, false, trackPosition);
@ -803,6 +809,10 @@ public class Game extends BasicGameState {
return; return;
} }
if (objectIndex >= gameObjects.length) {
return;
}
GameObject g = gameObjects[objectIndex]; GameObject g = gameObjects[objectIndex];
if ((g.isCircle() || g.isSlider()) && g.getTime() <= trackPosition) { if ((g.isCircle() || g.isSlider()) && g.getTime() <= trackPosition) {
Cursor.lastObjColor = g.getColor(); Cursor.lastObjColor = g.getColor();