]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/havocbot/roles.qc
Merge branch 'terencehill/menu_weaponarena_selection_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / havocbot / roles.qc
index af219b8ec730272f85f334402ea9c8cc4dc229f4..c56f70598e60b696e4f18c7a70d6f20cce995633 100644 (file)
@@ -1,3 +1,10 @@
+#include "../../_all.qh"
+
+#include "havocbot.qh"
+#include "role_keyhunt.qh"
+
+#include "../bot.qh"
+#include "../navigation.qh"
 
 .float max_armorvalue;
 .float havocbot_role_timeout;
@@ -204,12 +211,9 @@ void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradi
        }
 }
 
-// choose a role according to the situation
-void havocbot_role_dm();
-
-//DM:
-//go to best items
-void havocbot_role_dm()
+// legacy bot role for standard gamemodes
+// go to best items
+void havocbot_role_generic()
 {
        if(self.deadflag != DEAD_NO)
                return;
@@ -225,21 +229,19 @@ void havocbot_role_dm()
        }
 }
 
-void havocbot_chooserole_dm()
+void havocbot_chooserole_generic()
 {
-       self.havocbot_role = havocbot_role_dm;
+       self.havocbot_role = havocbot_role_generic;
 }
 
 void havocbot_chooserole()
 {
-       dprint("choosing a role...\n");
+       LOG_TRACE("choosing a role...\n");
        self.bot_strategytime = 0;
-       if (MUTATOR_CALLHOOK(HavocBot_ChooseRole))
+       if (MUTATOR_CALLHOOK(HavocBot_ChooseRole, self))
                return;
        else if (g_keyhunt)
                havocbot_chooserole_kh();
-       else if (g_onslaught)
-               havocbot_chooserole_ons();
-       else // assume anything else is deathmatch
-               havocbot_chooserole_dm();
+       else
+               havocbot_chooserole_generic();
 }