]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bot AI: Freezetag: fix initial role assignment (always havocbot_role_ft_freeing)...
authorterencehill <piuntn@gmail.com>
Fri, 22 Jun 2018 16:12:57 +0000 (18:12 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 22 Jun 2018 16:12:57 +0000 (18:12 +0200)
qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc

index efa06461d0214867010fe01d7fb1a8b46063432a..f9763837003d611750e553ce1c442340b65cbf82 100644 (file)
@@ -539,6 +539,10 @@ MUTATOR_HOOKFUNCTION(ft, HavocBot_ChooseRole)
                        bot.havocbot_role = havocbot_role_ft_offense;
        }
 
+       // if bots spawn all at once assign them a more appropriated role after a while
+       if (CS(bot).jointime < time + 1)
+               bot.havocbot_role_timeout = time + 10 + random() * 10;
+
        return true;
 }