From 0a9f0df82a38ef92a180424588c0788eaa3f3748 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 7 Oct 2016 18:14:19 +1000 Subject: [PATCH] Silence a weapon entity warning when first connecting --- qcsrc/common/wepent.qc | 3 --- qcsrc/server/client.qc | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) 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; -- 2.39.2