give up if all human players have 30 misses so that battle will end early
This commit is contained in:
@@ -1695,9 +1695,9 @@ bool GameState::AllAreDead() const
|
||||
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 )
|
||||
return false;
|
||||
return true;
|
||||
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
bool IsPlayerDead( PlayerNumber pn ) const;
|
||||
bool AllAreInDangerOrWorse() const;
|
||||
bool AllAreDead() const;
|
||||
bool AllHaveComboOf30OrMoreMisses() const;
|
||||
bool AllHumanHaveComboOf30OrMoreMisses() const;
|
||||
bool OneIsHot() const;
|
||||
|
||||
// used in PLAY_MODE_BATTLE and PLAY_MODE_RAVE
|
||||
|
||||
@@ -1594,7 +1594,7 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
// update give up
|
||||
//
|
||||
bool bGiveUpTimerFired = !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > 2.5f;
|
||||
if( bGiveUpTimerFired || GAMESTATE->AllHaveComboOf30OrMoreMisses() )
|
||||
if( bGiveUpTimerFired || GAMESTATE->AllHumanHaveComboOf30OrMoreMisses() )
|
||||
{
|
||||
// Give up
|
||||
|
||||
|
||||
Reference in New Issue
Block a user