mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-24 12:41:09 +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();
|
BaseClass::OnScheduleChange();
|
||||||
|
|
||||||
|
#ifndef MAPBASE // Moved to Event_KilledOther()
|
||||||
if ( GetEnemy() && HasCondition( COND_ENEMY_DEAD ) )
|
if ( GetEnemy() && HasCondition( COND_ENEMY_DEAD ) )
|
||||||
{
|
{
|
||||||
AnnounceEnemyKill( GetEnemy() );
|
AnnounceEnemyKill( GetEnemy() );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3722,6 +3724,21 @@ void CNPC_MetroPolice::Event_Killed( const CTakeDamageInfo &info )
|
|||||||
BaseClass::Event_Killed( 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
|
// 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_Killed( const CTakeDamageInfo &info );
|
||||||
|
|
||||||
|
virtual void Event_KilledOther( CBaseEntity *pVictim, const CTakeDamageInfo &info );
|
||||||
|
|
||||||
virtual void OnScheduleChange();
|
virtual void OnScheduleChange();
|
||||||
|
|
||||||
float GetIdealAccel( void ) const;
|
float GetIdealAccel( void ) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user