From: terencehill Date: Fri, 22 Jun 2018 16:12:57 +0000 (+0200) Subject: Bot AI: Freezetag: fix initial role assignment (always havocbot_role_ft_freeing)... X-Git-Tag: xonotic-v0.8.5~1923^2~22 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b5efd71ec282bc7e95cff33adc1456526e01329d;p=xonotic%2Fxonotic-data.pk3dir.git Bot AI: Freezetag: fix initial role assignment (always havocbot_role_ft_freeing) when a bot is added to the server --- diff --git a/qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc b/qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc index efa06461d..f97638370 100644 --- a/qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc +++ b/qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc @@ -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; }