This commit is contained in:
INeedBots 2020-10-31 13:43:15 -06:00
parent 41046f33d2
commit 70e734b121

View File

@ -1402,6 +1402,7 @@ spawned()
self thread grenade_danager();
self thread target();
self thread updateBones();
self thread aim();
self thread check_reload();
self thread stance();
@ -1601,6 +1602,25 @@ reload_thread()
self thread reload();
}
updateBones()
{
self endon("disconnect");
self endon("spawned_player");
for(;;)
{
self waittill_any_timeout(self.pers["bots"]["skill"]["bone_update_interval"], "new_enemy");
if (!isAlive(self))
return;
if (!isDefined(self.bot.target))
continue;
self.bot.target.bone = random(self.pers["bots"]["skill"]["bones"]);
}
}
/*
The main target thread, will update the bot's main target. Will auto target enemy players and handle script targets.
*/