track whether player gave up, hide Barely if gave up
This commit is contained in:
@@ -81,11 +81,11 @@ void GraphDisplay::LoadFromStageStats( const StageStats &ss, const PlayerStageSt
|
||||
this->AddChild( *p );
|
||||
}
|
||||
|
||||
//
|
||||
// Search for the min life record
|
||||
//
|
||||
if( !pss.bFailed )
|
||||
if( !pss.bFailed && !pss.bGaveUp )
|
||||
{
|
||||
//
|
||||
// Search for the min life record to show "Just Barely!"
|
||||
//
|
||||
float fMinLifeSoFar = 1.0f;
|
||||
float fMinLifeSoFarAtSecond = 0;
|
||||
FOREACHM_CONST( float, float, pss.fLifeRecord, i )
|
||||
|
||||
@@ -19,7 +19,9 @@ void PlayerStageStats::Init()
|
||||
vpPlayedSteps.clear();
|
||||
vpPossibleSteps.clear();
|
||||
fAliveSeconds = 0;
|
||||
bFailed = bFailedEarlier = false;
|
||||
bFailed = false;
|
||||
bFailedEarlier = false;
|
||||
bGaveUp = false;
|
||||
iPossibleDancePoints = iCurPossibleDancePoints = iActualDancePoints = 0;
|
||||
iCurCombo = iMaxCombo = iCurMissCombo = iScore = iBonus = iMaxScore = iCurMaxScore = 0;
|
||||
iSongsPassed = iSongsPlayed = 0;
|
||||
@@ -46,6 +48,7 @@ void PlayerStageStats::AddStats( const PlayerStageStats& other )
|
||||
fAliveSeconds += other.fAliveSeconds;
|
||||
bFailed |= other.bFailed;
|
||||
bFailedEarlier |= other.bFailedEarlier;
|
||||
bGaveUp |= other.bGaveUp;
|
||||
iPossibleDancePoints += other.iPossibleDancePoints;
|
||||
iActualDancePoints += other.iActualDancePoints;
|
||||
iCurPossibleDancePoints += other.iCurPossibleDancePoints;
|
||||
|
||||
@@ -34,6 +34,7 @@ struct PlayerStageStats
|
||||
/* This indicates whether the player bottomed out his bar/ran out of lives at some
|
||||
* point during the song. It's set in all fail modes. */
|
||||
bool bFailedEarlier;
|
||||
bool bGaveUp; // exited gameplay by giving up
|
||||
int iPossibleDancePoints;
|
||||
int iCurPossibleDancePoints;
|
||||
int iActualDancePoints;
|
||||
|
||||
@@ -1596,6 +1596,11 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
bool bGiveUpTimerFired = !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > 2.5f;
|
||||
if( bGiveUpTimerFired || GAMESTATE->AllHaveComboOf30OrMoreMisses() )
|
||||
{
|
||||
// Give up
|
||||
|
||||
FOREACH_PlayerNumber( p )
|
||||
STATSMAN->m_CurStageStats.m_player[p].bGaveUp = true;
|
||||
|
||||
m_GiveUpTimer.SetZero();
|
||||
|
||||
if( GIVING_UP_GOES_TO_PREV_SCREEN )
|
||||
|
||||
Reference in New Issue
Block a user