diff --git a/stepmania/src/GameCommand.cpp b/stepmania/src/GameCommand.cpp index 8545d0ef09..a90c4c094d 100644 --- a/stepmania/src/GameCommand.cpp +++ b/stepmania/src/GameCommand.cpp @@ -23,6 +23,7 @@ void GameCommand::Init() { + m_bApplyCommitsScreens = true; m_sName = ""; m_sText = ""; m_bInvalid = true; @@ -591,6 +592,7 @@ void GameCommand::Apply( const vector &vpns ) const { GameCommand gc; gc.m_bInvalid = false; + gc.m_bApplyCommitsScreens = m_bApplyCommitsScreens; gc.LoadOne( *cmd ); gc.ApplySelf( vpns ); } @@ -669,7 +671,7 @@ void GameCommand::ApplySelf( const vector &vpns ) const } LUA->Release(L); } - if( m_sScreen != "" ) + if( m_sScreen != "" && m_bApplyCommitsScreens ) SCREENMAN->SetNewScreen( m_sScreen ); if( m_pSong ) { diff --git a/stepmania/src/GameCommand.h b/stepmania/src/GameCommand.h index 8189536a88..3bff3e8c22 100644 --- a/stepmania/src/GameCommand.h +++ b/stepmania/src/GameCommand.h @@ -40,6 +40,10 @@ public: bool IsPlayable( CString *why = NULL ) const; bool IsZero() const; CString GetAndClearScreen(); + + /* If true, Apply() will apply m_sScreen. If false, it won't, and you need + * to do it yourself. */ + void ApplyCommitsScreens( bool bOn ) { m_bApplyCommitsScreens = bOn; } // Same as what was passed to Load. We need to keep the original commands // so that we know the order of commands when it comes time to Apply. @@ -82,6 +86,9 @@ public: // Lua void PushSelf( lua_State *L ); + +private: + bool m_bApplyCommitsScreens; }; #endif