From f7a3566246498859899ede8f7c6be695083efc93 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 18 Jul 2017 09:25:57 +1000 Subject: [PATCH] Port hasweapon_complain_spam to ClientState --- qcsrc/server/client.qh | 1 + qcsrc/server/weapons/selection.qc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 752862cad..d24bc4aad 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -102,6 +102,7 @@ CLASS(Client, Object) ATTRIB(Client, v_angle_old, vector, this.v_angle_old); ATTRIB(Client, model_randomizer, float, this.model_randomizer); ATTRIB(Client, accuracy, entity, this.accuracy); + ATTRIB(Client, hasweapon_complain_spam, float, this.hasweapon_complain_spam); METHOD(Client, m_unwind, bool(Client this)); diff --git a/qcsrc/server/weapons/selection.qc b/qcsrc/server/weapons/selection.qc index 17ba0dc9d..6f3fd85a8 100644 --- a/qcsrc/server/weapons/selection.qc +++ b/qcsrc/server/weapons/selection.qc @@ -44,7 +44,7 @@ bool client_hasweapon(entity this, Weapon wpn, .entity weaponentity, float andam { float f = 0; - if (time < this.hasweapon_complain_spam) + if (time < CS(this).hasweapon_complain_spam) complain = 0; // ignore hook button when using other offhand equipment @@ -53,7 +53,7 @@ bool client_hasweapon(entity this, Weapon wpn, .entity weaponentity, float andam complain = 0; if (complain) - this.hasweapon_complain_spam = time + 0.2; + CS(this).hasweapon_complain_spam = time + 0.2; if (wpn == WEP_Null) { -- 2.39.2