X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fhavocbot%2Froles.qc;h=037968f1367b30205fbeccad9ce569e401dcbb7d;hp=df6b8de91201aaa1e12923de875f78b9b89378c3;hb=7ad79253dd5e08e66c0b3bab415da69cd3c2a296;hpb=9e3b475574c7fd8f723ff1add74dcc42a80d2939 diff --git a/qcsrc/server/bot/havocbot/roles.qc b/qcsrc/server/bot/havocbot/roles.qc index df6b8de91..037968f13 100644 --- a/qcsrc/server/bot/havocbot/roles.qc +++ b/qcsrc/server/bot/havocbot/roles.qc @@ -2,7 +2,6 @@ #include "havocbot.qh" #include "role_keyhunt.qh" -#include "role_onslaught.qh" #include "../bot.qh" #include "../navigation.qh" @@ -14,7 +13,7 @@ .void() havocbot_role; void havocbot_goalrating_items(float ratingscale, vector org, float sradius) -{ +{SELFPARAM(); entity head; entity player; float rating, d, discard, distance, friend_distance, enemy_distance; @@ -139,7 +138,7 @@ void havocbot_goalrating_items(float ratingscale, vector org, float sradius) } void havocbot_goalrating_controlpoints(float ratingscale, vector org, float sradius) -{ +{SELFPARAM(); entity head; head = findchain(classname, "dom_controlpoint"); while (head) @@ -158,7 +157,7 @@ void havocbot_goalrating_controlpoints(float ratingscale, vector org, float srad } void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradius) -{ +{SELFPARAM(); entity head; int t; float distance; @@ -212,13 +211,10 @@ 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() +{SELFPARAM(); if(self.deadflag != DEAD_NO) return; @@ -233,21 +229,19 @@ void havocbot_role_dm() } } -void havocbot_chooserole_dm() -{ - self.havocbot_role = havocbot_role_dm; +void havocbot_chooserole_generic() +{SELFPARAM(); + self.havocbot_role = havocbot_role_generic; } void havocbot_chooserole() -{ - dprint("choosing a role...\n"); +{SELFPARAM(); + LOG_TRACE("choosing a role...\n"); self.bot_strategytime = 0; 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(); }