From ab95e3a46d6514a744cdd8784995492882ba1064 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 26 Jun 2010 01:47:15 +0200 Subject: [PATCH] - fix misuse of && in a check - fix (by putting braces) an else being wrongly the else of the if within the macro FOR_EACH_CLIENT --- qcsrc/server/arena.qc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/arena.qc b/qcsrc/server/arena.qc index e68e29502..5a3ee7a0d 100644 --- a/qcsrc/server/arena.qc +++ b/qcsrc/server/arena.qc @@ -294,8 +294,8 @@ void Spawnqueue_Check() allowed_to_spawn = 1; return; } - else if(!next_round) - if((redspawned && bluespawned == 0) || (bluespawned && redspawned == 0)) { + else if(!next_round) { + if((redspawned && !bluespawned) || (bluespawned && !redspawned)) { next_round = time + 5; champion = find(world, classname, "player"); @@ -308,7 +308,8 @@ void Spawnqueue_Check() champion_team = "^4Blue team"; play2all("ctf/blue_capture.wav"); } - FOR_EACH_CLIENT(self) centerprint(self, strcat(champion_team, "^7 wins the round.", "^7\n")); + FOR_EACH_CLIENT(self) centerprint(self, strcat(champion_team, "^7 wins the round.", "^7\n")); + } else if(!redspawned && !bluespawned) { FOR_EACH_CLIENT(self) centerprint(self, strcat("^7Round tied.", "^7\n")); next_round = time + 5; -- 2.39.2