Follow-up to 924f528: small fix.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han 2015-01-23 16:11:10 -05:00
parent 924f528881
commit d2b3249e2c

View File

@ -169,9 +169,13 @@ public class Opsu extends StateBasedGame {
// intercept close requests in game-related states and return to song menu
if (id == STATE_GAME || id == STATE_GAMEPAUSEMENU || id == STATE_GAMERANKING) {
// start playing track at preview position
((SongMenu) this.getState(Opsu.STATE_SONGMENU)).resetGameDataOnLoad();
SongMenu songMenu = (SongMenu) this.getState(Opsu.STATE_SONGMENU);
songMenu.resetGameDataOnLoad();
if (id == STATE_GAME) {
MusicController.pause();
MusicController.resume();
} else
songMenu.resetTrackOnLoad();
this.enterState(Opsu.STATE_SONGMENU, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
return false;
}