//----------------------------------------------------------------------------- // Purpose: Sets up entity for removal at the end of this frame. //----------------------------------------------------------------------------- void CBaseEntity::Remove( void ) { if ( !m_bKillMe ) { m_bKillMe = true; UpdateOnRemove(); } }
/* <183f38> ../cstrike/dlls/subs.cpp:120 */ void CBaseEntity::SUB_Remove(void) { UpdateOnRemove(); if (pev->health > 0) { pev->health = 0; ALERT(at_aiconsole, "SUB_Remove called on entity with health > 0\n"); } REMOVE_ENTITY(ENT(pev)); }
// Convenient way to delay removing oneself void CBaseEntity :: SUB_Remove( void ) { UpdateOnRemove(); if (pev->health > 0) { // this situation can screw up monsters who can't tell their entity pointers are invalid. pev->health = 0; ALERT( at_aiconsole, "SUB_Remove called on entity with health > 0\n"); } REMOVE_ENTITY(ENT(pev)); }