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
+7 -3
View File
@@ -600,11 +600,15 @@ bool SongManager::ChooseRandomSong()
for( i=0; i<600; i++ ) // try 600 times
{
Song* pSong = m_pSongs[ rand()%m_pSongs.GetSize() ];
if( pSong->m_apNotes.GetSize() == 0 )
continue; // skip
if( !pSong->HasMusic() )
continue; // skip
for( int j=0; j<3; j++ ) // try 3 times
{
if( pSong->m_apNotes.GetSize() == 0 )
continue;
/* XXX: This assumes we're set to a style that doesn't use separate
* notes for each player, such as VERSUS. */
Notes* pNotes = pSong->m_apNotes[ rand()%pSong->m_apNotes.GetSize() ];