fix first object movement

This commit is contained in:
yugecin
2016-10-01 11:34:32 +02:00
parent 98c00679ad
commit eee65a589e
3 changed files with 20 additions and 5 deletions

View File

@@ -348,11 +348,15 @@ public class Game extends BasicGameState {
autoMousePressed = false;
if (GameMod.AUTO.isActive() || GameMod.AUTOPILOT.isActive()) {
Vec2f autoPoint;
if (objectIndex == 0) {
autoPoint = gameObjects[0].getPointAt(trackPosition);
} else if (objectIndex < beatmap.objects.length) {
if (objectIndex < beatmap.objects.length) {
GameObject p;
if (objectIndex > 0) {
p = gameObjects[objectIndex - 1];
} else {
p = null;
}
Dancer d = Dancer.instance;
d.update(trackPosition, gameObjects[objectIndex - 1], gameObjects[objectIndex]);
d.update(trackPosition, p, gameObjects[objectIndex]);
autoPoint = new Vec2f(d.x, d.y);
if (trackPosition < gameObjects[objectIndex].getTime()) {
autoMousePressed = true;