// execute the vore AI for bots
Vore_AI();
- if(self.predator.classname == "player")
- return; // an eaten bot has nothing to do outside of the vore AI
if (bot_strategytoken == self)
if (!bot_strategytoken_taken)
if(self.deadflag != DEAD_NO)
return;
+ if(self.stat_eaten)
+ return; // a prey bot has nothing to do from here on
havocbot_chooseenemy();
if (self.bot_chooseweapontime < time )
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
{
e = get_weaponinfo(i);
- if ((e.spawnflags & WEP_FLAG_RELOADABLE) && self.weapon_load[i] < cvar(strcat("g_balance_", e.netname, "_reload_ammo")))
+ if ((self.weapons & W_WeaponBit(i)) && (e.spawnflags & WEP_FLAG_RELOADABLE) && self.weapon_load[i] < cvar(strcat("g_balance_", e.netname, "_reload_ammo")))
self.switchweapon = i;
}
}
{
// If no weapon was chosen get the first available weapon
if(self.weapon==0)
- for(i=WEP_GRABBER + 1; i < WEP_COUNT ; ++i)
+ for(i = WEP_FIRST; i <= WEP_COUNT ; ++i)
{
if(client_hasweapon(self, i, TRUE, FALSE))
{
}
}
-#ifdef 0
+#if 0
// TODO: This disabled code is not working well and got replaced by custom weapon priorities.
// However, this logic should be refactored and moved to weapons code so each new weapon can be
// evaluated dynamically by bots without updating the "ai" or config files. --mand1nga