This commit is contained in:
Night Owl 2017-07-05 03:56:48 +05:00
parent 9c85e5eb77
commit 9bb5cb2f05
1 changed files with 21 additions and 0 deletions

View File

@ -34,6 +34,7 @@ public:
void Spawn( void );
void Precache( void );
void UpdateOnRemove();
int Classify( void ) { return CLASS_ALIEN_MILITARY; };
int BloodColor( void ) { return BLOOD_COLOR_YELLOW; }
void Killed( entvars_t *pevAttacker, int iGib );
@ -345,6 +346,26 @@ void CNihilanth::Precache( void )
PRECACHE_SOUND( "debris/beamstart7.wav" );
}
void CNihilanth::UpdateOnRemove()
{
CBaseEntity::UpdateOnRemove();
if( m_pBall )
{
UTIL_Remove( m_pBall );
m_pBall = 0;
}
for( int i = 0; i < N_SPHERES, i++ )
{
if( CBaseEntity* pSphere = (CBaseEntity *)m_hSphere[i] )
{
UTIL_Remove( pSphere );
m_hSphere[i] = 0;
}
}
}
void CNihilanth::PainSound( void )
{
if( m_flNextPainSound > gpGlobals->time )