fix ignoring input on inactive players

This commit is contained in:
Glenn Maynard
2004-01-21 06:14:49 +00:00
parent 01577a27f2
commit bb9932029a
2 changed files with 11 additions and 3 deletions
+5 -1
View File
@@ -233,6 +233,11 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, InputEventType type,
if( !GameI.IsValid() ) return; // don't care
/* XXX: What's the difference between this and StyleI.player? */
PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller );
if( !GAMESTATE->IsHumanPlayer(pn) )
return;
if( m_bMadeChoice && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
{
if(m_bGoToOptions) return; /* got it already */
@@ -259,7 +264,6 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, InputEventType type,
return;
}
PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller );
if( CodeDetector::EnteredEasierDifficulty(GameI.controller) )
{
if( GAMESTATE->ChangeCourseDifficulty( pn, +1 ) )