2 .float havocbot_role_timeout;
3 .void() havocbot_previous_role;
4 .float bot_strategytime;
8 float canreach(entity e)
10 return vlen(self.origin - e.origin) < 1500;
13 .float max_armorvalue;
14 float havocbot_pickupevalfunc(entity item)
16 float i, j, rating, base, position, need_shells, need_nails, need_rockets, need_cells;
19 base = item.bot_pickupbasevalue;
21 need_shells = self.weapons & WEPBIT_SHOTGUN;
22 need_nails = self.weapons & WEPBIT_UZI;
23 need_cells = self.weapons & ( WEPBIT_HOOK | WEPBIT_HLAC | WEPBIT_MINSTANEX | WEPBIT_NEX | WEPBIT_ELECTRO | WEPBIT_CRYLINK );
24 need_rockets = self.weapons & ( WEPBIT_ROCKET_LAUNCHER | WEPBIT_GRENADE_LAUNCHER | WEPBIT_HAGAR | WEPBIT_SEEKER );
28 if( self.weapons & item.weapons == item.weapons )
29 rating = 0.5 + bound(0, skill / 20, 0.5);
33 if( bot_custom_weapon )
35 for(i = WEP_FIRST; i < WEP_LAST ; ++i){
36 if( power2of(i-1) & item.weapons != item.weapons )
40 for(j = 0; j < WEP_LAST ; ++j){
42 bot_weapons_far[j] == i ||
43 bot_weapons_mid[j] == i ||
44 bot_weapons_close[j] == i
54 position = WEP_LAST - position;
55 // item.bot_pickupbasevalue is overwritten here
56 base = BOT_PICKUP_RATING_LOW + ( (BOT_PICKUP_RATING_HIGH - BOT_PICKUP_RATING_LOW) * (position / WEP_LAST ));
64 if (self.ammo_shells < g_pickup_shells_max && need_cells )
65 rating = rating + max(0, 1 - self.ammo_shells / g_pickup_shells_max);
68 if (self.ammo_nails < g_pickup_nails_max && need_nails )
69 rating = rating + max(0, 1 - self.ammo_nails / g_pickup_nails_max);
71 if (item.ammo_rockets)
72 if (self.ammo_rockets < g_pickup_rockets_max && need_rockets)
73 rating = rating + max(0, 1 - self.ammo_rockets / g_pickup_rockets_max);
76 if (self.ammo_cells < g_pickup_cells_max && need_cells)
77 rating = rating + max(0, 1 - self.ammo_cells / g_pickup_cells_max);
80 if (self.armorvalue < item.max_armorvalue)
81 rating = rating + max(0, 1 - self.armorvalue / item.max_armorvalue);
84 if (self.health < item.max_health)
85 rating = rating + max(0, 1 - self.health / item.max_health);
87 // TODO: if the item is not recognized then default to item.bot_pickupevalfunc(self, item);
92 void havocbot_goalrating_items(float ratingscale, vector org, float sradius)
96 local float rating, d, discard, distance, friend_distance, enemy_distance;
97 ratingscale = ratingscale * 0.0001; // items are rated around 10000 already
98 head = findchainfloat(bot_pickup, TRUE);
102 distance = vlen(head.origin - org);
103 friend_distance = 10000; enemy_distance = 10000;
106 if(!head.solid || distance > sradius ){
115 FOR_EACH_PLAYER(player)
118 if ( self == player || player.deadflag != DEAD_NO)
121 d = vlen(player.origin - head.origin); // distance between player and item
123 if ( player.team == self.team )
125 if ( clienttype(player) != CLIENTTYPE_REAL || discard )
128 if( d > friend_distance)
135 if( head.health && player.health > self.health )
138 if( head.armorvalue && player.armorvalue > self.armorvalue)
142 if( (player.weapons & head.weapons) != head.weapons)
145 if (head.ammo_shells && player.ammo_shells > self.ammo_shells)
148 if (head.ammo_nails && player.ammo_nails > self.ammo_nails)
151 if (head.ammo_rockets && player.ammo_rockets > self.ammo_rockets)
154 if (head.ammo_cells && player.ammo_cells > self.ammo_cells )
161 // If enemy only track distances
162 // TODO: track only if visible ?
163 if( d < enemy_distance )
168 // Rate the item only if no one needs it, or if an enemy is closer to it
169 if ( (enemy_distance < friend_distance && distance < enemy_distance) ||
170 (friend_distance > cvar("bot_ai_friends_aware_pickup_radius") ) || !discard )
172 // rating = head.bot_pickupevalfunc(self, head);
173 rating = havocbot_pickupevalfunc(head);
178 // rating = head.bot_pickupevalfunc(self, head);
179 rating = havocbot_pickupevalfunc(head);
183 navigation_routerating(head, rating * ratingscale, 2000);
189 void havocbot_goalrating_controlpoints(float ratingscale, vector org, float sradius)
192 head = findchain(classname, "dom_controlpoint");
195 if (vlen(head.origin - org) < sradius)
197 if(head.cnt > -1) // this is just being fought for
198 navigation_routerating(head, ratingscale, 5000);
199 else if(head.goalentity.cnt == 0) // unclaimed point
200 navigation_routerating(head, ratingscale * 0.5, 5000);
201 else if(head.goalentity.team != self.team) // other team's point
202 navigation_routerating(head, ratingscale * 0.2, 5000);
209 // LordHavoc: this function was already unused, but for waypoints to be a
210 // useful goal the bots would have to seek out the least-recently-visited
211 // ones, not the closest
212 void havocbot_goalrating_waypoints(float ratingscale, vector org, float sradius)
215 head = findchain(classname, "waypoint");
218 if (vlen(head.origin - org) < sradius && vlen(head.origin - org) > 100)
219 navigation_routerating(head, ratingscale, 2000);
225 void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradius)
228 local float t, noteam;
229 noteam = ((self.team == 0) || (teamplay == 0)); // fteqcc sucks
230 //dprint("teamplay is "); dprint(ftos(teamplay)); dprint(", own team is ");
231 //dprint(ftos(self.team)); dprint(" -> noteam is "); dprint(ftos(noteam));
234 FOR_EACH_PLAYER(head)
238 if ((noteam && (!bot_ignore_bots || clienttype(head) == CLIENTTYPE_REAL)) || head.team != self.team)
239 if (vlen(head.origin - org) < sradius)
241 t = 100 / (head.health + head.armorvalue);
244 //dprint("found: "); dprint(head.netname); dprint("\n");
245 navigation_routerating(head, t * ratingscale, 500);
252 void() havocbot_role_ctf_middle;
253 void() havocbot_role_ctf_defense;
254 void() havocbot_role_ctf_offense;
255 void() havocbot_role_ctf_interceptor;
257 void havocbot_goalrating_ctf_carrieritems(float ratingscale, vector org, float sradius)
261 head = findchainfloat(bot_pickup, TRUE);
264 // look for health and armor only
265 if (head.solid) // must be possible to pick up (respawning items don't count)
266 if (head.health || head.armorvalue)
267 if (vlen(head.origin - org) < sradius)
270 //if (!head.bot_pickupevalfunc || head.model == "")
272 // get the value of the item
273 t = head.bot_pickupevalfunc(self, head) * 0.0001;
275 navigation_routerating(head, t * ratingscale, 500);
281 entity ctf_worldflaglist;
282 .entity ctf_worldflagnext;
283 void havocbot_goalrating_ctf_ourflag(float ratingscale)
286 head = ctf_worldflaglist;
289 if (self.team == head.team)
291 head = head.ctf_worldflagnext;
294 navigation_routerating(head, ratingscale, 10000);
297 void havocbot_goalrating_ctf_enemyflag(float ratingscale)
300 head = ctf_worldflaglist;
303 if (self.team != head.team)
305 head = head.ctf_worldflagnext;
308 navigation_routerating(head, ratingscale, 10000);
311 void havocbot_goalrating_ctf_enemybase(float ratingscale)
313 // div0: needs a change in the CTF code
316 void havocbot_goalrating_ctf_ourstolenflag(float ratingscale)
319 head = ctf_worldflaglist;
322 if (self.team == head.team)
324 head = head.ctf_worldflagnext;
327 if (head.cnt != FLAG_BASE)
328 navigation_routerating(head, ratingscale, 10000);
331 void havocbot_goalrating_ctf_droppedflags(float ratingscale)
334 head = ctf_worldflaglist;
337 if (head.cnt != FLAG_BASE) // flag is carried or out in the field
338 navigation_routerating(head, ratingscale, 10000);
339 head = head.ctf_worldflagnext;
343 // CTF: (always teamplay)
345 //role rogue: (is this used?)
346 //pick up items and dropped flags (with big rating boost to dropped flags)
347 void havocbot_role_ctf_rogue()
349 if (self.bot_strategytime < time)
351 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
352 navigation_goalrating_start();
353 havocbot_goalrating_ctf_droppedflags(5000);
354 //havocbot_goalrating_enemyplayers(3000, self.origin, 3000);
355 havocbot_goalrating_items(10000, self.origin, 10000);
356 navigation_goalrating_end();
361 //pick up armor and health
362 //go to our flag spot
363 .float bot_cantfindflag;
364 void havocbot_role_ctf_carrier()
366 if (self.flagcarried == world)
368 dprint("changing role to middle\n");
369 self.havocbot_role = havocbot_role_ctf_middle;
370 self.havocbot_role_timeout = 0;
373 if (self.bot_strategytime < time)
375 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
376 navigation_goalrating_start();
377 havocbot_goalrating_ctf_ourflag(50000);
378 if (navigation_bestgoal)
379 self.bot_cantfindflag = time + 10;
380 else if (time > self.bot_cantfindflag)
382 // can't navigate to our own flag :(
383 Damage(self, self, self, 100000, DEATH_KILL, self.origin, '0 0 0');
385 havocbot_goalrating_ctf_carrieritems(1000, self.origin, 1000);
386 navigation_goalrating_end();
391 //pick up armor and health
392 //if rockets < 25 || health < 100, change role to middle
393 //if carrying flag, change role to flag carrier
394 //if our flag taken, change role to interceptor
395 //(60-90 second timer) change role to middle
397 void havocbot_role_ctf_offense()
400 if (self.flagcarried)
402 dprint("changing role to carrier\n");
403 self.havocbot_role = havocbot_role_ctf_carrier;
404 self.havocbot_role_timeout = 0;
405 self.bot_cantfindflag = time + 10;
409 f = ctf_worldflaglist;
412 if (self.team == f.team)
414 f = f.ctf_worldflagnext;
416 if (f.cnt != FLAG_BASE && canreach(f))
418 dprint("changing role to interceptor\n");
419 self.havocbot_previous_role = self.havocbot_role;
420 self.havocbot_role = havocbot_role_ctf_interceptor;
421 self.havocbot_role_timeout = 0;
424 if (!self.havocbot_role_timeout)
425 self.havocbot_role_timeout = time + random() * 30 + 60;
426 if (time > self.havocbot_role_timeout)
428 dprint("changing role to middle\n");
429 self.havocbot_role = havocbot_role_ctf_middle;
430 self.havocbot_role_timeout = 0;
433 if (self.bot_strategytime < time)
435 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
436 navigation_goalrating_start();
437 havocbot_goalrating_ctf_ourstolenflag(50000);
438 havocbot_goalrating_ctf_enemyflag(30000);
439 havocbot_goalrating_ctf_enemybase(20000);
440 havocbot_goalrating_items(10000, self.origin, 10000);
441 navigation_goalrating_end();
445 //role interceptor (temporary role):
447 //if carrying flag, change role to flag carrier
448 //if our flag is back, change role to previous role
450 //go to least recently visited area
451 void havocbot_role_ctf_interceptor()
454 if (self.flagcarried)
456 dprint("changing role to carrier\n");
457 self.havocbot_role = havocbot_role_ctf_carrier;
458 self.havocbot_role_timeout = 0;
459 self.bot_cantfindflag = time + 10;
463 f = ctf_worldflaglist;
466 if (self.team == f.team)
468 f = f.ctf_worldflagnext;
470 if (f.cnt == FLAG_BASE)
472 dprint("changing role back\n");
473 self.havocbot_role = self.havocbot_previous_role;
474 self.havocbot_role_timeout = 0;
478 if (self.bot_strategytime < time)
480 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
481 navigation_goalrating_start();
482 havocbot_goalrating_ctf_ourstolenflag(50000);
483 havocbot_goalrating_ctf_droppedflags(50000);
484 havocbot_goalrating_items(10000, self.origin, 10000);
485 navigation_goalrating_end();
491 //if carrying flag, change role to flag carrier
492 //if our flag taken, change role to interceptor
493 //if see flag (of either team) follow it (this has many implications)
494 //(10-20 second timer) change role to defense or offense
495 //go to least recently visited area
496 void havocbot_role_ctf_middle()
499 if (self.flagcarried)
501 dprint("changing role to carrier\n");
502 self.havocbot_role = havocbot_role_ctf_carrier;
503 self.havocbot_role_timeout = 0;
504 self.bot_cantfindflag = time + 10;
508 f = ctf_worldflaglist;
511 if (self.team == f.team)
513 f = f.ctf_worldflagnext;
515 if (f.cnt != FLAG_BASE && canreach(f))
517 dprint("changing role to interceptor\n");
518 self.havocbot_previous_role = self.havocbot_role;
519 self.havocbot_role = havocbot_role_ctf_interceptor;
520 self.havocbot_role_timeout = 0;
523 if (!self.havocbot_role_timeout)
524 self.havocbot_role_timeout = time + random() * 10 + 10;
525 if (time > self.havocbot_role_timeout)
529 dprint("changing role to offense\n");
530 self.havocbot_role = havocbot_role_ctf_offense;
534 dprint("changing role to defense\n");
535 self.havocbot_role = havocbot_role_ctf_defense;
537 self.havocbot_role_timeout = 0;
541 if (self.bot_strategytime < time)
543 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
544 navigation_goalrating_start();
545 havocbot_goalrating_ctf_ourstolenflag(50000);
546 havocbot_goalrating_ctf_droppedflags(30000);
547 //havocbot_goalrating_enemyplayers(1000, self.origin, 1000);
548 havocbot_goalrating_items(10000, self.origin, 10000);
549 navigation_goalrating_end();
554 //if rockets < 25 || health < 100, change role to middle
555 //if carrying flag, change role to flag carrier
556 //if our flag taken, change role to interceptor
557 //(30-50 second timer) change role to middle
558 //move to nearest unclaimed defense spot
559 void havocbot_role_ctf_defense()
562 if (self.flagcarried)
564 dprint("changing role to carrier\n");
565 self.havocbot_role = havocbot_role_ctf_carrier;
566 self.havocbot_role_timeout = 0;
567 self.bot_cantfindflag = time + 10;
571 f = ctf_worldflaglist;
574 if (self.team == f.team)
576 f = f.ctf_worldflagnext;
578 if (f.cnt != FLAG_BASE && canreach(f))
580 dprint("changing role to interceptor\n");
581 self.havocbot_previous_role = self.havocbot_role;
582 self.havocbot_role = havocbot_role_ctf_interceptor;
583 self.havocbot_role_timeout = 0;
586 if (!self.havocbot_role_timeout)
587 self.havocbot_role_timeout = time + random() * 20 + 30;
588 if (time > self.havocbot_role_timeout)
590 dprint("changing role to middle\n");
591 self.havocbot_role = havocbot_role_ctf_middle;
592 self.havocbot_role_timeout = 0;
595 if (self.bot_strategytime < time)
597 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
598 navigation_goalrating_start();
599 havocbot_goalrating_ctf_ourstolenflag(200000);
600 havocbot_goalrating_ctf_droppedflags(50000);
601 havocbot_goalrating_items(10000, f.origin, 10000);
602 navigation_goalrating_end();
605 // FIXME: place info_ctf_defensepoint entities in CTF maps and use them
606 // change position occasionally
607 if (time > self.bot_strategytime || self.goalentity.classname != "info_ctf_defensepoint")
609 self.bot_strategytime = time + random() * 45 + 15;
610 self.goalentity = world;
611 head = findchain(classname, "info_ctf_defensepoint");
614 if (time > head.count)
616 self.goalentity = head;
621 // if there are no defensepoints defined, switch to middle
622 if (self.goalentity == world)
624 dprint("changing role to middle\n");
625 self.havocbot_role = havocbot_role_ctf_middle;
626 self.havocbot_role_timeout = 0;
630 // keep anyone else from taking this spot
631 if (self.goalentity != world)
632 self.goalentity.count = time + 0.5;
637 // choose a role according to the situation
638 void() havocbot_role_dm;
639 void havocbot_chooserole_ctf()
642 dprint("choose CTF role...\n");
643 if (self.team == COLOR_TEAM3 || self.team == COLOR_TEAM4)
644 self.havocbot_role = havocbot_role_ctf_rogue;
649 self.havocbot_role = havocbot_role_ctf_offense;
651 self.havocbot_role = havocbot_role_ctf_middle;
653 self.havocbot_role = havocbot_role_ctf_defense;
658 //go to best items, or control points you don't own
659 void havocbot_role_dom()
661 if (self.bot_strategytime < time)
663 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
664 navigation_goalrating_start();
665 havocbot_goalrating_controlpoints(10000, self.origin, 15000);
666 havocbot_goalrating_items(8000, self.origin, 8000);
667 //havocbot_goalrating_enemyplayers(3000, self.origin, 2000);
668 //havocbot_goalrating_waypoints(1, self.origin, 1000);
669 navigation_goalrating_end();
675 void havocbot_role_dm()
677 if (self.bot_strategytime < time)
679 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
680 navigation_goalrating_start();
681 havocbot_goalrating_items(10000, self.origin, 10000);
682 havocbot_goalrating_enemyplayers(5000, self.origin, 20000);
683 //havocbot_goalrating_waypoints(1, self.origin, 1000);
684 navigation_goalrating_end();
689 //go to next checkpoint, and annoy enemies
690 .float race_checkpoint;
691 void havocbot_role_race()
694 if (self.bot_strategytime < time)
696 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
697 navigation_goalrating_start();
699 havocbot_goalrating_items(100, self.origin, 10000);
700 havocbot_goalrating_enemyplayers(500, self.origin, 20000);
703 for(e = world; (e = find(e, classname, "trigger_race_checkpoint")) != world; )
705 if(e.cnt == self.race_checkpoint)
707 navigation_routerating(e, 1000000, 5000);
709 else if(self.race_checkpoint == -1)
711 navigation_routerating(e, 1000000, 5000);
715 navigation_goalrating_end();
719 void havocbot_chooserole_dm()
721 self.havocbot_role = havocbot_role_dm;
724 void havocbot_chooserole_race()
726 self.havocbot_role = havocbot_role_race;
729 void havocbot_chooserole_dom()
731 self.havocbot_role = havocbot_role_dom;
739 entity kh_worldkeylist;
740 .entity kh_worldkeynext;
741 void havocbot_goalrating_kh(float ratingscale_team, float ratingscale_dropped, float ratingscale_enemy)
744 for (head = kh_worldkeylist; head; head = head.kh_worldkeynext)
746 if(head.owner == self)
748 if(!kh_tracking_enabled)
750 // if it's carried by our team we know about it
751 // otherwise we have to see it to know about it
752 if(!head.owner || head.team != self.team)
754 traceline(self.origin + self.view_ofs, head.origin, MOVE_NOMONSTERS, self);
755 if (trace_fraction < 1 && trace_ent != head)
756 continue; // skip what I can't see
760 navigation_routerating(head, ratingscale_dropped, 100000);
761 else if(head.team == self.team)
762 navigation_routerating(head, ratingscale_team, 100000);
764 navigation_routerating(head, ratingscale_enemy, 100000);
768 void() havocbot_role_kh_carrier;
769 void() havocbot_role_kh_defense;
770 void() havocbot_role_kh_offense;
771 void() havocbot_role_kh_freelancer;
772 void havocbot_role_kh_carrier()
774 if (!(self.items & IT_KEY1))
776 dprint("changing role to freelancer\n");
777 self.havocbot_role = havocbot_role_kh_freelancer;
778 self.havocbot_role_timeout = 0;
782 if (self.bot_strategytime < time)
784 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
785 navigation_goalrating_start();
787 if(kh_Key_AllOwnedByWhichTeam() == self.team)
788 havocbot_goalrating_kh(100000, 1, 1); // bring home
790 havocbot_goalrating_kh(40000, 40000, 1000); // play defensively
792 havocbot_goalrating_items(10000, self.origin, 10000);
793 navigation_goalrating_end();
797 void havocbot_role_kh_defense()
799 if (self.items & IT_KEY1)
801 dprint("changing role to carrier\n");
802 self.havocbot_role = havocbot_role_kh_carrier;
803 self.havocbot_role_timeout = 0;
807 if (!self.havocbot_role_timeout)
808 self.havocbot_role_timeout = time + random() * 10 + 20;
809 if (time > self.havocbot_role_timeout)
811 dprint("changing role to freelancer\n");
812 self.havocbot_role = havocbot_role_kh_freelancer;
813 self.havocbot_role_timeout = 0;
817 if (self.bot_strategytime < time)
819 float key_owner_team;
820 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
821 navigation_goalrating_start();
823 key_owner_team = kh_Key_AllOwnedByWhichTeam();
824 if(key_owner_team == self.team)
825 havocbot_goalrating_kh(100000, 1, 1); // defend key carriers
826 else if(key_owner_team == -1)
827 havocbot_goalrating_kh(40000, 10000, 1); // play defensively
829 havocbot_goalrating_kh(1, 1, 100000); // ATTACK ANYWAY
831 havocbot_goalrating_items(10000, self.origin, 10000);
832 navigation_goalrating_end();
836 void havocbot_role_kh_offense()
838 if (self.items & IT_KEY1)
840 dprint("changing role to carrier\n");
841 self.havocbot_role = havocbot_role_kh_carrier;
842 self.havocbot_role_timeout = 0;
846 if (!self.havocbot_role_timeout)
847 self.havocbot_role_timeout = time + random() * 10 + 20;
848 if (time > self.havocbot_role_timeout)
850 dprint("changing role to freelancer\n");
851 self.havocbot_role = havocbot_role_kh_freelancer;
852 self.havocbot_role_timeout = 0;
856 if (self.bot_strategytime < time)
858 float key_owner_team;
860 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
861 navigation_goalrating_start();
863 key_owner_team = kh_Key_AllOwnedByWhichTeam();
864 if(key_owner_team == self.team)
865 havocbot_goalrating_kh(100000, 1, 1); // defend anyway
866 else if(key_owner_team == -1)
867 havocbot_goalrating_kh(1, 10000, 40000); // play offensively
869 havocbot_goalrating_kh(1, 1, 100000); // ATTACK! EMERGENCY!
871 havocbot_goalrating_items(10000, self.origin, 10000);
872 navigation_goalrating_end();
876 void havocbot_role_kh_freelancer()
878 if (self.items & IT_KEY1)
880 dprint("changing role to carrier\n");
881 self.havocbot_role = havocbot_role_kh_carrier;
882 self.havocbot_role_timeout = 0;
886 if (!self.havocbot_role_timeout)
887 self.havocbot_role_timeout = time + random() * 10 + 10;
888 if (time > self.havocbot_role_timeout)
892 dprint("changing role to offense\n");
893 self.havocbot_role = havocbot_role_kh_offense;
897 dprint("changing role to defense\n");
898 self.havocbot_role = havocbot_role_kh_defense;
900 self.havocbot_role_timeout = 0;
904 if (self.bot_strategytime < time)
906 float key_owner_team;
908 self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
909 navigation_goalrating_start();
911 key_owner_team = kh_Key_AllOwnedByWhichTeam();
912 if(key_owner_team == self.team)
913 havocbot_goalrating_kh(100000, 1, 1); // defend anyway
914 else if(key_owner_team == -1)
915 havocbot_goalrating_kh(10000, 40000, 10000); // prefer dropped keys
917 havocbot_goalrating_kh(1, 1, 100000); // ATTACK ANYWAY
919 havocbot_goalrating_items(10000, self.origin, 10000);
920 navigation_goalrating_end();
928 void havocbot_chooserole_kh()
933 self.havocbot_role = havocbot_role_kh_offense;
935 self.havocbot_role = havocbot_role_kh_defense;
937 self.havocbot_role = havocbot_role_kh_freelancer;
940 void havocbot_chooserole()
942 dprint("choose a role...\n");
943 navigation_routetogoal(world);
944 self.bot_strategytime = -1;
946 havocbot_chooserole_ctf();
947 else if (g_domination)
948 havocbot_chooserole_dom();
950 havocbot_chooserole_kh();
952 havocbot_chooserole_race();
953 else // assume anything else is deathmatch
954 havocbot_chooserole_dm();