HealthStateChanged
This commit is contained in:
@@ -1531,6 +1531,7 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
||||||
{
|
{
|
||||||
HealthState &hs = pi->GetPlayerState()->m_HealthState;
|
HealthState &hs = pi->GetPlayerState()->m_HealthState;
|
||||||
|
HealthState OldHealthState = hs;
|
||||||
if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != SongOptions::FAIL_OFF &&
|
if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != SongOptions::FAIL_OFF &&
|
||||||
pi->m_pLifeMeter && pi->m_pLifeMeter->IsFailing() )
|
pi->m_pLifeMeter && pi->m_pLifeMeter->IsFailing() )
|
||||||
{
|
{
|
||||||
@@ -1550,6 +1551,14 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
hs = HealthState_Alive;
|
hs = HealthState_Alive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( hs != OldHealthState )
|
||||||
|
{
|
||||||
|
Message msg( "HealthStateChanged" );
|
||||||
|
msg.SetParam( "PlayerNumber", pi->m_pn );
|
||||||
|
msg.SetParam( "HealthState", hs );
|
||||||
|
MESSAGEMAN->Broadcast( msg );
|
||||||
|
}
|
||||||
|
|
||||||
pi->m_SoundEffectControl.Update( fDeltaTime );
|
pi->m_SoundEffectControl.Update( fDeltaTime );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user