Fixed pausing on ScreenGameplay by making GameState have a pause variable and not force the song position forward if the game is paused. Implementing a working pause button that the player can press is left as an exercise for the reader.

This commit is contained in:
Kyzentun Keeslala
2015-09-03 14:39:57 -06:00
parent 60b69ab6b6
commit f182a04780
4 changed files with 18 additions and 4 deletions
+7 -2
View File
@@ -398,7 +398,7 @@ void ScreenGameplay::Init()
MEMCARDMAN->PauseMountingThread();
m_pSoundMusic = NULL;
m_bPaused = false;
set_paused_internal(false);
m_pCombinedLifeMeter = NULL;
@@ -1499,6 +1499,11 @@ void ScreenGameplay::StartPlayingSong( float fMinTimeToNotes, float fMinTimeToMu
}
}
void ScreenGameplay::set_paused_internal(bool p)
{
m_bPaused= p;
GAMESTATE->SetPaused(p);
}
void ScreenGameplay::PauseGame( bool bPause, GameController gc )
{
@@ -1514,7 +1519,7 @@ void ScreenGameplay::PauseGame( bool bPause, GameController gc )
ResetGiveUpTimers(false);
m_bPaused = bPause;
set_paused_internal(bPause);
m_PauseController = gc;
m_pSoundMusic->Pause( bPause );