Don't modify stored courses; it's far too easy to accidentally forget

to reset them in one of the (many) exit-gameplay paths, or reset it
incorrectly.

This fixes the course selection screen crashing when there is
no music.
This commit is contained in:
Glenn Maynard
2003-03-28 02:25:15 +00:00
parent 21c4f840c7
commit c7c02602d9
4 changed files with 28 additions and 57 deletions
+10 -14
View File
@@ -253,24 +253,20 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, InputEventType type,
return;
}
if( CodeDetector::EnteredEasierDifficulty(GameI.controller) )
if( CodeDetector::EnteredEasierDifficulty(GameI.controller) &&
GAMESTATE->m_bDifficultCourses)
{
if( m_MusicWheel.GetSelectedCourse()->MakeNormal() )
{
m_soundChangeNotes.Play();
GAMESTATE->m_bDifficultCourses = false;
SCREENMAN->PostMessageToTopScreen(SM_SongChanged,0);
}
m_soundChangeNotes.Play();
GAMESTATE->m_bDifficultCourses = false;
SCREENMAN->PostMessageToTopScreen(SM_SongChanged,0);
}
if( CodeDetector::EnteredHarderDifficulty(GameI.controller) )
if( CodeDetector::EnteredHarderDifficulty(GameI.controller) &&
!GAMESTATE->m_bDifficultCourses)
{
if( m_MusicWheel.GetSelectedCourse()->MakeDifficult() )
{
m_soundChangeNotes.Play();
GAMESTATE->m_bDifficultCourses = true;
SCREENMAN->PostMessageToTopScreen(SM_SongChanged,0);
}
m_soundChangeNotes.Play();
GAMESTATE->m_bDifficultCourses = true;
SCREENMAN->PostMessageToTopScreen(SM_SongChanged,0);
}