From 617712a1cf830d589f78e7fa9014c0f8226f3bc9 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 31 May 2007 01:14:23 +0000 Subject: [PATCH] ScreenGameplay::InitSongQueues adds songs to m_apSongsQueue, etc. ScreenJukebox::InitSongQueues trims them. Init m_CurStageStats.m_vpPossibleSongs outside of InitSongQueues, so it isn't initialized differently than the queues. --- stepmania/src/ScreenGameplay.cpp | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index d118e9b90c..e70e59d658 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -732,9 +732,20 @@ void ScreenGameplay::Init() // fill in m_apSongsQueue, m_vpStepsQueue, m_asModifiersQueue // InitSongQueues(); + + // Fill StageStats + STATSMAN->m_CurStageStats.m_vpPossibleSongs = m_apSongsQueue; + FOREACH( PlayerInfo, m_vPlayerInfo, pi ) + { + if( pi->GetPlayerStageStats() ) + pi->GetPlayerStageStats()->m_vpPossibleSteps = pi->m_vpStepsQueue; + } + FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi ) { ASSERT( !pi->m_vpStepsQueue.empty() ); + if( pi->GetPlayerStageStats() ) + pi->GetPlayerStageStats()->m_bJoined = true; if( pi->m_pPrimaryScoreKeeper ) pi->m_pPrimaryScoreKeeper->Load( m_apSongsQueue, pi->m_vpStepsQueue, pi->m_asModifiersQueue ); if( pi->m_pSecondaryScoreKeeper ) @@ -821,20 +832,6 @@ void ScreenGameplay::InitSongQueues() pi->m_asModifiersQueue.push_back( aa ); } } - - // Fill StageStats - STATSMAN->m_CurStageStats.m_vpPossibleSongs = m_apSongsQueue; - FOREACH( PlayerInfo, m_vPlayerInfo, pi ) - { - if( pi->GetPlayerStageStats() ) - pi->GetPlayerStageStats()->m_vpPossibleSteps = pi->m_vpStepsQueue; - } - - FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi ) - { - if( pi->GetPlayerStageStats() ) - pi->GetPlayerStageStats()->m_bJoined = true; - } } ScreenGameplay::~ScreenGameplay()