allow locking pause controller
This commit is contained in:
@@ -1107,7 +1107,7 @@ float ScreenGameplay::StartPlayingSong(float MinTimeToNotes, float MinTimeToMusi
|
||||
}
|
||||
|
||||
|
||||
void ScreenGameplay::PauseGame( bool bPause )
|
||||
void ScreenGameplay::PauseGame( bool bPause, GameController gc )
|
||||
{
|
||||
if( m_bPaused == bPause )
|
||||
{
|
||||
@@ -1122,6 +1122,8 @@ void ScreenGameplay::PauseGame( bool bPause )
|
||||
AbortGiveUp( false );
|
||||
|
||||
m_bPaused = bPause;
|
||||
m_PauseController = gc;
|
||||
|
||||
m_pSoundMusic->Pause( bPause );
|
||||
if( bPause )
|
||||
this->PlayCommand( "Pause" );
|
||||
@@ -1733,8 +1735,11 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
|
||||
if( m_bPaused )
|
||||
{
|
||||
/* If we're paused, only accept MENU_BUTTON_START to unpause. */
|
||||
if( MenuI.IsValid() && MenuI.button == MENU_BUTTON_START && type == IET_FIRST_PRESS )
|
||||
this->PauseGame( false );
|
||||
if( MenuI.IsValid() && GAMESTATE->IsHumanPlayer(MenuI.player) && MenuI.button == MENU_BUTTON_START && type == IET_FIRST_PRESS )
|
||||
{
|
||||
if( m_PauseController == GAME_CONTROLLER_INVALID || m_PauseController == GameI.controller )
|
||||
this->PauseGame( false );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ protected:
|
||||
void LoadNextSong();
|
||||
void LoadCourseSongNumber( int SongNumber );
|
||||
float StartPlayingSong(float MinTimeToNotes, float MinTimeToMusic);
|
||||
void PauseGame( bool bPause );
|
||||
void PauseGame( bool bPause, GameController gc = GAME_CONTROLLER_INVALID );
|
||||
void ShowSavePrompt( ScreenMessage SM_SendWhenDone );
|
||||
void PlayAnnouncer( CString type, float fSeconds );
|
||||
void UpdateLights();
|
||||
@@ -82,6 +82,7 @@ protected:
|
||||
NUM_DANCING_STATES
|
||||
} m_DancingState;
|
||||
bool m_bPaused;
|
||||
GameController m_PauseController;
|
||||
vector<Song*> m_apSongsQueue; // size may be >1 if playing a course
|
||||
vector<Steps*> m_vpStepsQueue[NUM_PLAYERS]; // size may be >1 if playing a course
|
||||
vector<AttackArray> m_asModifiersQueue[NUM_PLAYERS];// size may be >1 if playing a course
|
||||
|
||||
Reference in New Issue
Block a user