if( head.armorvalue && player.armorvalue > self.armorvalue)
continue;
- if( head.weapons )
- if( (player.weapons & head.weapons) != head.weapons)
+ if( !WEPSET_EMPTY_E(head) )
+ if( !WEPSET_CONTAINS_ALL_EE(player, head) )
continue;
if (head.ammo_shells && player.ammo_shells > self.ammo_shells)
FOR_EACH_PLAYER(head)
{
// TODO: Merge this logic with the bot_shouldattack function
- if (self != head)
- if (head.health > 0)
- if ((noteam && (!bot_ignore_bots || clienttype(head) == CLIENTTYPE_REAL)) || head.team != self.team)
+ if(bot_shouldattack(head))
{
distance = vlen(head.origin - org);
if (distance < 100 || distance > sradius)
continue;
- if (head.freezetag_frozen)
- continue;
-
- if(g_minstagib)
- if(head.items & IT_STRENGTH)
- continue;
-
// rate only visible enemies
/*
traceline(self.origin + self.view_ofs, head.origin, MOVE_NOMONSTERS, self);
{
dprint("choosing a role...\n");
self.bot_strategytime = 0;
- if (g_ctf)
- havocbot_chooserole_ctf();
+ if (MUTATOR_CALLHOOK(HavocBot_ChooseRule))
+ return;
else if (g_domination)
havocbot_chooserole_dom();
else if (g_keyhunt)
havocbot_chooserole_race();
else if (g_onslaught)
havocbot_chooserole_ons();
- else if (g_keepaway)
- havocbot_chooserole_ka();
- else if (g_freezetag)
- havocbot_chooserole_ft();
else if (g_assault)
havocbot_chooserole_ast();
else // assume anything else is deathmatch