Don't allow switching of pages on SelectDifficulty after one player has made a choice.

This commit is contained in:
Chris Danford
2002-10-21 02:32:06 +00:00
parent 3a6edc3d99
commit a53fe4ef0e
+13 -1
View File
@@ -325,6 +325,14 @@ void ScreenSelectDifficulty::ChangeTo( PlayerNumber pn, int iSelectionWas, int i
bool bSelectedSomethingOnPage1 = iSelectionIs < 3;
bool bSelectedSomethingOnPage2 = iSelectionIs >= 3;
bool bSomeoneMadeAChoice = false;
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) && m_bChosen[p] )
bSomeoneMadeAChoice = true;
if( bSomeoneMadeAChoice && (bChangedPagesFrom1To2 || bChangedPagesFrom2To1) )
return; // don't allow changing pages after one player has chosen
if( bSelectedSomethingOnPage2 )
{
// change both players
@@ -358,7 +366,7 @@ void ScreenSelectDifficulty::ChangeTo( PlayerNumber pn, int iSelectionWas, int i
m_framePages.SetTweenX( bSelectedSomethingOnPage1 ? 0.0f : -SCREEN_WIDTH );
}
for( int p=0; p<NUM_PLAYERS; p++ )
for( p=0; p<NUM_PLAYERS; p++ )
{
if( bSelectedSomethingOnPage2 || bChangedPagesFrom2To1 || p==pn )
{
@@ -383,6 +391,10 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn )
return;
m_bChosen[pn] = true;
for( int page=0; page<NUM_PAGES; page++ )
m_sprMoreArrows[page].FadeOff( 0, "fade", 0.5f );
m_soundSelect.Play();
int iSelection = m_iSelection[pn];