From 31534db436a67ddf9f9a9078986ea908f4e84e96 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 9 Nov 2006 06:26:28 +0000 Subject: [PATCH] if FAIL_OFF, don't set DANGER or DEAD. This means GameState::AllAreInDangerOrWorse is always false in FAIL_OFF; if emptying the lifebar doesn't fail you, you're not in danger from it. --- stepmania/src/GameState.cpp | 4 ---- stepmania/src/ScreenGameplay.cpp | 6 ++++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 5adc718e26..2e72beb46b 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -1740,15 +1740,11 @@ Premium GameState::GetPremium() const bool GameState::IsPlayerInDanger( const PlayerState *pPlayerState ) const { - if( GetPlayerFailType(pPlayerState) == SongOptions::FAIL_OFF ) - return false; return pPlayerState->m_HealthState == PlayerState::DANGER; } bool GameState::IsPlayerDead( const PlayerState *pPlayerState ) const { - if( GetPlayerFailType(pPlayerState) == SongOptions::FAIL_OFF ) - return false; return pPlayerState->m_HealthState == PlayerState::DEAD; } diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 3ddeb3a2df..a83d174edc 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1572,7 +1572,8 @@ void ScreenGameplay::Update( float fDeltaTime ) // FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi ) { - if( pi->m_pLifeMeter && pi->m_pLifeMeter->IsFailing() ) + if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != SongOptions::FAIL_OFF && + pi->m_pLifeMeter && pi->m_pLifeMeter->IsFailing() ) { pi->GetPlayerState()->m_HealthState = PlayerState::DEAD; } @@ -1580,7 +1581,8 @@ void ScreenGameplay::Update( float fDeltaTime ) { pi->GetPlayerState()->m_HealthState = PlayerState::HOT; } - else if( pi->m_pLifeMeter && pi->m_pLifeMeter->IsInDanger() ) + else if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != SongOptions::FAIL_OFF && + pi->m_pLifeMeter && pi->m_pLifeMeter->IsInDanger() ) { pi->GetPlayerState()->m_HealthState = PlayerState::DANGER; }