From 693474a5c712c30523102daba0b62f10689caa85 Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 20 Nov 2012 00:42:22 +0100 Subject: [PATCH] Curiously the variable totalalive is unused, get rid of it --- qcsrc/server/arena.qc | 9 +-------- qcsrc/server/mutators/gamemode_freezetag.qc | 6 ++---- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/qcsrc/server/arena.qc b/qcsrc/server/arena.qc index d5004cbc8..fb9a422a9 100644 --- a/qcsrc/server/arena.qc +++ b/qcsrc/server/arena.qc @@ -16,7 +16,6 @@ void PutClientInServer(); float next_round; float redalive, bluealive, yellowalive, pinkalive; -float totalalive; .float redalive_stat, bluealive_stat, yellowalive_stat, pinkalive_stat; float red_players, blue_players, yellow_players, pink_players; float total_players; @@ -329,18 +328,12 @@ void count_alive_players() { if(g_ca) { - totalalive = redalive = bluealive = yellowalive = pinkalive = 0; + redalive = bluealive = yellowalive = pinkalive = 0; FOR_EACH_PLAYER(self) { if (self.team == COLOR_TEAM1 && self.health >= 1) - { redalive += 1; - totalalive += 1; - } else if (self.team == COLOR_TEAM2 && self.health >= 1) - { bluealive += 1; - totalalive += 1; - } } FOR_EACH_REALCLIENT(self) { self.redalive_stat = redalive; diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc index c8a386882..645f5e17a 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/gamemode_freezetag.qc @@ -51,7 +51,7 @@ void freezetag_CheckWinner() TeamScore_AddToTeam(winner.team, ST_SCORE, +1); } - totalalive = redalive = bluealive = yellowalive = pinkalive = 0; + redalive = bluealive = yellowalive = pinkalive = 0; next_round = time + 5; } @@ -81,7 +81,6 @@ void freezetag_add_alive() else if(self.team == COLOR_TEAM2) ++bluealive; else if(self.team == COLOR_TEAM3) ++yellowalive; else if(self.team == COLOR_TEAM4) ++pinkalive; - ++totalalive; freezetag_update_alive_stats(); } @@ -91,7 +90,6 @@ void freezetag_remove_alive() else if(self.team == COLOR_TEAM2) --bluealive; else if(self.team == COLOR_TEAM3) --yellowalive; else if(self.team == COLOR_TEAM4) --pinkalive; - --totalalive; freezetag_update_alive_stats(); } @@ -324,7 +322,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerSpawn) if(total_players == 1) // only one player active on server, start a new match immediately if(!next_round && warmup && (time < warmup - autocvar_g_freezetag_warmup || time > warmup)) // not awaiting next round { - totalalive = redalive = bluealive = yellowalive = pinkalive = 0; + redalive = bluealive = yellowalive = pinkalive = 0; next_round = time; return 1; } -- 2.39.2