It doesn't crash anymore

This commit is contained in:
Awlex
2016-11-19 15:41:53 +01:00
parent 6f5f17da74
commit eb561d8369
5 changed files with 81 additions and 32 deletions

View File

@@ -266,13 +266,12 @@ public class Dancer {
double[] spinnerStartPoint = spinner.getPoint();
c.start = new Vec2f((float) spinnerStartPoint[0], (float) spinnerStartPoint[1]);
}
GameObject g = gameObjects[objectIndex + 2];
if (!g.isSpinner() && !g.isSlider())
if (polyMoverFactory.isInitialized()) {
polyMoverFactory.update(g);
} else {
polyMoverFactory.init(gameObjects, objectIndex);
}
if (polyMoverFactory.isInitialized() && polyMoverFactory.getLatestIndex() < objectIndex + polyMoverFactory.getPrefferedBufferSize() - 1) {
polyMoverFactory.update(gameObjects[polyMoverFactory.getPrefferedBufferSize() - 1]);
} else {
polyMoverFactory.init(gameObjects, objectIndex);
}
}
if (time < c.getTime()) {