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:
Marco Cawthorne 2022-08-27 11:20:38 -07:00
parent 7a252ad213
commit 267a956ec9
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
2 changed files with 11 additions and 3 deletions

View File

@ -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;

View File

@ -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)
{