Backing out of the final stage prevents getting extra stage. Backing out of extra stage (or second extra stage) fails the stage.
This commit is contained in:
@@ -255,6 +255,8 @@ void GameState::Reset()
|
||||
m_stEditSource.Set( STEPS_TYPE_INVALID );
|
||||
m_iEditCourseEntryIndex.Set( -1 );
|
||||
|
||||
m_bBackedOutOfFinalStage = false;
|
||||
|
||||
ApplyCmdline();
|
||||
}
|
||||
|
||||
@@ -968,6 +970,9 @@ bool GameState::HasEarnedExtraStage() const
|
||||
if( this->m_PlayMode != PLAY_MODE_REGULAR )
|
||||
return false;
|
||||
|
||||
if( m_bBackedOutOfFinalStage )
|
||||
return false;
|
||||
|
||||
if( (this->IsFinalStage() || this->IsExtraStage()) )
|
||||
{
|
||||
FOREACH_EnabledPlayer( pn )
|
||||
|
||||
@@ -144,6 +144,7 @@ public:
|
||||
Course* m_pPreferredCourse;
|
||||
BroadcastOnChangePtr1D<Trail,NUM_PLAYERS> m_pCurTrail;
|
||||
|
||||
bool m_bBackedOutOfFinalStage;
|
||||
|
||||
//
|
||||
// Music statistics: Arcade: the current stage (one song). Oni/Endles: a single song in a course
|
||||
|
||||
@@ -1823,7 +1823,15 @@ void ScreenGameplay::BackOutFromGameplay()
|
||||
m_soundAssistTick.StopPlaying(); /* Stop any queued assist ticks. */
|
||||
|
||||
this->ClearMessageQueue();
|
||||
m_Cancel.StartTransitioning( SM_GoToScreenAfterBack );
|
||||
|
||||
// If this is the final stage, don't allow extra stage
|
||||
if( GAMESTATE->IsFinalStage() )
|
||||
GAMESTATE->m_bBackedOutOfFinalStage = true;
|
||||
// Disallow backing out of extra stage
|
||||
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||
SCREENMAN->PostMessageToTopScreen( SM_BeginFailed, 0 );
|
||||
else
|
||||
m_Cancel.StartTransitioning( SM_GoToScreenAfterBack );
|
||||
}
|
||||
|
||||
void ScreenGameplay::AbortGiveUp( bool bShowText )
|
||||
@@ -2288,7 +2296,6 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
float fMaxSurviveSeconds = 0;
|
||||
FOREACH_EnabledPlayer(p)
|
||||
fMaxSurviveSeconds = max( fMaxSurviveSeconds, STATSMAN->m_CurStageStats.m_player[p].fAliveSeconds );
|
||||
ASSERT( fMaxSurviveSeconds > 0 );
|
||||
m_textSurviveTime.SetText( "TIME: " + SecondsToMMSSMsMs(fMaxSurviveSeconds) );
|
||||
SET_XY_AND_ON_COMMAND( m_textSurviveTime );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user