From: Mario Date: Mon, 6 Mar 2017 07:54:57 +0000 (+1000) Subject: Kill another re-spawn related gamemode specific reference or 2, also fix argument... X-Git-Tag: xonotic-v0.8.5~2782^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5a956b40964e8c4a74208fe74cc04f48983f0d65;p=xonotic%2Fxonotic-data.pk3dir.git Kill another re-spawn related gamemode specific reference or 2, also fix argument for ClientKill mutator hook --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 5506a9d0f..478ffaca9 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -931,11 +931,9 @@ void ClientKill_TeamChange (entity this, float targetteam) // 0 = don't change, killtime = autocvar_g_balance_kill_delay; - if(g_race_qualifying || g_cts) - killtime = 0; - if(MUTATOR_CALLHOOK(ClientKill, this, killtime)) return; + killtime = M_ARGV(1, float); this.killindicator_teamchange = targetteam; diff --git a/qcsrc/server/mutators/mutator/gamemode_race.qc b/qcsrc/server/mutators/mutator/gamemode_race.qc index c41586c04..c4c8f087e 100644 --- a/qcsrc/server/mutators/mutator/gamemode_race.qc +++ b/qcsrc/server/mutators/mutator/gamemode_race.qc @@ -102,6 +102,12 @@ float WinningCondition_QualifyingThenRace(float limit) return wc; } +MUTATOR_HOOKFUNCTION(rc, ClientKill) +{ + if(g_race_qualifying) + M_ARGV(1, float) = 0; // killtime +} + MUTATOR_HOOKFUNCTION(rc, AbortSpeedrun) { entity player = M_ARGV(0, entity);