1 void() havocbot_role_ft_freeing;
2 void() havocbot_role_ft_offense;
4 void havocbot_goalrating_freeplayers(float ratingscale, vector org, float sradius)
11 if ((head != self) && (head.team == self.team) && (head.freezetag_frozen))
13 distance = vlen(head.origin - org);
14 if (distance > sradius)
16 navigation_routerating(head, ratingscale, 2000);
21 void havocbot_role_ft_offense()
23 if(self.deadflag != DEAD_NO)
26 if (!self.havocbot_role_timeout)
27 self.havocbot_role_timeout = time + random() * 10 + 20;
29 if (time > self.havocbot_role_timeout)
31 dprint("changing role to freeing\n");
32 self.havocbot_role = havocbot_role_ft_freeing;
33 self.havocbot_role_timeout = 0;
37 if (time > self.bot_strategytime)
39 self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
41 navigation_goalrating_start();
42 havocbot_goalrating_items(10000, self.origin, 10000);
43 havocbot_goalrating_enemyplayers(20000, self.origin, 10000);
44 havocbot_goalrating_freeplayers(9000, self.origin, 10000);
45 //havocbot_goalrating_waypoints(1, self.origin, 1000);
46 navigation_goalrating_end();
50 void havocbot_role_ft_freeing()
52 if(self.deadflag != DEAD_NO)
55 if (!self.havocbot_role_timeout)
56 self.havocbot_role_timeout = time + random() * 10 + 20;
58 if (time > self.havocbot_role_timeout)
60 dprint("changing role to offense\n");
61 self.havocbot_role = havocbot_role_ft_offense;
62 self.havocbot_role_timeout = 0;
66 if (time > self.bot_strategytime)
68 self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
70 navigation_goalrating_start();
71 havocbot_goalrating_items(8000, self.origin, 10000);
72 havocbot_goalrating_enemyplayers(10000, self.origin, 10000);
73 havocbot_goalrating_freeplayers(20000, self.origin, 10000);
74 //havocbot_goalrating_waypoints(1, self.origin, 1000);
75 navigation_goalrating_end();
79 void havocbot_chooserole_ft()
81 if(self.deadflag != DEAD_NO)
85 self.havocbot_role = havocbot_role_ft_freeing;
87 self.havocbot_role = havocbot_role_ft_offense;