]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
CTF roles that need immediate actions should refresh their goals immediately
authormand1nga <mand1nga@xonotic.org>
Sun, 21 Aug 2011 01:42:09 +0000 (22:42 -0300)
committermand1nga <mand1nga@xonotic.org>
Sun, 21 Aug 2011 01:42:09 +0000 (22:42 -0300)
qcsrc/server/bot/havocbot/role_ctf.qc

index 7fbdbc0a35798778ea676dcb6ebe651d8556683c..f85f2ef64c3e8a0c0964d5d344eb6977ef1c300d 100644 (file)
@@ -204,6 +204,7 @@ void havocbot_role_ctf_setrole(entity bot, float role)
                        bot.havocbot_role = havocbot_role_ctf_carrier;
                        bot.havocbot_role_timeout = 0;
                        bot.havocbot_cantfindflag = time + 10;
+                       bot.bot_strategytime = 0;
                        break;
                case HAVOCBOT_CTF_ROLE_DEFENSE:
                        dprint("defense");
@@ -225,12 +226,14 @@ void havocbot_role_ctf_setrole(entity bot, float role)
                        bot.havocbot_previous_role = bot.havocbot_role;
                        bot.havocbot_role = havocbot_role_ctf_retriever;
                        bot.havocbot_role_timeout = time + 10;
+                       bot.bot_strategytime = 0;
                        break;
                case HAVOCBOT_CTF_ROLE_ESCORT:
                        dprint("escort");
                        bot.havocbot_previous_role = bot.havocbot_role;
                        bot.havocbot_role = havocbot_role_ctf_escort;
                        bot.havocbot_role_timeout = time + 30;
+                       bot.bot_strategytime = 0;
                        break;
        }
        dprint("\n");