]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Silence a weapon entity warning when first connecting
authorMario <mario@smbclan.net>
Fri, 7 Oct 2016 08:14:19 +0000 (18:14 +1000)
committerMario <mario@smbclan.net>
Fri, 7 Oct 2016 08:14:19 +0000 (18:14 +1000)
qcsrc/common/wepent.qc
qcsrc/server/client.qc

index bb9308424c94e1e9d7ae7ebbb47bf77d1792fa1a..886ff879633d2f2dd4e5d8c45c69e0fdf6f8bc34 100644 (file)
@@ -150,10 +150,7 @@ MACRO_END
        NET_HANDLE(ENT_CLIENT_WEPENT, bool isnew)
        {
                if (isnew)
-               {
-                       make_pure(this);
                        this.classname = "wepent_receiver";
-               }
                return ReadWepent(this);
        }
 
index 1235f86bfd35496adec39f5d83db76b06af8e740..dc3951ee9f968b34ffa4106a5294fd24c3e7588d 100644 (file)
@@ -339,6 +339,8 @@ void PutObserverInServer(entity this)
        this.weaponmodel = "";
        for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
        {
+               if(!this.weaponentities[slot])
+                       continue; // first load
                this.weaponentities[slot].hook_time = 0;
                this.weaponentities[slot].weaponname = "";
                this.weaponentities[slot] = NULL;