From 9ac44498feaef8ef10dd35c28d424574dc9a5342 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 6 Jun 2004 19:43:31 +0000 Subject: [PATCH] fix AV on switch from arcade to nonstop --- stepmania/src/CourseContentsList.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/stepmania/src/CourseContentsList.cpp b/stepmania/src/CourseContentsList.cpp index 833b5edeb7..2218958d1e 100644 --- a/stepmania/src/CourseContentsList.cpp +++ b/stepmania/src/CourseContentsList.cpp @@ -58,17 +58,13 @@ void CourseContentsList::SetFromGameState() return; } - Trail* pTrail[NUM_PLAYERS]; - FOREACH_PlayerNumber(pn) - { - pTrail[pn] = GAMESTATE->m_pCurTrail[pn]; - } - // FIXME: Is there a better way to handle when players don't have // the same number of TrailEntries? // They have to have the same number, and of the same songs, or gameplay // isn't going to line up. - Trail* pMasterTrail = pTrail[GAMESTATE->m_MasterPlayerNumber]; + Trail* pMasterTrail = GAMESTATE->m_pCurTrail[GAMESTATE->m_MasterPlayerNumber]; + if( pMasterTrail == NULL ) + return; int iNumEntriesToShow = min((int)pMasterTrail->m_vEntries.size(), MAX_TOTAL_CONTENTS); m_iNumContents = 0; @@ -76,10 +72,13 @@ void CourseContentsList::SetFromGameState() for( int i=0; im_vEntries[i]; + { + Trail* pTrail = GAMESTATE->m_pCurTrail[pn]; + pte[pn] = &pTrail->m_vEntries[i]; + } display.LoadFromTrailEntry( m_iNumContents+1, pte ); m_iNumContents++;