Missing a music file is no longer a fatal error.

This commit is contained in:
Chris Danford
2002-09-16 00:56:30 +00:00
parent a650641426
commit 326b1d4df0
8 changed files with 42 additions and 17 deletions
+9 -1
View File
@@ -137,9 +137,17 @@ void ScreenEditMenu::MenuRight( PlayerNumber pn, const InputEventType type )
void ScreenEditMenu::MenuStart( PlayerNumber pn )
{
GAMESTATE->m_pCurSong = Selector.GetSelectedSong();
if( !GAMESTATE->m_pCurSong->HasMusic() )
{
SCREENMAN->SystemMessage( "This song is missing a music file and cannot be edited" );
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu invalid") );
return;
}
MUSIC->Stop();
GAMESTATE->m_pCurSong = Selector.GetSelectedSong();
// get the style
GAMESTATE->m_CurStyle = Selector.GetSelectedStyle();