]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a safety check incase net_sendentity doesn't exist, remove references to getSendE...
authorMario <mario.mario@y7mail.com>
Fri, 1 Jul 2022 15:53:34 +0000 (01:53 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 1 Jul 2022 15:53:34 +0000 (01:53 +1000)
qcsrc/common/mapobjects/subs.qc
qcsrc/lib/net.qh
qcsrc/server/items/items.qc
qcsrc/server/weapons/csqcprojectile.qc

index c0b137404c55956d1fa509f697a23e1452c6676e..a7e7c3edb9d974461dc7308092ce6e5c980e6422 100644 (file)
@@ -512,7 +512,7 @@ void LODmodel_attach(entity this)
        }
 
        if(this.lodmodelindex1)
-               if (!getSendEntity(this))
+               if (!this.net_sendentity)
                        SetCustomizer(this, LOD_customize, LOD_uncustomize);
 }
 
index 7f44a959d866161dc2443755aa97c138c5c43166..a45f62a1bc67c049da39c4fb5865c01c7d16d770 100644 (file)
@@ -122,7 +122,7 @@ STATIC_INIT(C2S_Protocol_renumber) { FOREACH(C2S_Protocol, true, it.m_id = i); }
        bool Net_SendEntity(entity to, int sendflags)
        {
                ENGINE_EVENT();
-               return this.net_sendentity(this, to, sendflags);
+               return (this.net_sendentity) ? this.net_sendentity(this, to, sendflags) : false;
        }
 
        void Net_LinkEntity(entity e, bool docull, bool checkmodel, float dt, bool(entity this, entity to, int sendflags) sendfunc)
index 7d1c46f3f30b7c5a8dbcedb66d10580994aa3f27..b0eac54f50e1e4f7e3831dd0c0105821e1a24e90 100644 (file)
@@ -91,7 +91,7 @@ void ItemUpdate(entity this)
 
 void UpdateItemAfterTeleport(entity this)
 {
-       if(getSendEntity(this) == ItemSend)
+       if(this.net_sendentity == ItemSend)
                ItemUpdate(this);
 }
 
index 7170d3ed619080e13e555f5462f00d4653b712bc..6c3addcc0f4364a42bdea32bd97ea711d715c40a 100644 (file)
@@ -98,13 +98,13 @@ void CSQCProjectile(entity e, float clientanimate, int type, float docull)
 
 void UpdateCSQCProjectile(entity e)
 {
-       if(getSendEntity(e) == CSQCProjectile_SendEntity)
+       if(e.net_sendentity == CSQCProjectile_SendEntity)
        {
                // send new origin data
                e.SendFlags |= 0x01;
        }
 // FIXME HACK
-       else if(getSendEntity(e) == ItemSend)
+       else if(e.net_sendentity == ItemSend)
        {
                ItemUpdate(e);
        }
@@ -113,7 +113,7 @@ void UpdateCSQCProjectile(entity e)
 
 void UpdateCSQCProjectileAfterTeleport(entity e)
 {
-       if(getSendEntity(e) == CSQCProjectile_SendEntity)
+       if(e.net_sendentity == CSQCProjectile_SendEntity)
        {
                // send new origin data
                e.SendFlags |= 0x01;