From fe69cba5ad4707779e19c35f7587d49bde1bb83b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 8 Jun 2007 06:52:05 +0000 Subject: [PATCH] avoid assert if loaded before any palyers are joined --- stepmania/src/DifficultyList.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stepmania/src/DifficultyList.cpp b/stepmania/src/DifficultyList.cpp index 5ac3478ec0..b36c6cacce 100644 --- a/stepmania/src/DifficultyList.cpp +++ b/stepmania/src/DifficultyList.cpp @@ -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 &Rows = m_Rows;