From: Mario Date: Fri, 7 Oct 2016 08:14:19 +0000 (+1000) Subject: Silence a weapon entity warning when first connecting X-Git-Tag: xonotic-v0.8.2~326^2~49 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0a9f0df82a38ef92a180424588c0788eaa3f3748;p=xonotic%2Fxonotic-data.pk3dir.git Silence a weapon entity warning when first connecting --- diff --git a/qcsrc/common/wepent.qc b/qcsrc/common/wepent.qc index bb9308424..886ff8796 100644 --- a/qcsrc/common/wepent.qc +++ b/qcsrc/common/wepent.qc @@ -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); } diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 1235f86bf..dc3951ee9 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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;