don't process hold note logic while paused

SM_Pause can be sent from elsewhere to pause
START unpauses when paused
don't move on to another screen when paused
This commit is contained in:
Glenn Maynard
2005-03-11 03:54:40 +00:00
parent afe1f892eb
commit f61cce45f5
4 changed files with 31 additions and 2 deletions
+20
View File
@@ -1147,6 +1147,9 @@ void ScreenGameplay::PauseGame( bool bPause )
this->PlayCommand( "Pause" );
else
this->PlayCommand( "Unpause" );
FOREACH_EnabledPlayer(p)
m_Player[p].SetPaused( m_bPaused );
}
// play assist ticks
@@ -1320,6 +1323,10 @@ void ScreenGameplay::Update( float fDeltaTime )
if( SCREENMAN->GetTopScreen() != this )
return;
/* Update actors when paused, but never move on to another state. */
if( m_bPaused )
return;
if( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID && !m_MaxCombo.GetHidden() )
m_MaxCombo.SetText( ssprintf("%d", STATSMAN->m_CurStageStats.m_player[GAMESTATE->m_MasterPlayerNumber].iMaxCombo) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */
@@ -1732,6 +1739,14 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
if( type == IET_LEVEL_CHANGED )
return;
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 );
return;
}
if( MenuI.IsValid() &&
m_DancingState != STATE_OUTRO &&
!m_Back.IsTransitioning() )
@@ -2390,6 +2405,11 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
case SM_StopMusic:
m_pSoundMusic->Stop();
break;
case SM_Pause:
if( !m_bPaused )
PauseGame( true );
break;
}
}