diff --git a/dlls/nihilanth.cpp b/dlls/nihilanth.cpp index 479a2b34..82b31e13 100644 --- a/dlls/nihilanth.cpp +++ b/dlls/nihilanth.cpp @@ -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 )