AllHumanHaveComboOf30OrMoreMisses -> GetMinimumMissCombo
This commit is contained in:
@@ -1722,7 +1722,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;
|
||||||
bool bAllHumanHaveComboOf30OrMoreMisses = STATSMAN->m_CurStageStats.AllHumanHaveComboOf30OrMoreMisses();
|
bool bAllHumanHaveComboOf30OrMoreMisses = STATSMAN->m_CurStageStats.GetMinimumMissCombo() >= 30;
|
||||||
if( bGiveUpTimerFired || (FAIL_AFTER_30_MISSES && bAllHumanHaveComboOf30OrMoreMisses) )
|
if( bGiveUpTimerFired || (FAIL_AFTER_30_MISSES && bAllHumanHaveComboOf30OrMoreMisses) )
|
||||||
{
|
{
|
||||||
STATSMAN->m_CurStageStats.m_bGaveUp = true;
|
STATSMAN->m_CurStageStats.m_bGaveUp = true;
|
||||||
|
|||||||
@@ -310,12 +310,12 @@ bool StageStats::PlayerHasHighScore( PlayerNumber pn ) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StageStats::AllHumanHaveComboOf30OrMoreMisses() const
|
int StageStats::GetMinimumMissCombo() const
|
||||||
{
|
{
|
||||||
|
int iMin = INT_MAX;
|
||||||
FOREACH_HumanPlayer( p )
|
FOREACH_HumanPlayer( p )
|
||||||
if( m_player[p].m_iCurMissCombo < 30 )
|
iMin = min( iMin, m_player[p].m_iCurMissCombo );
|
||||||
return false;
|
return iMin;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// lua start
|
// lua start
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
|
|
||||||
void CommitScores( bool bSummary );
|
void CommitScores( bool bSummary );
|
||||||
bool PlayerHasHighScore( PlayerNumber pn ) const;
|
bool PlayerHasHighScore( PlayerNumber pn ) const;
|
||||||
bool AllHumanHaveComboOf30OrMoreMisses() const;
|
int GetMinimumMissCombo() const;
|
||||||
|
|
||||||
// Lua
|
// Lua
|
||||||
void PushSelf( lua_State *L );
|
void PushSelf( lua_State *L );
|
||||||
|
|||||||
Reference in New Issue
Block a user