From 069557f35007b2ae8712b2a93f413a34fab34685 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Fri, 22 Sep 2023 14:38:52 -0700 Subject: [PATCH] func_wall/func_illusionary: get rid of this optimisation that messes with odd world data --- src/gs-entbase/shared/func_illusionary.qc | 51 ++------------------ src/gs-entbase/shared/func_wall.qc | 57 ++--------------------- 2 files changed, 7 insertions(+), 101 deletions(-) diff --git a/src/gs-entbase/shared/func_illusionary.qc b/src/gs-entbase/shared/func_illusionary.qc index 2aea943e..c0f7f80a 100644 --- a/src/gs-entbase/shared/func_illusionary.qc +++ b/src/gs-entbase/shared/func_illusionary.qc @@ -27,32 +27,20 @@ On idTech 2 BSPs, it will change texture variants when triggered. # TRIVIA This entity was introduced in Quake (1996). */ +#ifdef SERVER class func_illusionary:NSRenderableEntity { public: void func_illusionary(void); -#ifdef SERVER virtual void Respawn(void); - virtual float SendEntity(entity,float); virtual void Trigger(entity, triggermode_t); -#else - virtual void Init(void); -#endif }; -#ifdef SERVER -/* we're overriding SendEntity so that we don't network func_illusionarys - * without a targetname. They'll never experience gameplay changes - * and therefore can be handled fully client-side */ -float -func_illusionary::SendEntity(entity pvsent, float fl) +void +func_illusionary::func_illusionary(void) { - if ((GetRenderMode() != RM_NORMAL) || HasTargetname()) - return super::SendEntity(pvsent, fl); - else - return (0); } void @@ -89,37 +77,4 @@ func_illusionary::Respawn(void) SetSkin(0); } } -#else - -void -func_illusionary::Init(void) -{ - super::Init(); - - /* this entity is being controlled by the server, remove it */ - if ((GetRenderMode() != RM_NORMAL) || (targetname)) { - Destroy(); - return; - } - - precache_model(model); - SetModel(model); - SetOrigin(origin); - SetAngles([0,0,0]); - SetMovetype(MOVETYPE_NONE); - SetSolid(SOLID_NOT); - - if (skin == -1 && m_iRenderMode == RM_TEXTURE) - Hide(); - - MakeStatic(); -} #endif - -void -func_illusionary::func_illusionary(void) -{ -#ifdef CLIENT - isCSQC = true; -#endif -} diff --git a/src/gs-entbase/shared/func_wall.qc b/src/gs-entbase/shared/func_wall.qc index ac1f53cf..a92d328a 100644 --- a/src/gs-entbase/shared/func_wall.qc +++ b/src/gs-entbase/shared/func_wall.qc @@ -28,34 +28,21 @@ On idTech 2 BSPs, it will change texture variants when triggered. This entity was introduced in Quake (1996). */ +#ifdef SERVER class func_wall:NSRenderableEntity { public: void func_wall(void); -#ifdef SERVER virtual void Respawn(void); - virtual float SendEntity(entity,float); virtual void Trigger(entity, triggermode_t); -#else - virtual void Init(void); - virtual bool CanSpawn(bool); -#endif }; -#ifdef SERVER -/* we're overriding SendEntity so that we don't network func_walls - * without a targetname. They'll never experience gameplay changes - * and therefore can be handled fully client-side */ -float -func_wall::SendEntity(entity pvsent, float fl) +void +func_wall::func_wall(void) { - /* if we have a target name, act norm */ - if ((GetRenderMode() != RM_NORMAL) || (targetname)) - return super::SendEntity(pvsent, fl); - else - return (0); + } void @@ -87,43 +74,7 @@ func_wall::Respawn(void) SetFrame(0); ClearAngles(); } -#else - -bool -func_wall::CanSpawn(bool clientSide) -{ - return true; -} - -void -func_wall::Init(void) -{ - super::Init(); - - /* this entity is being controlled by the server, remove it */ - if ((GetRenderMode() != RM_NORMAL) && (targetname)) { - Destroy(); - return; - } - - precache_model(model); - SetModel(model); - SetOrigin(origin); - SetAngles([0,0,0]); - SetMovetype(MOVETYPE_NONE); - SetSolid(SOLID_BSP); - - MakeStatic(); -} #endif -void -func_wall::func_wall(void) -{ -#ifdef CLIENT - isCSQC = true; -#endif -} - /* temporary */ CLASSEXPORT(func_reflective_glass, func_wall) \ No newline at end of file