From 0d49080494a03e9a368b02b55de722061497a276 Mon Sep 17 00:00:00 2001 From: Angela Stefanski Date: Sun, 3 Nov 2002 20:17:28 +0000 Subject: [PATCH] Bug 632058 Fix - Oni Modifiers specified in .CRS files not being cleared after each song. --- stepmania/src/GameState.h | 5 +++-- stepmania/src/ScreenGameplay.cpp | 10 +++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index cf25a899dd..434514fc16 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -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; }; diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 2a23e09473..2cd3bce6ea 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -518,8 +518,12 @@ void ScreenGameplay::LoadNextSong( bool bFirstLoad ) case PLAY_MODE_ENDLESS: { for( int p=0; pm_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 apSongs; CArray apNotes; @@ -534,6 +538,10 @@ void ScreenGameplay::LoadNextSong( bool bFirstLoad ) for( p=0; pm_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 }