fix "solo" selectable in Pump

This commit is contained in:
Chris Danford
2003-09-25 05:56:38 +00:00
parent e220859940
commit 2c38027e6d
10 changed files with 78 additions and 76 deletions
+8 -5
View File
@@ -307,22 +307,25 @@ const StyleDef* GameState::GetCurrentStyleDef()
bool GameState::IsPlayable( const ModeChoice& mc )
{
if ( mc.style != STYLE_INVALID )
if( mc.m_bInvalid )
return false;
if ( mc.m_style != STYLE_INVALID )
{
const int SidesJoinedToPlay = GAMEMAN->GetStyleDefForStyle(mc.style)->NumSidesJoinedToPlay();
const int SidesJoinedToPlay = GAMEMAN->GetStyleDefForStyle(mc.m_style)->NumSidesJoinedToPlay();
if( SidesJoinedToPlay != GAMESTATE->GetNumSidesJoined() )
return false;
}
/* Don't set a PlayMode that's incompatible with our current Style (if any),
/* Don't allow a PlayMode that's incompatible with our current Style (if set),
* and vice versa. */
const PlayMode &rPlayMode = mc.pm != PLAY_MODE_INVALID? mc.pm:m_PlayMode;
const PlayMode &rPlayMode = (mc.m_pm != PLAY_MODE_INVALID) ? mc.m_pm : m_PlayMode;
if( rPlayMode == PLAY_MODE_RAVE || rPlayMode == PLAY_MODE_BATTLE )
{
// Can't play rave if there isn't enough room for two players.
// This is correct for dance (ie, no rave for solo and doubles),
// and should be okay for pump .. not sure about other game types.
const Style &rStyle = mc.style != STYLE_INVALID? mc.style: m_CurStyle;
const Style &rStyle = mc.m_style != STYLE_INVALID? mc.m_style: m_CurStyle;
if( rStyle != STYLE_INVALID &&
GAMEMAN->GetStyleDefForStyle(rStyle)->m_iColsPerPlayer >= 6 )
return false;