From bc9ad191577d692a185f1b37c365abcfcb149f7a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 9 Nov 2006 09:21:52 +0000 Subject: [PATCH] simplify m_fPassmark. Use with FailAtEnd. --- stepmania/src/LifeMeterBar.cpp | 2 +- stepmania/src/ScreenGameplay.cpp | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/stepmania/src/LifeMeterBar.cpp b/stepmania/src/LifeMeterBar.cpp index aeda97bf38..a951c344cc 100644 --- a/stepmania/src/LifeMeterBar.cpp +++ b/stepmania/src/LifeMeterBar.cpp @@ -284,7 +284,7 @@ bool LifeMeterBar::IsInDanger() const bool LifeMeterBar::IsFailing() const { - return m_fLifePercentage <= 0; + return m_fLifePercentage <= m_pPlayerState->m_PlayerOptions.GetCurrent().m_fPassmark; } diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 1a788c0994..5e19d15b32 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -2317,16 +2317,6 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi ) { - /* If either player's passmark is enabled, check it. */ - if( pi->GetPlayerState()->m_PlayerOptions.GetCurrent().m_fPassmark > 0 && - pi->m_pLifeMeter && - pi->m_pLifeMeter->GetLife() < pi->GetPlayerState()->m_PlayerOptions.GetCurrent().m_fPassmark ) - { - LOG->Trace("Player %i failed: life %f is under %f", - pi->GetPlayerStateAndStageStatsIndex()+1, pi->m_pLifeMeter->GetLife(), pi->GetPlayerState()->m_PlayerOptions.GetCurrent().m_fPassmark ); - pi->GetPlayerStageStats()->bFailed = true; - } - /* Mark failure. */ if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != SongOptions::FAIL_OFF && (pi->m_pLifeMeter && pi->m_pLifeMeter->IsFailing()) )