Fix crashes when using the second player.

Use the master player number for everything except setting the current trail which needs to be PLAYER_1 because there are different messages for each player's trail changing. Perhaps that should change at some point.
This commit is contained in:
Steve Checkoway
2006-03-04 02:34:01 +00:00
parent 1214a91649
commit 2ff53582a1
3 changed files with 11 additions and 12 deletions
+2 -2
View File
@@ -199,12 +199,12 @@ void ScreenOptionsEditCourse::AfterChangeValueInRow( int iRow, PlayerNumber pn )
Course *pCourse = GAMESTATE->m_pCurCourse;
// Regenerate Trails so that the new values propagate
GAMESTATE->m_pCurTrail[GAMESTATE->m_MasterPlayerNumber].Set( NULL );
GAMESTATE->m_pCurTrail[PLAYER_1].Set( NULL );
Trail *pTrail = pCourse->GetTrailForceRegenCache( GAMESTATE->m_stEdit, GAMESTATE->m_cdEdit );
// cause overlay elements to refresh by changing the course
GAMESTATE->m_pCurCourse.Set( pCourse );
GAMESTATE->m_pCurTrail[GAMESTATE->m_MasterPlayerNumber].Set( pTrail );
GAMESTATE->m_pCurTrail[PLAYER_1].Set( pTrail );
}
void ScreenOptionsEditCourse::ImportOptions( int iRow, const vector<PlayerNumber> &vpns )