Added missing func

This commit is contained in:
INeedBots 2020-12-21 21:44:38 -06:00
parent f38bbfe9b2
commit 622e60e21e

View File

@ -257,7 +257,7 @@ bot_spawn()
level endon("game_ended"); level endon("game_ended");
if(randomInt(100) < 1) if(randomInt(100) < 1)
self bot_set_class(); self maps\mp\bots\_bot_loadout::bot_set_class();
if (getDvarInt("bots_play_obj")) if (getDvarInt("bots_play_obj"))
self thread bot_dom_cap_think(); self thread bot_dom_cap_think();
@ -350,6 +350,35 @@ bot_spawn()
} }
} }
/*
Watches when the bot is touching the obj and calls 'goal'
*/
bots_watch_touch_obj(obj)
{
self endon ("death");
self endon ("disconnect");
self endon ("bad_path");
self endon ("goal");
self endon ("new_goal");
for (;;)
{
wait 0.5;
if (!isDefined(obj))
{
self notify("bad_path");
return;
}
if (self IsTouching(obj))
{
self notify("goal");
return;
}
}
}
/* /*
Bots hang around the enemy's flag to spawn kill em Bots hang around the enemy's flag to spawn kill em
*/ */