From: Lyberta Date: Sat, 18 Mar 2017 18:02:27 +0000 (+0300) Subject: Switch to PlayerDied. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1c0ded30994fa970ae16ef3cebdc7bf1ee6b5bd8;p=xonotic%2Fxonotic-data.pk3dir.git Switch to PlayerDied. --- 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) {