Simplify: ShowDanger is a Background preference, and should not

influence GameState.
This commit is contained in:
Glenn Maynard
2006-11-09 06:14:19 +00:00
parent 43b7c4ac7d
commit d0ce8aef5b
2 changed files with 2 additions and 4 deletions
+2 -2
View File
@@ -849,7 +849,7 @@ void BackgroundImpl::Update( float fDeltaTime )
FOREACH_PlayerNumber( p )
{
if( GAMESTATE->IsPlayerInDanger(GAMESTATE->m_pPlayerState[p]) )
if( PREFSMAN->m_bShowDanger && GAMESTATE->IsPlayerInDanger(GAMESTATE->m_pPlayerState[p]) )
m_DangerPlayer[p]->Update( fDeltaTime );
if( GAMESTATE->IsPlayerDead(GAMESTATE->m_pPlayerState[p]) )
@@ -910,7 +910,7 @@ void BackgroundImpl::DrawPrimitives()
FOREACH_PlayerNumber( p )
{
if( GAMESTATE->IsPlayerInDanger(GAMESTATE->m_pPlayerState[p]) )
if( PREFSMAN->m_bShowDanger && GAMESTATE->IsPlayerInDanger(GAMESTATE->m_pPlayerState[p]) )
m_DangerPlayer[p]->Draw();
if( GAMESTATE->IsPlayerDead(GAMESTATE->m_pPlayerState[p]) )
m_DeadPlayer[p]->Draw();
-2
View File
@@ -1742,8 +1742,6 @@ bool GameState::IsPlayerInDanger( const PlayerState *pPlayerState ) const
{
if( GetPlayerFailType(pPlayerState) == SongOptions::FAIL_OFF )
return false;
if( !PREFSMAN->m_bShowDanger )
return false;
return pPlayerState->m_HealthState == PlayerState::DANGER;
}