Quick bug fixes.
- Checkpoint loading now works again. (blame:9e69afa
) - Forgot to check for VSync when application initializes. (blame:97f3aad
) - Also clear game data after finishing a checkpoint game. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
09a5979475
commit
816c9bb659
|
@ -133,6 +133,7 @@ public class Utils {
|
|||
|
||||
// game settings
|
||||
container.setTargetFrameRate(Options.getTargetFPS());
|
||||
container.setVSync(Options.getTargetFPS() == 60);
|
||||
container.setMusicVolume(Options.getMusicVolume());
|
||||
container.setShowFPS(false);
|
||||
container.getInput().enableKeyRepeat();
|
||||
|
|
|
@ -476,9 +476,10 @@ public class Game extends BasicGameState {
|
|||
|
||||
// map complete!
|
||||
if (objectIndex >= osu.objects.length) {
|
||||
// if checkpoint used, don't show the ranking screen
|
||||
int state = (checkpointLoaded) ? Opsu.STATE_SONGMENU : Opsu.STATE_GAMERANKING;
|
||||
game.enterState(state, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
|
||||
if (checkpointLoaded) // if checkpoint used, skip ranking screen
|
||||
game.closeRequested();
|
||||
else // go to ranking screen
|
||||
game.enterState(Opsu.STATE_GAMERANKING, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -647,7 +648,7 @@ public class Game extends BasicGameState {
|
|||
// skip to checkpoint
|
||||
MusicController.setPosition(checkpoint);
|
||||
while (objectIndex < osu.objects.length &&
|
||||
osu.objects[objectIndex++].getTime() <= trackPosition)
|
||||
osu.objects[objectIndex++].getTime() <= checkpoint)
|
||||
;
|
||||
objectIndex--;
|
||||
} catch (SlickException e) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user