From b19f7307906e97b2dbae1c1bd65a418077de4d26 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 20 Jan 2005 01:51:30 +0000 Subject: [PATCH] script fix --- stepmania/src/ScreenEvaluation.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 2a986b73a2..46771382d7 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -1416,13 +1416,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. */ + /* Finish the stage before moving on, so the stage counter will be correct + * for ScreenSelectMusic code which is called before the ctor. Grab NEXT_SCREEN + * first, NEXT_SCREEN is a Lua script that depends on the stage counter. */ + CString sNextScreen = NEXT_SCREEN; GAMESTATE->FinishStage(); - - SCREENMAN->SetNewScreen( NEXT_SCREEN ); + SCREENMAN->SetNewScreen( sNextScreen ); break; }