fix sb speed once and for all

This commit is contained in:
yugecin 2016-12-11 14:52:54 +01:00
parent 7309399fd5
commit 98e9b5c210

View File

@ -303,6 +303,8 @@ public class Game extends BasicGameState {
private FakeCombinedCurve knorkesliders;
private boolean skippedToCheckpoint;
public Game(int state) {
this.state = state;
mirrorCursor = new Cursor(true);
@ -312,6 +314,7 @@ public class Game extends BasicGameState {
try {
restart = Restart.MANUAL;
checkpointLoaded = true;
skippedToCheckpoint = true;
enter(container, game);
if (isLeadIn()) {
leadInTime = 0;
@ -1544,9 +1547,9 @@ public class Game extends BasicGameState {
slidercurveFrom = 0;
slidercurveTo = 0;
if (!skippedToCheckpoint) {
Dancer.instance.setGameObjects(gameObjects);
sbOverlay.setGameObjects(gameObjects);
if (restart != Restart.FALSE) {
sbOverlay.enter();
sbOverlay.updateIndex(0);
}
@ -1565,6 +1568,7 @@ public class Game extends BasicGameState {
public void leave(GameContainer container, StateBasedGame game)
throws SlickException {
// container.setMouseGrabbed(false);
skippedToCheckpoint = false;
sbOverlay.leave();
Dancer.instance.setGameObjects(null);