From: Mario Date: Sat, 15 Jul 2017 22:07:26 +0000 (+1000) Subject: Port taunt_soundtime to ClientState X-Git-Tag: xonotic-v0.8.5~2610 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=ce9580f57545f8ab334f7598d653c4dfedbecf3e;p=xonotic%2Fxonotic-data.pk3dir.git Port taunt_soundtime to ClientState --- 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;