]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Port taunt_soundtime to ClientState
authorMario <mario@smbclan.net>
Sat, 15 Jul 2017 22:07:26 +0000 (08:07 +1000)
committerMario <mario@smbclan.net>
Sat, 15 Jul 2017 22:07:26 +0000 (08:07 +1000)
qcsrc/server/client.qc
qcsrc/server/client.qh
qcsrc/server/g_damage.qc

index 296e8c03f26f612beb71f8c4c3de11dad7a8f6f1..9f138abd1fb9db4350d1d622abc3a8740de04d52 100644 (file)
@@ -2606,8 +2606,8 @@ void PlayerPreThink (entity this)
                e.pusher = oldpusher;
        }
 
-       if (this.taunt_soundtime && time > this.taunt_soundtime) {
-               this.taunt_soundtime = 0;
+       if (CS(this).taunt_soundtime && time > CS(this).taunt_soundtime) {
+               CS(this).taunt_soundtime = 0;
                PlayerSound(this, playersound_taunt, CH_VOICE, VOL_BASEVOICE, VOICETYPE_AUTOTAUNT);
        }
 
index b6f3abd69f6e1155194e31bf19f6bf81297ed472..b8131d86bf366856274d9834368453875b25e9de 100644 (file)
@@ -87,6 +87,7 @@ CLASS(Client, Object)
     ATTRIB(Client, netname_previous, string, this.netname_previous);
     ATTRIB(Client, allowed_timeouts, int, this.allowed_timeouts);
     ATTRIB(Client, active_minigame, entity, this.active_minigame);
+    ATTRIB(Client, taunt_soundtime, float, this.taunt_soundtime);
 
     METHOD(Client, m_unwind, bool(Client this));
 
index a2fbaf9c37257d76f0ee3faa6396665623a05043..4c294f6ffaa2735bd23e3c33d2ab73c192abbd4d 100644 (file)
@@ -372,7 +372,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
                        LogDeath("frag", deathtype, attacker, targ);
                        GiveFrags(attacker, targ, 1, deathtype);
 
-                       attacker.taunt_soundtime = time + 1;
+                       CS(attacker).taunt_soundtime = time + 1;
                        attacker.killcount = attacker.killcount + 1;
 
                        attacker.killsound += 1;