From 6e4d34b3c573a02d7c127249c78240be159eeef0 Mon Sep 17 00:00:00 2001 From: yugecin Date: Sun, 20 Nov 2016 23:40:30 +0100 Subject: [PATCH] hotfix broken slidermovers --- src/yugecin/opsudance/Dancer.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/yugecin/opsudance/Dancer.java b/src/yugecin/opsudance/Dancer.java index 59dbe028..78238b9b 100644 --- a/src/yugecin/opsudance/Dancer.java +++ b/src/yugecin/opsudance/Dancer.java @@ -25,6 +25,7 @@ import awlex.ospu.polymover.factory.PolyMoverFactory; import awlex.ospu.spinners.SpiralSpinner; import itdelatrisu.opsu.Options; import itdelatrisu.opsu.Utils; +import itdelatrisu.opsu.audio.MusicController; import itdelatrisu.opsu.objects.Circle; import itdelatrisu.opsu.objects.DummyObject; import itdelatrisu.opsu.objects.GameObject; @@ -189,7 +190,7 @@ public class Dancer { p = e[0]; c = e[1]; } - if (this.objectIndex != objectIndex) { + if (this.objectIndex != objectIndex || c != gameObjects[objectIndex]) { this.objectIndex = objectIndex; if (objectIndex == 0) { if (c.isSpinner()) { @@ -267,11 +268,18 @@ public class Dancer { } return; } + GameObject p = null; + if (objectIndex > 0) { + p = gameObjects[objectIndex - 1]; + GameObject[] e = sliderMoverController.process(p, c, MusicController.getPosition()); + p = e[0]; + c = e[1]; + } if (mover == null || mover.getEnd() != c) { if (objectIndex == 0) { mover = new LinearMover(d, c, dir); } else { - mover = moverFactory.create(gameObjects[objectIndex - 1], c, dir); + mover = moverFactory.create(p, c, dir); } } }