script fix

This commit is contained in:
Glenn Maynard
2005-01-20 01:51:30 +00:00
parent 362c2a1d10
commit b19f730790
+5 -6
View File
@@ -1416,13 +1416,12 @@ void ScreenEvaluation::HandleScreenMessage( const ScreenMessage SM )
case stage: case stage:
if( m_bTryExtraStage || !(GAMESTATE->IsFinalStage() || GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) ) if( m_bTryExtraStage || !(GAMESTATE->IsFinalStage() || GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) )
{ {
/* Hack: finish the stage before moving on. This will increment the stage /* Finish the stage before moving on, so the stage counter will be correct
* counter. If we don't do this, the stage counter will be wrong for * for ScreenSelectMusic code which is called before the ctor. Grab NEXT_SCREEN
* ScreenSelectMusic code which is called before the ctor. Watch out; * first, NEXT_SCREEN is a Lua script that depends on the stage counter. */
* calling this will change the results of IsFinalStage(), etc. */ CString sNextScreen = NEXT_SCREEN;
GAMESTATE->FinishStage(); GAMESTATE->FinishStage();
SCREENMAN->SetNewScreen( sNextScreen );
SCREENMAN->SetNewScreen( NEXT_SCREEN );
break; break;
} }