diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index ebd9c1e9ab..5a4d3c179a 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1630,11 +1630,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) /* If all players have *really* failed (bFailed, not the life meter or * bFailedEarlier): */ - bool bAllReallyFailed = true; - for( p=0; pIsPlayerEnabled(PlayerNumber(p)) ) - if( !GAMESTATE->m_CurStageStats.bFailed[p] ) - bAllReallyFailed = false; + const bool bAllReallyFailed = GAMESTATE->m_CurStageStats.AllFailed(); if( !bAllReallyFailed && !IsLastSong() ) { diff --git a/stepmania/src/StageStats.cpp b/stepmania/src/StageStats.cpp index dfecef28f5..a3f188a3bb 100644 --- a/stepmania/src/StageStats.cpp +++ b/stepmania/src/StageStats.cpp @@ -145,6 +145,15 @@ bool StageStats::OnePassed() const return false; } +bool StageStats::AllFailed() const +{ + for( int pn=0; pnIsPlayerEnabled(PlayerNumber(pn)) ) + if( !GAMESTATE->m_CurStageStats.bFailed[pn] ) + return false; + return true; +} + float StageStats::GetPercentDancePoints( PlayerNumber pn ) const { if( iPossibleDancePoints[pn] == 0 ) diff --git a/stepmania/src/StageStats.h b/stepmania/src/StageStats.h index d7e1152888..a061ac3a23 100644 --- a/stepmania/src/StageStats.h +++ b/stepmania/src/StageStats.h @@ -25,6 +25,7 @@ struct StageStats void AddStats( const StageStats& other ); // accumulate Grade GetGrade( PlayerNumber pn ); bool OnePassed() const; + bool AllFailed() const; float GetPercentDancePoints( PlayerNumber pn ) const; Song* pSong;