From 1c0ded30994fa970ae16ef3cebdc7bf1ee6b5bd8 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Sat, 18 Mar 2017 21:02:27 +0300 Subject: [PATCH] Switch to PlayerDied. --- qcsrc/server/mutators/mutator/gamemode_survival.qc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/mutators/mutator/gamemode_survival.qc b/qcsrc/server/mutators/mutator/gamemode_survival.qc index 3740e7e47..2bed1d7ca 100644 --- a/qcsrc/server/mutators/mutator/gamemode_survival.qc +++ b/qcsrc/server/mutators/mutator/gamemode_survival.qc @@ -1747,7 +1747,6 @@ MUTATOR_HOOKFUNCTION(surv, PlayerDies) { //FOREACH_CLIENT(true, { centerprint(it, "PlayerDies"); }); entity frag_target = M_ARGV(2, entity); - Surv_CountAlivePlayers(frag_target.team); //surv_RemovePlayerFromAliveList(frag_target); if (!Surv_CanPlayerSpawn(frag_target)) { @@ -1760,6 +1759,12 @@ MUTATOR_HOOKFUNCTION(surv, PlayerDies) return true; } +/// \brief Hook which is called after the player died. +MUTATOR_HOOKFUNCTION(surv, PlayerDied) +{ + Surv_CountAlivePlayers(-1); +} + /// \brief Hook which is called when player has scored a frag. MUTATOR_HOOKFUNCTION(surv, GiveFragsForKill, CBC_ORDER_FIRST) { -- 2.39.5