Change JoinPlayer to look directly at SideIsJoined to avoid style-dependent logic in GetNumPlayersEnabled.

This commit is contained in:
Kyzentun Keeslala
2015-05-20 22:26:47 -06:00
parent 266ac4ef92
commit cc2e166c18
+5 -1
View File
@@ -374,7 +374,11 @@ void GameState::JoinPlayer( PlayerNumber pn )
{
// Make sure the join will be successful before doing it. -Kyz
{
int players_joined= GetNumPlayersEnabled();
int players_joined= 0;
for(int i= 0; i < NUM_PLAYERS; ++i)
{
players_joined+= m_bSideIsJoined[i];
}
if(players_joined > 0)
{
const Style* cur_style= GetCurrentStyle(PLAYER_INVALID);