remove DangerPlayer. Use HealthStateChanged.
This commit is contained in:
@@ -118,7 +118,6 @@ protected:
|
||||
float m_fLastMusicSeconds;
|
||||
bool m_bDangerAllWasVisible;
|
||||
|
||||
AutoActor m_DangerPlayer[NUM_PLAYERS];
|
||||
|
||||
// cover up the edge of animations that might hang outside of the background rectangle
|
||||
Quad m_quadBorderLeft, m_quadBorderTop, m_quadBorderRight, m_quadBorderBottom;
|
||||
@@ -195,9 +194,6 @@ void BackgroundImpl::Init()
|
||||
}
|
||||
}
|
||||
|
||||
FOREACH_PlayerNumber( p )
|
||||
m_DangerPlayer[p].Load( THEME->GetPathB("ScreenGameplay",ssprintf("danger p%d",p+1)) );
|
||||
|
||||
bool bOneOrMoreChars = false;
|
||||
bool bShowingBeginnerHelper = false;
|
||||
FOREACH_HumanPlayer( p )
|
||||
@@ -533,11 +529,6 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
|
||||
|
||||
TEXTUREMAN->DisableOddDimensionWarning();
|
||||
|
||||
const float fXZoom = RECT_BACKGROUND.GetWidth() / (float)SCREEN_WIDTH;
|
||||
const float fYZoom = RECT_BACKGROUND.GetHeight() / (float)SCREEN_HEIGHT;
|
||||
|
||||
|
||||
|
||||
if( !g_bSongBackgrounds )
|
||||
{
|
||||
/* Backgrounds are disabled; just display the song background. */
|
||||
@@ -673,15 +664,6 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
|
||||
// Re-sort.
|
||||
BackgroundUtil::SortBackgroundChangesArray( mainlayer.m_aBGChanges );
|
||||
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
m_DangerPlayer[p]->SetXY( (float)LEFT_EDGE, (float)TOP_EDGE );
|
||||
m_DangerPlayer[p]->SetZoomX( fXZoom );
|
||||
m_DangerPlayer[p]->SetZoomY( fYZoom );
|
||||
m_DangerPlayer[p]->FinishTweening();
|
||||
m_DangerPlayer[p]->PlayCommand( "On" );
|
||||
}
|
||||
|
||||
TEXTUREMAN->EnableOddDimensionWarning();
|
||||
|
||||
if( m_pDancingCharacters )
|
||||
@@ -828,12 +810,6 @@ void BackgroundImpl::Update( float fDeltaTime )
|
||||
m_bDangerAllWasVisible = bVisible;
|
||||
}
|
||||
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
if( g_bShowDanger && GAMESTATE->m_pPlayerState[p]->m_HealthState == HealthState_Danger )
|
||||
m_DangerPlayer[p]->Update( fDeltaTime );
|
||||
}
|
||||
|
||||
if( m_pDancingCharacters )
|
||||
m_pDancingCharacters->Update( fDeltaTime );
|
||||
|
||||
@@ -869,12 +845,6 @@ void BackgroundImpl::DrawPrimitives()
|
||||
if( layer.m_pFadingBGA )
|
||||
layer.m_pFadingBGA->Draw();
|
||||
}
|
||||
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
if( g_bShowDanger && GAMESTATE->m_pPlayerState[p]->m_HealthState == PlayerState::DANGER )
|
||||
m_DangerPlayer[p]->Draw();
|
||||
}
|
||||
}
|
||||
|
||||
if( m_pDancingCharacters )
|
||||
|
||||
Reference in New Issue
Block a user