call PlayersFinalized only after applying the mode choice to both players, or else P2's preferred difficulty gets clobbered by the mode choice.
This commit is contained in:
@@ -473,15 +473,6 @@ void ModeChoice::Apply( PlayerNumber pn ) const
|
|||||||
// we don't override the user's changes if they back out.
|
// we don't override the user's changes if they back out.
|
||||||
if( GAMESTATE->m_PlayMode == PLAY_MODE_ONI && GAMESTATE->m_PlayMode != OldPlayMode )
|
if( GAMESTATE->m_PlayMode == PLAY_MODE_ONI && GAMESTATE->m_PlayMode != OldPlayMode )
|
||||||
GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY;
|
GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY;
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// We know what players are joined at the time we set the Style
|
|
||||||
//
|
|
||||||
if( m_pStyle != NULL )
|
|
||||||
{
|
|
||||||
GAMESTATE->PlayersFinalized();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ModeChoice::IsZero() const
|
bool ModeChoice::IsZero() const
|
||||||
|
|||||||
@@ -173,14 +173,12 @@ void ScreenSelect::FinalizeChoices()
|
|||||||
* invalidate the choice we've already made. Hack: apply the style.
|
* invalidate the choice we've already made. Hack: apply the style.
|
||||||
* (Applying the style may have other side-effects, so it'll be re-applied
|
* (Applying the style may have other side-effects, so it'll be re-applied
|
||||||
* in SM_GoToNextScreen.) */
|
* in SM_GoToNextScreen.) */
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_HumanPlayer( p )
|
||||||
if( GAMESTATE->IsHumanPlayer(p) )
|
{
|
||||||
{
|
const int sel = GetSelectionIndex( p );
|
||||||
const int sel = GetSelectionIndex( p );
|
if( m_aModeChoices[sel].m_pStyle )
|
||||||
|
GAMESTATE->m_pCurStyle = m_aModeChoices[sel].m_pStyle;
|
||||||
if( m_aModeChoices[sel].m_pStyle )
|
}
|
||||||
GAMESTATE->m_pCurStyle = m_aModeChoices[sel].m_pStyle;
|
|
||||||
}
|
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
SCREENMAN->RefreshCreditsMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,9 +202,21 @@ void ScreenSelect::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
/* Apply here, not in SM_AllDoneChoosing, because applying can take a very
|
/* Apply here, not in SM_AllDoneChoosing, because applying can take a very
|
||||||
* long time (200+ms), and at SM_AllDoneChoosing, we're still tweening stuff
|
* long time (200+ms), and at SM_AllDoneChoosing, we're still tweening stuff
|
||||||
* off-screen. */
|
* off-screen. */
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_HumanPlayer( p )
|
||||||
if( GAMESTATE->IsHumanPlayer(p) )
|
m_aModeChoices[this->GetSelectionIndex(p)].Apply( p );
|
||||||
m_aModeChoices[this->GetSelectionIndex((PlayerNumber)p)].Apply( (PlayerNumber)p );
|
|
||||||
|
//
|
||||||
|
// Finalize players if we set a style on this screen.
|
||||||
|
//
|
||||||
|
FOREACH_HumanPlayer( p )
|
||||||
|
{
|
||||||
|
const int sel = GetSelectionIndex( p );
|
||||||
|
if( m_aModeChoices[sel].m_pStyle )
|
||||||
|
{
|
||||||
|
GAMESTATE->PlayersFinalized();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const int iSelectionIndex = GetSelectionIndex(GAMESTATE->m_MasterPlayerNumber);
|
const int iSelectionIndex = GetSelectionIndex(GAMESTATE->m_MasterPlayerNumber);
|
||||||
if( m_aModeChoices[iSelectionIndex].m_sScreen != "" )
|
if( m_aModeChoices[iSelectionIndex].m_sScreen != "" )
|
||||||
|
|||||||
Reference in New Issue
Block a user