From 5a956b40964e8c4a74208fe74cc04f48983f0d65 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 6 Mar 2017 17:54:57 +1000 Subject: [PATCH] Kill another re-spawn related gamemode specific reference or 2, also fix argument for ClientKill mutator hook --- qcsrc/server/client.qc | 4 +--- qcsrc/server/mutators/mutator/gamemode_race.qc | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) 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); -- 2.39.2