mirror of
https://github.com/ineedbots/iw5_bot_warfare.git
synced 2025-06-28 23:21:51 +00:00
bot lunge
This commit is contained in:
@ -4360,7 +4360,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;
|
||||
@ -4399,6 +4399,8 @@ bot_weapon_think_loop( data )
|
||||
return;
|
||||
}
|
||||
|
||||
force = ( ret == "bot_force_check_switch" );
|
||||
|
||||
if ( data.first )
|
||||
{
|
||||
data.first = false;
|
||||
@ -4416,6 +4418,8 @@ bot_weapon_think_loop( data )
|
||||
if ( hasTarget )
|
||||
return;
|
||||
}
|
||||
else
|
||||
force = true;
|
||||
}
|
||||
|
||||
weaponslist = self getweaponslistall();
|
||||
@ -4426,7 +4430,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 ) )
|
||||
|
Reference in New Issue
Block a user