move StopMusic() to the right place

This commit is contained in:
Glenn Maynard
2005-01-05 03:46:09 +00:00
parent 52548afeec
commit 2ee36923b7
+6 -4
View File
@@ -576,6 +576,12 @@ void GameCommand::Apply( PlayerNumber pn ) const
UNLOCKMAN->UnlockCode( m_iUnlockIndex );
if( m_sSoundPath != "" )
SOUND->PlayOnce( THEME->GetPathToS( m_sSoundPath ) );
/* If we're going to stop music, do so before preparing new screens, so we don't
* stop music between preparing screens and loading screens. */
if( m_bStopMusic )
SOUND->StopMusic();
FOREACH_CONST( CString, m_vsScreensToPrepare, s )
SCREENMAN->PrepareScreen( *s );
if( m_bDeletePreparedScreens )
@@ -676,10 +682,6 @@ void GameCommand::Apply( PlayerNumber pn ) const
PREFSMAN->ResetToFactoryDefaults();
SCREENMAN->SystemMessage( "All options reset to factory defaults." );
}
if( m_bStopMusic )
{
SOUND->StopMusic();
}
if( m_bApplyDefaultOptions )
{
FOREACH_PlayerNumber( p )