avoid assert if loaded before any palyers are joined

This commit is contained in:
Glenn Maynard
2007-06-08 06:52:05 +00:00
parent 9c2434f398
commit fe69cba5ad
+2 -3
View File
@@ -106,9 +106,8 @@ void DifficultyList::UpdatePositions()
int first_start, first_end, second_start, second_end;
/* Choices for each player. If only one player is active, it's the same for both. */
ASSERT( GAMESTATE->IsHumanPlayer(PLAYER_1) || GAMESTATE->IsHumanPlayer(PLAYER_2) );
int P1Choice = GAMESTATE->IsHumanPlayer(PLAYER_1)? iCurrentRow[PLAYER_1]: iCurrentRow[PLAYER_2];
int P2Choice = GAMESTATE->IsHumanPlayer(PLAYER_2)? iCurrentRow[PLAYER_2]: iCurrentRow[PLAYER_1];
int P1Choice = GAMESTATE->IsHumanPlayer(PLAYER_1)? iCurrentRow[PLAYER_1]: GAMESTATE->IsHumanPlayer(PLAYER_2)? iCurrentRow[PLAYER_2]: 0;
int P2Choice = GAMESTATE->IsHumanPlayer(PLAYER_2)? iCurrentRow[PLAYER_2]: GAMESTATE->IsHumanPlayer(PLAYER_1)? iCurrentRow[PLAYER_1]: 0;
vector<Row> &Rows = m_Rows;