From 5989c50456b52c733e474b3b9edd27347cbcf172 Mon Sep 17 00:00:00 2001 From: yugecin Date: Wed, 7 Dec 2016 13:35:29 +0100 Subject: [PATCH] fix #94 --- src/itdelatrisu/opsu/objects/Slider.java | 2 -- src/itdelatrisu/opsu/objects/curves/Curve.java | 4 +++- src/itdelatrisu/opsu/states/Game.java | 11 +++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/itdelatrisu/opsu/objects/Slider.java b/src/itdelatrisu/opsu/objects/Slider.java index 733d2f63..92c0ac1e 100644 --- a/src/itdelatrisu/opsu/objects/Slider.java +++ b/src/itdelatrisu/opsu/objects/Slider.java @@ -124,8 +124,6 @@ public class Slider extends GameObject { public int baseSliderFrom; - private boolean reversed; - /** * Initializes the Slider data type with images and dimensions. * @param container the game container diff --git a/src/itdelatrisu/opsu/objects/curves/Curve.java b/src/itdelatrisu/opsu/objects/curves/Curve.java index bbe02eb7..f89f840e 100644 --- a/src/itdelatrisu/opsu/objects/curves/Curve.java +++ b/src/itdelatrisu/opsu/objects/curves/Curve.java @@ -155,11 +155,13 @@ public abstract class Curve { else { if (renderState == null) renderState = new CurveRenderState(hitObject, curve); - renderState.draw(color, borderColor, t1, t2); // TODO + renderState.draw(color, borderColor, t1, t2); } } public void splice(int from, int to) { + if (renderState == null) + renderState = new CurveRenderState(hitObject, curve); renderState.splice(from, to); } diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index 3283d96b..e5835f48 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -329,6 +329,17 @@ public class Game extends BasicGameState { objectIndex++; } objectIndex--; + if (Options.isMergingSliders()) { + int obj = objectIndex; + while (obj < gameObjects.length) { + if (gameObjects[obj] instanceof Slider) { + slidercurveFrom = slidercurveTo = (float) ((Slider) gameObjects[obj]).baseSliderFrom / knorkesliders.getCurvePoints().length; + break; + } + obj++; + } + spliceSliderCurve(-1, -1); + } Dancer.instance.setObjectIndex(objectIndex); sbOverlay.updateIndex(objectIndex); lastReplayTime = beatmap.objects[objectIndex].getTime();