diff --git a/stepmania/src/GameCommand.cpp b/stepmania/src/GameCommand.cpp index c5bfd1fae2..26cff3bf52 100644 --- a/stepmania/src/GameCommand.cpp +++ b/stepmania/src/GameCommand.cpp @@ -54,6 +54,7 @@ void GameCommand::Init() m_bDownloadMachineStats = false; m_bInsertCredit = false; m_bResetToFactoryDefaults = false; + m_bStopMusic = false; } bool CompareSongOptions( const SongOptions &so1, const SongOptions &so2 ); @@ -279,6 +280,10 @@ void GameCommand::Load( int iIndex, const Commands& cmds ) { m_bResetToFactoryDefaults = true; } + else if( sName == "stopmusic" ) + { + m_bStopMusic = true; + } else { @@ -561,6 +566,8 @@ void GameCommand::Apply( PlayerNumber pn ) const UNLOCKMAN->UnlockCode( m_iUnlockIndex ); if( m_sSoundPath != "" ) SOUND->PlayOnce( THEME->GetPathToS( m_sSoundPath ) ); + if( m_bStopMusic ) + SOUND->StopMusic(); FOREACH_CONST( CString, m_vsScreensToPrepare, s ) SCREENMAN->PrepareScreen( *s ); if( m_bDeletePreparedScreens ) diff --git a/stepmania/src/GameCommand.h b/stepmania/src/GameCommand.h index 216ef9c1db..115212a669 100644 --- a/stepmania/src/GameCommand.h +++ b/stepmania/src/GameCommand.h @@ -59,6 +59,7 @@ struct GameCommand // used in SelectMode bool m_bDownloadMachineStats; bool m_bInsertCredit; bool m_bResetToFactoryDefaults; + bool m_bStopMusic; }; #endif