prevent arrayindexoutofbounds

This commit is contained in:
yugecin 2016-09-30 19:56:47 +02:00
parent b12ed6fa0e
commit 8c7531e550

View File

@ -789,6 +789,12 @@ public class Game extends BasicGameState {
return;
}
GameObject g = gameObjects[objectIndex];
if (g.isCircle() || g.isSlider() && g.getTime() <= trackPosition) {
Cursor.lastObjColor = g.getColor();
Cursor.lastMirroredObjColor = g.getMirroredColor();
}
// timing points
if (timingPointIndex < beatmap.timingPoints.size()) {
TimingPoint timingPoint = beatmap.timingPoints.get(timingPointIndex);
@ -881,11 +887,6 @@ public class Game extends BasicGameState {
break;
}
}
GameObject g = gameObjects[objectIndex];
if (g.isCircle() || g.isSlider() && g.getTime() <= trackPosition) {
Cursor.lastObjColor = g.getColor();
Cursor.lastMirroredObjColor = g.getMirroredColor();
}
}
@Override