From: terencehill Date: Fri, 25 Jun 2010 23:47:15 +0000 (+0200) Subject: - fix misuse of && in a check X-Git-Tag: xonotic-v0.1.0preview~516 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ab95e3a46d6514a744cdd8784995492882ba1064;p=xonotic%2Fxonotic-data.pk3dir.git - 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 --- 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;