X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fhavocbot%2Froles.qc;h=7e3ddbb4340dd820253fccc87b5d2d2449ae2af1;hb=b03338e49b3b16ec20c59a9809abe16bebcd29ce;hp=3e0e60fcc09995c25dd8525b050bc8f6f3f93561;hpb=265b681e0fb49239df1bfc431a903f66244a3172;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/bot/havocbot/roles.qc b/qcsrc/server/bot/havocbot/roles.qc index 3e0e60fcc..7e3ddbb43 100644 --- a/qcsrc/server/bot/havocbot/roles.qc +++ b/qcsrc/server/bot/havocbot/roles.qc @@ -98,7 +98,10 @@ void havocbot_goalrating_items(float ratingscale, vector org, float sradius) if (head.ammo_rockets && player.ammo_rockets > self.ammo_rockets) continue; - if (head.ammo_cells && player.ammo_cells > self.ammo_cells ) + if (head.ammo_cells && player.ammo_cells > self.ammo_cells) + continue; + + if (head.ammo_plasma && player.ammo_plasma > self.ammo_plasma) continue; discard = FALSE; @@ -221,60 +224,19 @@ void havocbot_role_dm() } } -//Race: -//go to next checkpoint, and annoy enemies -.float race_checkpoint; -void havocbot_role_race() -{ - if(self.deadflag != DEAD_NO) - return; - - entity e; - if (self.bot_strategytime < time) - { - self.bot_strategytime = time + autocvar_bot_ai_strategyinterval; - navigation_goalrating_start(); - /* - havocbot_goalrating_items(100, self.origin, 10000); - havocbot_goalrating_enemyplayers(500, self.origin, 20000); - */ - - for(e = world; (e = find(e, classname, "trigger_race_checkpoint")) != world; ) - { - if(e.cnt == self.race_checkpoint) - { - navigation_routerating(e, 1000000, 5000); - } - else if(self.race_checkpoint == -1) - { - navigation_routerating(e, 1000000, 5000); - } - } - - navigation_goalrating_end(); - } -} - void havocbot_chooserole_dm() { self.havocbot_role = havocbot_role_dm; } -void havocbot_chooserole_race() -{ - self.havocbot_role = havocbot_role_race; -} - void havocbot_chooserole() { dprint("choosing a role...\n"); self.bot_strategytime = 0; - if (MUTATOR_CALLHOOK(HavocBot_ChooseRule)) + if (MUTATOR_CALLHOOK(HavocBot_ChooseRole)) return; else if (g_keyhunt) havocbot_chooserole_kh(); - else if (g_race || g_cts) - havocbot_chooserole_race(); else if (g_onslaught) havocbot_chooserole_ons(); else // assume anything else is deathmatch