knife lunge

This commit is contained in:
ineed bots
2023-12-10 05:38:44 -06:00
parent 2cba86826c
commit 56ba69b266
5 changed files with 75 additions and 9 deletions

View File

@ -2426,7 +2426,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;
@ -2450,6 +2450,8 @@ bot_weapon_think_loop( data )
}
}
force = (ret == "bot_force_check_switch");
if ( data.first )
{
data.first = false;
@ -2467,6 +2469,8 @@ bot_weapon_think_loop( data )
if ( hasTarget )
return;
}
else
force = true;
}
weaponslist = self getweaponslist();
@ -2477,7 +2481,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 ( maps\mp\gametypes\_weapons::isHackWeapon( weapon ) )