void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float sradius)
{
entity head;
- float t, i, c, needarmor = FALSE, needweapons = FALSE;
+ float t, i, c, needarmor = false, needweapons = false;
// Needs armor/health?
if(self.health<100)
- needarmor = TRUE;
+ needarmor = true;
// Needs weapons?
c = 0;
}
if(c<4)
- needweapons = TRUE;
+ needweapons = true;
if(!needweapons && !needarmor)
return;
// dprint(self.netname, " needs armor ", ftos(needarmor) , "\n");
// See what is around
- head = findchainfloat(bot_pickup, TRUE);
+ head = findchainfloat(bot_pickup, true);
while (head)
{
// gather health and armor only
for(0; cp2; cp2 = cp2.chain)
{
cp2.wpcost = c = 0;
- cp2.wpconsidered = FALSE;
+ cp2.wpconsidered = false;
if(cp2.isshielded)
continue;
// NOTE: probably decrease the cost of attackable control points
cp2.wpcost = c;
- cp2.wpconsidered = TRUE;
+ cp2.wpconsidered = true;
}
// We'll consider only the best case
{
// Should be attacked
// Rate waypoints near it
- found = FALSE;
+ found = false;
best = world;
bestvalue = 99999999999;
for(radius=0; radius<1000 && !found; radius+=500)
if(wp.classname=="waypoint")
if(checkpvs(wp.origin,cp))
{
- found = TRUE;
+ found = true;
if(wp.cnt<bestvalue)
{
best = wp;
{
// Should be touched
// dprint(self.netname, " found a touchable controlpoint at ", vtos(cp.origin) ,"\n");
- found = FALSE;
+ found = false;
// Look for auto generated waypoint
if (!bot_waypoints_for_items)
if(wp.classname=="waypoint")
{
navigation_routerating(wp, ratingscale, 10000);
- found = TRUE;
+ found = true;
}
}
// Should be attacked
// Rate waypoints near it
- found = FALSE;
+ found = false;
bestwp = world;
best = 99999999999;
if(wp.classname=="waypoint")
if(checkpvs(wp.origin,g))
{
- found = TRUE;
+ found = true;
if(wp.cnt<best)
{
bestwp = wp;
if(checkpvs(self.view_ofs,bestwp))
self.havocbot_attack_time = time + 5;
- return TRUE;
+ return true;
}
else
{
// if there aren't waypoints near the generator go straight to it
navigation_routerating(g, ratingscale, 10000);
self.havocbot_attack_time = 0;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
void havocbot_role_ons_offense()