only validate PlayMode and Style if one or the other is being set
This commit is contained in:
@@ -227,16 +227,19 @@ bool ModeChoice::IsPlayable( CString *why ) const
|
|||||||
|
|
||||||
/* Don't allow a PlayMode that's incompatible with our current Style (if set),
|
/* Don't allow a PlayMode that's incompatible with our current Style (if set),
|
||||||
* and vice versa. */
|
* and vice versa. */
|
||||||
const PlayMode &rPlayMode = (m_pm != PLAY_MODE_INVALID) ? m_pm : GAMESTATE->m_PlayMode;
|
if( m_pm != PLAY_MODE_INVALID || m_style != STYLE_INVALID )
|
||||||
if( rPlayMode == PLAY_MODE_RAVE || rPlayMode == PLAY_MODE_BATTLE )
|
|
||||||
{
|
{
|
||||||
// Can't play rave if there isn't enough room for two players.
|
const PlayMode pm = (m_pm != PLAY_MODE_INVALID) ? m_pm : GAMESTATE->m_PlayMode;
|
||||||
// This is correct for dance (ie, no rave for solo and doubles),
|
if( pm == PLAY_MODE_RAVE || pm == PLAY_MODE_BATTLE )
|
||||||
// and should be okay for pump .. not sure about other game types.
|
{
|
||||||
const Style &rStyle = m_style != STYLE_INVALID? m_style: GAMESTATE->m_CurStyle;
|
// Can't play rave if there isn't enough room for two players.
|
||||||
if( rStyle != STYLE_INVALID &&
|
// This is correct for dance (ie, no rave for solo and doubles),
|
||||||
GAMEMAN->GetStyleDefForStyle(rStyle)->m_iColsPerPlayer >= 6 )
|
// and should be okay for pump .. not sure about other game types.
|
||||||
return false;
|
const Style &style = m_style != STYLE_INVALID? m_style: GAMESTATE->m_CurStyle;
|
||||||
|
if( style != STYLE_INVALID &&
|
||||||
|
GAMEMAN->GetStyleDefForStyle(style)->m_iColsPerPlayer >= 6 )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !m_sScreen.CompareNoCase("ScreenEditCoursesMenu") )
|
if( !m_sScreen.CompareNoCase("ScreenEditCoursesMenu") )
|
||||||
|
|||||||
Reference in New Issue
Block a user