Swap on spawn

This commit is contained in:
INeedBots 2021-03-26 00:30:39 -06:00
parent 4eda1dfb54
commit 2aa84350cb

View File

@ -2529,6 +2529,7 @@ follow_target()
}
/*
Fast swaps or reload cancels don't work cause t5 bots wait for the anim to complete
Bots will think to switch weapons
*/
bot_weapon_think()
@ -2537,6 +2538,8 @@ bot_weapon_think()
self endon("disconnect");
level endon("game_ended");
first = true;
for(;;)
{
self waittill_any_timeout(randomIntRange(2, 4), "bot_force_check_switch");
@ -2556,6 +2559,15 @@ bot_weapon_think()
if (isDefined(threat) && !isPlayer(threat))
continue;
if (first)
{
first = false;
if (randomInt(100) > 10)
continue;
}
else
{
if(curWeap != "none" && self getAmmoCount(curWeap) && curWeap != "strela_mp")
{
if(randomInt(100) > 2)
@ -2564,6 +2576,7 @@ bot_weapon_think()
if(isDefined(threat))
continue;
}
}
weaponslist = self getweaponslist();
weap = "";