HealthStateChanged
This commit is contained in:
@@ -1531,6 +1531,7 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
||||
{
|
||||
HealthState &hs = pi->GetPlayerState()->m_HealthState;
|
||||
HealthState OldHealthState = hs;
|
||||
if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != SongOptions::FAIL_OFF &&
|
||||
pi->m_pLifeMeter && pi->m_pLifeMeter->IsFailing() )
|
||||
{
|
||||
@@ -1549,6 +1550,14 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
{
|
||||
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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user