diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 494a22808c..937e2cea81 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -196,7 +196,6 @@ void GameState::Reset() m_bDemonstrationOrJukebox = false; m_bJukeboxUsesModifiers = false; m_iCurrentStageIndex = 0; - m_bAllow2ndExtraStage = true; m_BeatToNoteSkinRev = 0; m_iNumStagesOfThisSong = 0; @@ -921,6 +920,18 @@ bool GameState::HasEarnedExtraStage() const if( m_bBackedOutOfFinalStage ) return false; + /* If PickExtraStage, allow EX2 if the chosen song was correct. */ + if( PREFSMAN->m_bPickExtraStage && this->IsExtraStage() ) + { + Song* pSong; + Steps* pSteps; + SONGMAN->GetExtraStageInfo( false, GAMESTATE->GetCurrentStyle(), pSong, pSteps, NULL, NULL ); + ASSERT(pSong); + + const StageStats &stats = STATSMAN->m_CurStageStats; + return stats.vpPlayedSongs.size() && stats.vpPlayedSongs.back() == pSong; + } + if( (this->IsFinalStage() || this->IsExtraStage()) ) { FOREACH_EnabledPlayer( pn ) @@ -929,11 +940,6 @@ bool GameState::HasEarnedExtraStage() const this->m_pCurSteps[pn]->GetDifficulty() != DIFFICULTY_CHALLENGE ) continue; /* not hard enough! */ - /* If "choose EX" is enabled, then we should only grant EX2 if the chosen - * stage was the EX we would have chosen (m_bAllow2ndExtraStage is true). */ - if( PREFSMAN->m_bPickExtraStage && this->IsExtraStage() && !this->m_bAllow2ndExtraStage ) - continue; - if( STATSMAN->m_CurStageStats.m_player[pn].GetGrade() <= Grade_Tier03 ) return true; } diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index 273a4e85dd..d5b1f6cb87 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -230,7 +230,6 @@ public: bool HasEarnedExtraStage() const; - bool m_bAllow2ndExtraStage; //only used when "Allow Selection of Extra Stage is on" // diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index ff5f742fc9..47014b4dc0 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -1243,21 +1243,6 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn ) StartTransitioning( SM_BeginFadingOut ); } } - - if( GAMESTATE->IsExtraStage() && PREFSMAN->m_bPickExtraStage ) - { - /* Check if user selected the real extra stage. */ - Song* pSong; - Steps* pSteps; - SONGMAN->GetExtraStageInfo( false, GAMESTATE->GetCurrentStyle(), pSong, pSteps, NULL, NULL ); - ASSERT(pSong); - - /* Enable 2nd extra stage if user chose the correct song */ - if( m_MusicWheel.GetSelectedSong() == pSong ) - GAMESTATE->m_bAllow2ndExtraStage = true; - else - GAMESTATE->m_bAllow2ndExtraStage = false; - } }