NSEntity: add Disappear() method. Mods that used Hide() to remove an entity from the active game will have to switch to this instead.
This commit is contained in:
parent
7a252ad213
commit
267a956ec9
2 changed files with 11 additions and 3 deletions
|
@ -171,10 +171,14 @@ class NSEntity:NSTrigger
|
|||
nonvirtual void(void) ReleaseThink;
|
||||
nonvirtual void(void) ClearVelocity;
|
||||
|
||||
/* drawing related */
|
||||
virtual void(void) Show;
|
||||
virtual void(void) Hide;
|
||||
nonvirtual bool(void) IsHidden;
|
||||
|
||||
/* this will not just hide an entity, it'll make it disappear from the game, but not deallocated it */
|
||||
virtual void(void) Disappear;
|
||||
|
||||
virtual void(string, string) SpawnKey;
|
||||
virtual void(void) Destroy;
|
||||
virtual void(void) UpdateBounds;
|
||||
|
|
|
@ -242,9 +242,6 @@ NSEntity::EndTouch(entity eToucher)
|
|||
void
|
||||
NSEntity::_TouchHandler(void)
|
||||
{
|
||||
if (IsHidden() == true)
|
||||
return;
|
||||
|
||||
#ifdef SERVER
|
||||
if (g_grMode.IsTeamplay())
|
||||
if (m_iTeam > 0i)
|
||||
|
@ -1117,6 +1114,13 @@ NSEntity::IsHidden(void)
|
|||
return (effects & EF_NODRAW) ? true : false;
|
||||
}
|
||||
|
||||
void
|
||||
NSEntity::Disappear(void)
|
||||
{
|
||||
modelindex = 0;
|
||||
solid = SOLID_NOT;
|
||||
}
|
||||
|
||||
void
|
||||
NSEntity::MakeStatic(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue