This commit is contained in:
INeedBots 2020-10-31 14:34:18 -06:00
parent 03836689ff
commit 2219b684f1

View File

@ -203,6 +203,7 @@ spawned()
self thread stance();
self thread walk();
self thread target();
self thread updateBones();
self thread aim();
self thread watchHoldBreath();
self thread onNewEnemy();
@ -462,6 +463,22 @@ reload_thread()
self thread reload();
}
updateBones()
{
self endon("disconnect");
self endon("death");
for(;;)
{
self waittill_notify_or_timeout("new_enemy", self.pers["bots"]["skill"]["bone_update_interval"]);
if (!isDefined(self.bot.target))
continue;
self.bot.target.bone = random(self.pers["bots"]["skill"]["bones"]);
}
}
createTargetObj(ent, theTime)
{
obj = spawnStruct();