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