mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-23 20:21:08 +03:00
Move npc_metropolice enemy kill concept to Event_KilledOther()
This commit is contained in:
parent
10f08829e5
commit
b055d77663
@ -534,10 +534,12 @@ void CNPC_MetroPolice::OnScheduleChange()
|
||||
{
|
||||
BaseClass::OnScheduleChange();
|
||||
|
||||
#ifndef MAPBASE // Moved to Event_KilledOther()
|
||||
if ( GetEnemy() && HasCondition( COND_ENEMY_DEAD ) )
|
||||
{
|
||||
AnnounceEnemyKill( GetEnemy() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -3722,6 +3724,21 @@ void CNPC_MetroPolice::Event_Killed( const CTakeDamageInfo &info )
|
||||
BaseClass::Event_Killed( info );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
void CNPC_MetroPolice::Event_KilledOther( CBaseEntity *pVictim, const CTakeDamageInfo &info )
|
||||
{
|
||||
BaseClass::Event_KilledOther( pVictim, info );
|
||||
|
||||
#ifdef MAPBASE // Moved from OnScheduleChange()
|
||||
if ( pVictim && (pVictim->IsPlayer() || pVictim->IsNPC()) )
|
||||
{
|
||||
AnnounceEnemyKill( pVictim );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Try to enter a slot where we shoot a pistol
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -79,6 +79,8 @@ public:
|
||||
|
||||
virtual void Event_Killed( const CTakeDamageInfo &info );
|
||||
|
||||
virtual void Event_KilledOther( CBaseEntity *pVictim, const CTakeDamageInfo &info );
|
||||
|
||||
virtual void OnScheduleChange();
|
||||
|
||||
float GetIdealAccel( void ) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user