From 8ba712abf73174543f3c22bdb1a6fab34fc186bc Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 21 Sep 2003 00:17:34 +0000 Subject: [PATCH] Fix log. Fix second extra stage glitch when playing in a song group with only long songs. --- stepmania/src/ScreenEvaluation.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index e87dfaed90..dd40da41a7 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -105,7 +105,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl default: ASSERT(0); } - LOG->Trace( "total error %i", stageStats.iTotalError[0], stageStats.iTotalError[1] ); + LOG->Trace( "total error: %i, %i", stageStats.iTotalError[0], stageStats.iTotalError[1] ); /* // @@ -987,6 +987,18 @@ void ScreenEvaluation::MenuStart( PlayerNumber pn ) // Increment the stage counter. int iNumStagesOfLastSong; iNumStagesOfLastSong = SongManager::GetNumStagesForSong( GAMESTATE->m_pCurSong ); + + if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) + { + /* XXX: If it's an extra stage, always increment by one. This is because + * in some unusual cases we can pick a long or marathon song as an extra + * stage. The most common cause of this is when an entire group of songs + * is long/nonstop mixes. + * + * We can't simply not choose long songs as extra stages: if there are no + * regular songs to choose, we'll end up with no song to use as an extra stage. */ + iNumStagesOfLastSong = 1; + } GAMESTATE->m_iCurrentStageIndex += iNumStagesOfLastSong; // save current stage stats