]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bot AI: Freezetag: fix wrong count of unfrozen players causing bots to choose the...
authorterencehill <piuntn@gmail.com>
Fri, 22 Jun 2018 16:11:36 +0000 (18:11 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 22 Jun 2018 16:11:36 +0000 (18:11 +0200)
qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc

index 9205e8975457fa4160cc3df75d27cc782fd15cb7..efa06461d0214867010fe01d7fb1a8b46063432a 100644 (file)
@@ -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;