Server: Don't network RM_TRIGGER ents unless the developer cvar is 1.

This commit is contained in:
Marco Cawthorne 2021-05-09 10:03:10 +02:00
parent e0a2f47f4d
commit 29e0e82f48
2 changed files with 6 additions and 16 deletions

View file

@ -35,7 +35,6 @@ class CBaseEntity
virtual void(float flChanged) ReceiveEntity;
virtual float(void) predraw;
virtual void(void) postdraw;
virtual void(void) customphysics;
#endif
#ifdef SERVER

View file

@ -335,21 +335,6 @@ CBaseEntity::postdraw(void)
{
}
void
CBaseEntity::customphysics(void)
{
if (movetype == MOVETYPE_PUSH)
setorigin(this, origin + (velocity * clframetime));
/* support for think/nextthink */
if (think && nextthink > 0.0f) {
if (nextthink < time) {
nextthink = 0.0f;
think();
}
}
}
void
CBaseEntity::Init(void)
{
@ -434,10 +419,16 @@ CBaseEntity::SendEntity(entity ePEnt, float fChanged)
fChanged &= ~BASEFL_CHANGED_SOLID;
if (movetype == MOVETYPE_NONE)
fChanged &= ~BASEFL_CHANGED_MOVETYPE;
#ifdef GS_RENDERFX
if (m_iRenderMode == RM_NORMAL)
fChanged &= ~BASEFL_CHANGED_RENDERMODE;
#endif
}
/* don't network triggers unless provoked */
if (cvar("developer") == 0 && m_iRenderMode == RM_TRIGGER)
return FALSE;
#ifdef GS_RENDERFX
/* let's not waste networking power on certain render-modes where they would
* not apply anyway. this seems sensible enough. */