From 97b5aeedad3a6dac08567b4cd094fb167229f067 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Wed, 29 Mar 2017 15:33:09 +0300 Subject: [PATCH] Survival: Better eliminated players handling. --- .../mutators/mutator/gamemode_survival.qc | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/qcsrc/server/mutators/mutator/gamemode_survival.qc b/qcsrc/server/mutators/mutator/gamemode_survival.qc index 3d0748d39..38d3cf6da 100644 --- a/qcsrc/server/mutators/mutator/gamemode_survival.qc +++ b/qcsrc/server/mutators/mutator/gamemode_survival.qc @@ -323,8 +323,7 @@ void Surv_ChangeNumberOfAlivePlayers(int teamnum, int delta) LOG_TRACE("Number of alive attackers = ", ftos( surv_numattackersalive), " was = ", ftos(surv_numattackersalive - delta)); - Surv_UpdateAliveStats(); - return; + break; } case surv_defenderteam: { @@ -332,10 +331,11 @@ void Surv_ChangeNumberOfAlivePlayers(int teamnum, int delta) LOG_TRACE("Number of alive defenders = ", ftos( surv_numdefendersalive), " was = ", ftos(surv_numdefendersalive - delta)); - Surv_UpdateAliveStats(); - return; + break; } } + Surv_UpdateAliveStats(); + eliminatedPlayers.SendFlags |= 1; } /// \brief Sets the player role. @@ -736,11 +736,8 @@ void Surv_CountAlivePlayers() } } }); - if (!warmup_stage) - { - eliminatedPlayers.SendFlags |= 1; - } Surv_UpdateAliveStats(); + eliminatedPlayers.SendFlags |= 1; if (warmup_stage || surv_allowed_to_spawn || (savednumdefenders <= surv_numdefendersalive)) { @@ -1518,10 +1515,6 @@ MUTATOR_HOOKFUNCTION(surv, MakePlayerObserver) LOG_TRACE("killindicator_teamchange == -2"); player.surv_state = SURVIVAL_STATE_NOT_PLAYING; } - if (!warmup_stage) - { - eliminatedPlayers.SendFlags |= 1; - } if (player.surv_state == SURVIVAL_STATE_NOT_PLAYING) { return false; // allow team reset -- 2.39.5