From ce9580f57545f8ab334f7598d653c4dfedbecf3e Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 16 Jul 2017 08:07:26 +1000 Subject: [PATCH] Port taunt_soundtime to ClientState --- qcsrc/server/client.qc | 4 ++-- qcsrc/server/client.qh | 1 + qcsrc/server/g_damage.qc | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 296e8c03f..9f138abd1 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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); } diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index b6f3abd69..b8131d86b 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -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)); diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index a2fbaf9c3..4c294f6ff 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -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; -- 2.39.2