added knife lunge

This commit is contained in:
ineed bots
2023-12-09 22:59:21 -06:00
parent a9b35c3502
commit 73b2cf5153
5 changed files with 71 additions and 9 deletions

View File

@@ -3900,7 +3900,7 @@ doReloadCancel()
*/
bot_weapon_think_loop( data )
{
self waittill_any_timeout( randomIntRange( 2, 4 ), "bot_force_check_switch" );
ret = self waittill_any_timeout( randomIntRange( 2, 4 ), "bot_force_check_switch" );
if ( self BotIsFrozen() )
return;
@@ -3947,6 +3947,8 @@ bot_weapon_think_loop( data )
return;
}
force = ( ret == "bot_force_check_switch" );
if ( data.first )
{
data.first = false;
@@ -3964,6 +3966,8 @@ bot_weapon_think_loop( data )
if ( hasTarget )
return;
}
else
force = true;
}
weaponslist = self getweaponslistall();
@@ -3974,7 +3978,7 @@ bot_weapon_think_loop( data )
weapon = weaponslist[randomInt( weaponslist.size )];
weaponslist = array_remove( weaponslist, weapon );
if ( !self getAmmoCount( weapon ) )
if ( !self getAmmoCount( weapon ) && !force )
continue;
if ( !isWeaponPrimary( weapon ) )