PlayersCanJoin does not check style anymore, see comment. IsHumanPlayer doesn't try to use PlayersCanJoin to guess the current screen anymore.

This commit is contained in:
Kyzentun Keeslala
2015-05-19 21:58:56 -06:00
parent 57ad9e1eba
commit e6e0dcff44
+9 -9
View File
@@ -1443,10 +1443,12 @@ bool GameState::PlayersCanJoin() const
{
return true;
}
if(GetCurrentStyle(PLAYER_INVALID) == NULL)
{
return true; // selecting a style finalizes the players
}
// If we check the style and it comes up NULL, either the style has not been
// chosen, or we're on ScreenSelectMusic with AutoSetStyle.
// If the style does not come up NULL, we might be on a screen in a custom
// theme that wants to allow joining after the style is set anyway.
// Either way, we can't use the existence of a style to decide.
// -Kyz
if( ALLOW_LATE_JOIN.IsLoaded() && ALLOW_LATE_JOIN )
{
Screen *pScreen = SCREENMAN->GetTopScreen();
@@ -1472,8 +1474,9 @@ bool GameState::PlayersCanJoin() const
}
}
}
return true;
}
return true;
return false;
}
int GameState::GetNumSidesJoined() const
@@ -1635,10 +1638,7 @@ bool GameState::IsHumanPlayer( PlayerNumber pn ) const
}
if( GetCurrentStyle(pn) == NULL ) // no style chosen
{
if( PlayersCanJoin() )
return m_bSideIsJoined[pn]; // only allow input from sides that have already joined
else
return true; // if we can't join, then we're on a screen like MusicScroll or GameOver
return m_bSideIsJoined[pn]; // only allow input from sides that have already joined
}
StyleType type = GetCurrentStyle(pn)->m_StyleType;