give up if all human players have 30 misses so that battle will end early

This commit is contained in:
Chris Danford
2005-05-09 14:22:21 +00:00
parent bd5055455b
commit e734e00bcc
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1695,9 +1695,9 @@ bool GameState::AllAreDead() const
return true; return true;
} }
bool GameState::AllHaveComboOf30OrMoreMisses() const bool GameState::AllHumanHaveComboOf30OrMoreMisses() const
{ {
FOREACH_EnabledPlayer( p ) FOREACH_HumanPlayer( p )
if( STATSMAN->m_CurStageStats.m_player[p].iCurMissCombo < 30 ) if( STATSMAN->m_CurStageStats.m_player[p].iCurMissCombo < 30 )
return false; return false;
return true; return true;
+1 -1
View File
@@ -174,7 +174,7 @@ public:
bool IsPlayerDead( PlayerNumber pn ) const; bool IsPlayerDead( PlayerNumber pn ) const;
bool AllAreInDangerOrWorse() const; bool AllAreInDangerOrWorse() const;
bool AllAreDead() const; bool AllAreDead() const;
bool AllHaveComboOf30OrMoreMisses() const; bool AllHumanHaveComboOf30OrMoreMisses() const;
bool OneIsHot() const; bool OneIsHot() const;
// used in PLAY_MODE_BATTLE and PLAY_MODE_RAVE // used in PLAY_MODE_BATTLE and PLAY_MODE_RAVE
+1 -1
View File
@@ -1594,7 +1594,7 @@ void ScreenGameplay::Update( float fDeltaTime )
// update give up // update give up
// //
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->AllHumanHaveComboOf30OrMoreMisses() )
{ {
// Give up // Give up