}
}
- if(teams_matter)
+ if(teamplay)
{
discard = FALSE;
// Rate the item only if no one needs it, or if an enemy is closer to it
if ( (enemy_distance < friend_distance && distance < enemy_distance) ||
- (friend_distance > cvar("bot_ai_friends_aware_pickup_radius") ) || !discard )
+ (friend_distance > autocvar_bot_ai_friends_aware_pickup_radius ) || !discard )
rating = head.bot_pickupevalfunc(self, head);
}
{
local entity head;
local float t, noteam, distance;
- noteam = ((self.team == 0) || !teams_matter); // fteqcc sucks
+ noteam = ((self.team == 0) || !teamplay); // fteqcc sucks
- if (cvar("bot_nofire"))
+ if (autocvar_bot_nofire)
return;
// don't chase players if we're under water
if (distance < 100 || distance > sradius)
continue;
+ if (head.freezetag_frozen)
+ continue;
+
if(g_minstagib)
if(head.items & IT_STRENGTH)
continue;
if (self.bot_strategytime < time)
{
- self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+ self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
navigation_goalrating_start();
havocbot_goalrating_controlpoints(10000, self.origin, 15000);
havocbot_goalrating_items(8000, self.origin, 8000);
if (self.bot_strategytime < time)
{
- self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+ self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
navigation_goalrating_start();
havocbot_goalrating_items(10000, self.origin, 10000);
havocbot_goalrating_enemyplayers(20000, self.origin, 10000);
entity e;
if (self.bot_strategytime < time)
{
- self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+ self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
navigation_goalrating_start();
/*
havocbot_goalrating_items(100, self.origin, 10000);
}
};
-// Keepaway
-// If you don't have the ball, get it; if you do, kill people.
-void havocbot_role_ka()
-{
- if(self.deadflag != DEAD_NO)
- return;
-
- if (self.bot_strategytime < time)
- {
- self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
- navigation_goalrating_start();
- havocbot_goalrating_items(10000, self.origin, 10000);
- havocbot_goalrating_enemyplayers(20000, self.origin, 10000);
- //havocbot_goalrating_waypoints(1, self.origin, 1000);
- navigation_goalrating_end();
- }
-}
-
void havocbot_chooserole_dm()
{
self.havocbot_role = havocbot_role_dm;
self.havocbot_role = havocbot_role_dom;
};
-void havocbot_chooserole_ka()
-{
- self.havocbot_role = havocbot_role_ka;
-}
-
void havocbot_chooserole()
{
dprint("choosing a role...\n");
- navigation_clearroute();
self.bot_strategytime = 0;
if (g_ctf)
havocbot_chooserole_ctf();
havocbot_chooserole_ons();
else if (g_keepaway)
havocbot_chooserole_ka();
+ else if (g_freezetag)
+ havocbot_chooserole_ft();
else // assume anything else is deathmatch
havocbot_chooserole_dm();
};