don't recreate knorkesliders when loading checkpoint (part of #104)
This commit is contained in:
parent
bcb805a23a
commit
3b91247d12
|
@ -1606,6 +1606,7 @@ public class Game extends BasicGameState {
|
|||
SoundController.mute(false);
|
||||
|
||||
if (Options.isMergingSliders()) {
|
||||
if (knorkesliders == null) {
|
||||
// let's create knorkesliders
|
||||
List<Vec2f> curvepoints = new ArrayList<>();
|
||||
for (GameObject gameObject : gameObjects) {
|
||||
|
@ -1617,6 +1618,15 @@ public class Game extends BasicGameState {
|
|||
if (curvepoints.size() > 0) {
|
||||
knorkesliders = new FakeCombinedCurve(curvepoints.toArray(new Vec2f[curvepoints.size()]));
|
||||
}
|
||||
} else {
|
||||
int base = 0;
|
||||
for (GameObject gameObject : gameObjects) {
|
||||
if (gameObject.isSlider()) {
|
||||
((Slider) gameObject).baseSliderFrom = base;
|
||||
base += ((Slider) gameObject).getCurve().getCurvePoints().length;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1647,6 +1657,8 @@ public class Game extends BasicGameState {
|
|||
// container.setMouseGrabbed(false);
|
||||
skippedToCheckpoint = false;
|
||||
|
||||
knorkesliders = null;
|
||||
|
||||
sbOverlay.leave();
|
||||
Dancer.instance.setGameObjects(null);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user