mirror of
https://github.com/JezuzLizard/t4sp_bot_warfare.git
synced 2025-04-19 13:22:52 +00:00
update bones
This commit is contained in:
parent
772259aa13
commit
4adaab9841
@ -1171,18 +1171,17 @@ selectBoneForTarget( enemy, bones )
|
|||||||
*/
|
*/
|
||||||
updateBones()
|
updateBones()
|
||||||
{
|
{
|
||||||
self notify( "bot_updateBones" );
|
|
||||||
self endon( "bot_updateBones" );
|
|
||||||
|
|
||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
self endon( "zombified" );
|
self endon( "zombified" );
|
||||||
|
|
||||||
bones = strtok( self.pers[ "bots" ][ "skill" ][ "bones" ], "," );
|
|
||||||
waittime = self.pers[ "bots" ][ "skill" ][ "bone_update_interval" ];
|
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill_notify_or_timeout( "new_enemy", waittime );
|
oldbones = self.pers[ "bots" ][ "skill" ][ "bones" ];
|
||||||
|
bones = strtok( oldbones, "," );
|
||||||
|
|
||||||
|
while ( oldbones == self.pers[ "bots" ][ "skill" ][ "bones" ] )
|
||||||
|
{
|
||||||
|
self waittill_notify_or_timeout( self.pers[ "bots" ][ "skill" ][ "bone_update_interval" ], "new_enemy" );
|
||||||
|
|
||||||
if ( !isdefined( self.bot.target ) || !isdefined( self.bot.target.entity ) )
|
if ( !isdefined( self.bot.target ) || !isdefined( self.bot.target.entity ) )
|
||||||
{
|
{
|
||||||
@ -1191,6 +1190,7 @@ updateBones()
|
|||||||
|
|
||||||
self.bot.target.bone = selectBoneForTarget( self.bot.target.entity, bones );
|
self.bot.target.bone = selectBoneForTarget( self.bot.target.entity, bones );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user