From 39c30e2f37d66aa19718088a0972367a65770313 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 9 Oct 2004 15:18:42 +0000 Subject: [PATCH] fix stage count problems --- stepmania/src/ScreenEvaluation.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 4111048352..6e45d7636e 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -1394,11 +1394,6 @@ void ScreenEvaluation::HandleScreenMessage( const ScreenMessage SM ) break; case SM_GoToNextScreen: { - /* Hack: finish the stage before moving on. This will increment the stage - * counter. If we don't do this, the stage counter will be wrong for - * ScreenSelectMusic code which is called before the ctor. */ - GAMESTATE->FinishStage(); - if( PREFSMAN->m_bEventMode ) SCREENMAN->SetNewScreen( NEXT_SCREEN ); else @@ -1419,6 +1414,12 @@ void ScreenEvaluation::HandleScreenMessage( const ScreenMessage SM ) case stage: if( m_bTryExtraStage || !(GAMESTATE->IsFinalStage() || GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) ) { + /* Hack: finish the stage before moving on. This will increment the stage + * counter. If we don't do this, the stage counter will be wrong for + * ScreenSelectMusic code which is called before the ctor. Watch out; + * calling this will change the results of IsFinalStage(), etc. */ + GAMESTATE->FinishStage(); + SCREENMAN->SetNewScreen( NEXT_SCREEN ); break; }