move AllFailedEarlier into StageStats
This commit is contained in:
@@ -1013,14 +1013,6 @@ float ScreenGameplay::StartPlayingSong(float MinTimeToNotes, float MinTimeToMusi
|
||||
return fFirstSecond - fStartSecond;
|
||||
}
|
||||
|
||||
bool ScreenGameplay::AllFailedEarlier() const
|
||||
{
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
if( GAMESTATE->IsPlayerEnabled(p) && !g_CurStageStats.bFailedEarlier[p] )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// play assist ticks
|
||||
bool ScreenGameplay::IsTimeToPlayTicks() const
|
||||
{
|
||||
@@ -1380,7 +1372,7 @@ void ScreenGameplay::UpdateCheckFail()
|
||||
if( GAMESTATE->m_SongOptions.m_LifeType == SongOptions::LIFE_BATTERY &&
|
||||
GAMESTATE->m_SongOptions.m_FailType == SongOptions::FAIL_ARCADE )
|
||||
{
|
||||
if( !AllFailedEarlier() ) // if not the last one to fail
|
||||
if( !g_CurStageStats.AllFailedEarlier() ) // if not the last one to fail
|
||||
{
|
||||
// kill them!
|
||||
m_soundOniDie.PlayRandom();
|
||||
|
||||
@@ -78,7 +78,6 @@ protected:
|
||||
float StartPlayingSong(float MinTimeToNotes, float MinTimeToMusic);
|
||||
void ShowSavePrompt( ScreenMessage SM_SendWhenDone );
|
||||
|
||||
bool AllFailedEarlier() const;
|
||||
bool IsTimeToPlayTicks() const;
|
||||
void UpdateLyrics( float fDeltaTime );
|
||||
void UpdateCheckFail();
|
||||
|
||||
@@ -224,6 +224,14 @@ bool StageStats::AllFailed() const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool StageStats::AllFailedEarlier() const
|
||||
{
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
if( GAMESTATE->IsPlayerEnabled(p) && !bFailedEarlier[p] )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
float StageStats::GetPercentDancePoints( PlayerNumber pn ) const
|
||||
{
|
||||
if( iPossibleDancePoints[pn] == 0 )
|
||||
|
||||
@@ -28,6 +28,7 @@ struct StageStats
|
||||
Grade GetGrade( PlayerNumber pn ) const;
|
||||
bool OnePassed() const;
|
||||
bool AllFailed() const;
|
||||
bool AllFailedEarlier() const;
|
||||
float GetPercentDancePoints( PlayerNumber pn ) const;
|
||||
|
||||
PlayMode playMode;
|
||||
|
||||
Reference in New Issue
Block a user