mirror of
https://github.com/ineedbots/t4_bot_warfare.git
synced 2025-04-19 06:52:53 +00:00
small fix
This commit is contained in:
parent
f133f5f33f
commit
5301ae50ec
@ -570,6 +570,12 @@ onWeaponChange()
|
||||
{
|
||||
first = false;
|
||||
newWeapon = self getcurrentweapon();
|
||||
|
||||
// hack fix for botstop overridding weapon
|
||||
if ( newWeapon != "none" )
|
||||
{
|
||||
self switchtoweapon( newWeapon );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -916,21 +922,21 @@ updateBones()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "death" );
|
||||
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
oldbones = self.pers[ "bots" ][ "skill" ][ "bones" ];
|
||||
bones = strtok( oldbones, "," );
|
||||
|
||||
|
||||
while ( oldbones == self.pers[ "bots" ][ "skill" ][ "bones" ] )
|
||||
{
|
||||
self waittill_notify_or_timeout( "new_enemy", self.pers[ "bots" ][ "skill" ][ "bone_update_interval" ] );
|
||||
|
||||
|
||||
if ( !isdefined( self.bot.target ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
self.bot.target.bone = PickRandom( bones );
|
||||
}
|
||||
}
|
||||
@ -1047,14 +1053,14 @@ targetObjUpdateNoTrace( obj )
|
||||
checkTraceForBone( myEye, bone )
|
||||
{
|
||||
boneLoc = self gettagorigin( bone );
|
||||
|
||||
|
||||
if ( !isdefined( boneLoc ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
trace = bullettrace( myEye, boneLoc, false, undefined );
|
||||
|
||||
|
||||
return ( sighttracepassed( myEye, boneLoc, false, undefined ) && ( trace[ "fraction" ] >= 1.0 || trace[ "surfacetype" ] == "glass" ) );
|
||||
}
|
||||
|
||||
@ -1170,8 +1176,8 @@ target_loop()
|
||||
}
|
||||
|
||||
canTargetPlayer = ( ( player checkTraceForBone( myEye, "j_head" ) ||
|
||||
player checkTraceForBone( myEye, "j_ankle_le" ) ||
|
||||
player checkTraceForBone( myEye, "j_ankle_ri" ) )
|
||||
player checkTraceForBone( myEye, "j_ankle_le" ) ||
|
||||
player checkTraceForBone( myEye, "j_ankle_ri" ) )
|
||||
|
||||
&& ( SmokeTrace( myEye, player.origin, level.smokeradius ) ||
|
||||
daDist < level.bots_maxknifedistance * 4 )
|
||||
@ -1827,6 +1833,7 @@ aim()
|
||||
for ( ;; )
|
||||
{
|
||||
wait 0.05;
|
||||
waittillframeend;
|
||||
|
||||
if ( level.inprematchperiod || level.gameended || self.bot.isfrozen || self isFlared() )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user