track whether player gave up, hide Barely if gave up

This commit is contained in:
Chris Danford
2005-05-09 10:12:03 +00:00
parent 17b6d15d79
commit f217e5f0f4
4 changed files with 14 additions and 5 deletions
+4 -4
View File
@@ -81,11 +81,11 @@ void GraphDisplay::LoadFromStageStats( const StageStats &ss, const PlayerStageSt
this->AddChild( *p ); this->AddChild( *p );
} }
// if( !pss.bFailed && !pss.bGaveUp )
// Search for the min life record
//
if( !pss.bFailed )
{ {
//
// Search for the min life record to show "Just Barely!"
//
float fMinLifeSoFar = 1.0f; float fMinLifeSoFar = 1.0f;
float fMinLifeSoFarAtSecond = 0; float fMinLifeSoFarAtSecond = 0;
FOREACHM_CONST( float, float, pss.fLifeRecord, i ) FOREACHM_CONST( float, float, pss.fLifeRecord, i )
+4 -1
View File
@@ -19,7 +19,9 @@ void PlayerStageStats::Init()
vpPlayedSteps.clear(); vpPlayedSteps.clear();
vpPossibleSteps.clear(); vpPossibleSteps.clear();
fAliveSeconds = 0; fAliveSeconds = 0;
bFailed = bFailedEarlier = false; bFailed = false;
bFailedEarlier = false;
bGaveUp = false;
iPossibleDancePoints = iCurPossibleDancePoints = iActualDancePoints = 0; iPossibleDancePoints = iCurPossibleDancePoints = iActualDancePoints = 0;
iCurCombo = iMaxCombo = iCurMissCombo = iScore = iBonus = iMaxScore = iCurMaxScore = 0; iCurCombo = iMaxCombo = iCurMissCombo = iScore = iBonus = iMaxScore = iCurMaxScore = 0;
iSongsPassed = iSongsPlayed = 0; iSongsPassed = iSongsPlayed = 0;
@@ -46,6 +48,7 @@ void PlayerStageStats::AddStats( const PlayerStageStats& other )
fAliveSeconds += other.fAliveSeconds; fAliveSeconds += other.fAliveSeconds;
bFailed |= other.bFailed; bFailed |= other.bFailed;
bFailedEarlier |= other.bFailedEarlier; bFailedEarlier |= other.bFailedEarlier;
bGaveUp |= other.bGaveUp;
iPossibleDancePoints += other.iPossibleDancePoints; iPossibleDancePoints += other.iPossibleDancePoints;
iActualDancePoints += other.iActualDancePoints; iActualDancePoints += other.iActualDancePoints;
iCurPossibleDancePoints += other.iCurPossibleDancePoints; iCurPossibleDancePoints += other.iCurPossibleDancePoints;
+1
View File
@@ -34,6 +34,7 @@ struct PlayerStageStats
/* This indicates whether the player bottomed out his bar/ran out of lives at some /* 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. */ * point during the song. It's set in all fail modes. */
bool bFailedEarlier; bool bFailedEarlier;
bool bGaveUp; // exited gameplay by giving up
int iPossibleDancePoints; int iPossibleDancePoints;
int iCurPossibleDancePoints; int iCurPossibleDancePoints;
int iActualDancePoints; int iActualDancePoints;
+5
View File
@@ -1596,6 +1596,11 @@ void ScreenGameplay::Update( float fDeltaTime )
bool bGiveUpTimerFired = !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > 2.5f; bool bGiveUpTimerFired = !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > 2.5f;
if( bGiveUpTimerFired || GAMESTATE->AllHaveComboOf30OrMoreMisses() ) if( bGiveUpTimerFired || GAMESTATE->AllHaveComboOf30OrMoreMisses() )
{ {
// Give up
FOREACH_PlayerNumber( p )
STATSMAN->m_CurStageStats.m_player[p].bGaveUp = true;
m_GiveUpTimer.SetZero(); m_GiveUpTimer.SetZero();
if( GIVING_UP_GOES_TO_PREV_SCREEN ) if( GIVING_UP_GOES_TO_PREV_SCREEN )