Simplify: ShowDanger is a Background preference, and should not
influence GameState.
This commit is contained in:
@@ -849,7 +849,7 @@ void BackgroundImpl::Update( float fDeltaTime )
|
|||||||
|
|
||||||
FOREACH_PlayerNumber( p )
|
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 );
|
m_DangerPlayer[p]->Update( fDeltaTime );
|
||||||
|
|
||||||
if( GAMESTATE->IsPlayerDead(GAMESTATE->m_pPlayerState[p]) )
|
if( GAMESTATE->IsPlayerDead(GAMESTATE->m_pPlayerState[p]) )
|
||||||
@@ -910,7 +910,7 @@ void BackgroundImpl::DrawPrimitives()
|
|||||||
|
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
if( GAMESTATE->IsPlayerInDanger(GAMESTATE->m_pPlayerState[p]) )
|
if( PREFSMAN->m_bShowDanger && GAMESTATE->IsPlayerInDanger(GAMESTATE->m_pPlayerState[p]) )
|
||||||
m_DangerPlayer[p]->Draw();
|
m_DangerPlayer[p]->Draw();
|
||||||
if( GAMESTATE->IsPlayerDead(GAMESTATE->m_pPlayerState[p]) )
|
if( GAMESTATE->IsPlayerDead(GAMESTATE->m_pPlayerState[p]) )
|
||||||
m_DeadPlayer[p]->Draw();
|
m_DeadPlayer[p]->Draw();
|
||||||
|
|||||||
@@ -1742,8 +1742,6 @@ bool GameState::IsPlayerInDanger( const PlayerState *pPlayerState ) const
|
|||||||
{
|
{
|
||||||
if( GetPlayerFailType(pPlayerState) == SongOptions::FAIL_OFF )
|
if( GetPlayerFailType(pPlayerState) == SongOptions::FAIL_OFF )
|
||||||
return false;
|
return false;
|
||||||
if( !PREFSMAN->m_bShowDanger )
|
|
||||||
return false;
|
|
||||||
return pPlayerState->m_HealthState == PlayerState::DANGER;
|
return pPlayerState->m_HealthState == PlayerState::DANGER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user