From: Mario Date: Mon, 17 Jul 2017 23:25:57 +0000 (+1000) Subject: Port hasweapon_complain_spam to ClientState X-Git-Tag: xonotic-v0.8.5~2572 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f7a3566246498859899ede8f7c6be695083efc93;p=xonotic%2Fxonotic-data.pk3dir.git Port hasweapon_complain_spam to ClientState --- 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) {