diff --git a/main_shared/maps/mp/bots/_bot_script.gsc b/main_shared/maps/mp/bots/_bot_script.gsc index 3097ef6..ae204f5 100644 --- a/main_shared/maps/mp/bots/_bot_script.gsc +++ b/main_shared/maps/mp/bots/_bot_script.gsc @@ -770,31 +770,40 @@ onBotSpawned() { self waittill("bot_spawned"); - while(level.inPrematchPeriod) - wait 0.05; - - self thread bot_killstreak_think(); - self thread bot_uav_think(); - self thread bot_revenge_think(); - self thread bot_kill_equipment(); - self thread bot_kill_chopper(); - self thread bot_weapon_think(); - self thread bot_listen_to_steps(); - - self thread bot_think_camp(); - self thread bot_think_follow(); - // grenade and claymore spots - // use equipment - - //sab and sd - - self thread bot_dom_def_think(); - self thread bot_dom_spawn_kill_think(); - - self thread bot_hq(); + self thread start_bot_threads(); } } +start_bot_threads() +{ + self endon("disconnect"); + level endon("game_ended"); + self endon("death"); + + while(level.inPrematchPeriod) + wait 0.05; + + self thread bot_killstreak_think(); + self thread bot_uav_think(); + self thread bot_revenge_think(); + self thread bot_kill_equipment(); + self thread bot_kill_chopper(); + self thread bot_weapon_think(); + self thread bot_listen_to_steps(); + + self thread bot_think_camp(); + self thread bot_think_follow(); + // grenade and claymore spots + // use equipment + + //sab and sd + + self thread bot_dom_def_think(); + self thread bot_dom_spawn_kill_think(); + + self thread bot_hq(); +} + /* Bot logic for bot determining to camp. */