Previously, BeginStage was called in SGameplay and FinishStage was called
in each place gameplay exits. This incremented the stage number in SSM, and was brittle: FinishStage was sprinkled in many odd places. Do both in SGameplay. This increments the stage number as soon as gameplay ends. This only affects evaluation. Use the stage number from StageStats there, instead of the current stage, and adjust branches. During evaluation, the game is on the upcoming stage and displaying old data for the last stage, instead of the stage continuing through evaluation. This also moves a bunch of scoring-related stuff out of SEvaluation, to the end of gameplay, where it belongs. Eval is almost const, and things won't break like they would before if Eval is not used.
This commit is contained in:
@@ -910,11 +910,7 @@ bool GameState::IsFinalStage() const
|
||||
if( IsCourseMode() )
|
||||
return true;
|
||||
|
||||
/* This changes dynamically on ScreenSelectMusic as the wheel turns. */
|
||||
int iPredictedStageForCurSong = GetNumStagesForCurrentSongAndStepsOrCourse();
|
||||
if( iPredictedStageForCurSong == -1 )
|
||||
iPredictedStageForCurSong = 1;
|
||||
return GetLargestCurrentStageIndexForAnyHumanPlayer() + iPredictedStageForCurSong == PREFSMAN->m_iSongsPerPlay;
|
||||
return GetLargestCurrentStageIndexForAnyHumanPlayer() == PREFSMAN->m_iSongsPerPlay - 1;
|
||||
}
|
||||
|
||||
bool GameState::IsAnExtraStage() const
|
||||
@@ -1202,8 +1198,8 @@ bool GameState::HasEarnedExtraStage() const
|
||||
m_pCurSteps[pn]->GetDifficulty() != Difficulty_Challenge )
|
||||
continue; /* not hard enough! */
|
||||
|
||||
if( (IsFinalStage() && STATSMAN->m_CurStageStats.m_player[pn].GetGrade() <= GRADE_TIER_FOR_EXTRA_1) ||
|
||||
(IsExtraStage() && STATSMAN->m_CurStageStats.m_player[pn].GetGrade() <= GRADE_TIER_FOR_EXTRA_2) )
|
||||
if( (IsExtraStage() && STATSMAN->m_CurStageStats.m_player[pn].GetGrade() <= GRADE_TIER_FOR_EXTRA_1) ||
|
||||
(IsExtraStage2() && STATSMAN->m_CurStageStats.m_player[pn].GetGrade() <= GRADE_TIER_FOR_EXTRA_2) )
|
||||
{
|
||||
bOnePassed = true;
|
||||
break;
|
||||
@@ -1214,7 +1210,7 @@ bool GameState::HasEarnedExtraStage() const
|
||||
return false;
|
||||
|
||||
/* If PickExtraStage, allow EX2 if the chosen song was correct. */
|
||||
if( PREFSMAN->m_bPickExtraStage && IsExtraStage() )
|
||||
if( PREFSMAN->m_bPickExtraStage && IsExtraStage2() )
|
||||
{
|
||||
Song* pSong;
|
||||
Steps* pSteps;
|
||||
|
||||
Reference in New Issue
Block a user