]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Port hasweapon_complain_spam to ClientState
authorMario <mario@smbclan.net>
Mon, 17 Jul 2017 23:25:57 +0000 (09:25 +1000)
committerMario <mario@smbclan.net>
Mon, 17 Jul 2017 23:25:57 +0000 (09:25 +1000)
qcsrc/server/client.qh
qcsrc/server/weapons/selection.qc

index 752862cad9952f1230b4b49086af45a695c48214..d24bc4aad6b454a4d60dd428030479681b89cbb7 100644 (file)
@@ -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));
 
index 17ba0dc9dfafb4f1063e0f20f14b292f11856b56..6f3fd85a8d21795cc6acd8345cfed5ed7964f2e5 100644 (file)
@@ -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)
        {