Bug 632058 Fix - Oni Modifiers specified in .CRS files not being cleared after each song.

This commit is contained in:
Angela Stefanski
2002-11-03 20:17:28 +00:00
parent f6c13acabc
commit 0d49080494
2 changed files with 12 additions and 3 deletions
+3 -2
View File
@@ -143,8 +143,9 @@ public:
// Session statistics are cleared by calling Reset()
PlayerOptions m_PlayerOptions[NUM_PLAYERS];
PlayerOptions m_PlayerOptions[NUM_PLAYERS]; // The currently active options
PlayerOptions m_SelectedOptions[NUM_PLAYERS]; // Keep track of player-selected options for
// courses separately from the active options.
SongOptions m_SongOptions;
};
+9 -1
View File
@@ -518,8 +518,12 @@ void ScreenGameplay::LoadNextSong( bool bFirstLoad )
case PLAY_MODE_ENDLESS:
{
for( int p=0; p<NUM_PLAYERS; p++ )
{
m_textCourseSongNumber[p].SetText( ssprintf("%d", GAMESTATE->m_iSongsBeforeFail[p]+1) );
// If it's the first song, record the options the player selected for later.
if (GAMESTATE->m_iSongsIntoCourse == 0)
GAMESTATE->m_SelectedOptions[p] = GAMESTATE->m_PlayerOptions[p];
}
Course* pCourse = GAMESTATE->m_pCurCourse;
CArray<Song*,Song*> apSongs;
CArray<Notes*,Notes*> apNotes;
@@ -534,6 +538,10 @@ void ScreenGameplay::LoadNextSong( bool bFirstLoad )
for( p=0; p<NUM_PLAYERS; p++ )
{
GAMESTATE->m_pCurNotes[p] = apNotes[iPlaySongIndex];
// Wipe the options used on the last song (including course specified ones)
GAMESTATE->m_PlayerOptions[p].Init();
// Now restore the player's originally selected options.
GAMESTATE->m_PlayerOptions[p] = GAMESTATE->m_SelectedOptions[p];
if( asModifiers[iPlaySongIndex] != "" ) // some modifiers specified
GAMESTATE->m_PlayerOptions[p].FromString( asModifiers[iPlaySongIndex] ); // put them into effect
}