From a43511f5a75f3ece05afd13811f8e32c60e8d98c Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 22 Jun 2018 18:11:36 +0200 Subject: [PATCH] Bot AI: Freezetag: fix wrong count of unfrozen players causing bots to choose the role havocbot_role_ft_freeing when no teammate is frozen --- qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc b/qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc index 9205e8975..efa06461d 100644 --- a/qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc +++ b/qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc @@ -250,10 +250,10 @@ void havocbot_role_ft_offense(entity this) // Count how many players on team are unfrozen. int unfrozen = 0; - FOREACH_CLIENT(IS_PLAYER(it) && SAME_TEAM(it, this) && !(STAT(FROZEN, it) != 1), { unfrozen++; }); + FOREACH_CLIENT(IS_PLAYER(it) && SAME_TEAM(it, this) && !STAT(FROZEN, it), { unfrozen++; }); // If only one left on team or if role has timed out then start trying to free players. - if (((unfrozen == 0) && (!STAT(FROZEN, this))) || (time > this.havocbot_role_timeout)) + if ((unfrozen == 0 && !STAT(FROZEN, this)) || time > this.havocbot_role_timeout) { LOG_TRACE("changing role to freeing"); this.havocbot_role = havocbot_role_ft_freeing; -- 2.39.2