mirror of
https://github.com/ineedbots/t5_bot_warfare.git
synced 2025-04-20 16:45:43 +00:00
Swap on spawn
This commit is contained in:
parent
4eda1dfb54
commit
2aa84350cb
@ -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
|
Bots will think to switch weapons
|
||||||
*/
|
*/
|
||||||
bot_weapon_think()
|
bot_weapon_think()
|
||||||
@ -2537,6 +2538,8 @@ bot_weapon_think()
|
|||||||
self endon("disconnect");
|
self endon("disconnect");
|
||||||
level endon("game_ended");
|
level endon("game_ended");
|
||||||
|
|
||||||
|
first = true;
|
||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
self waittill_any_timeout(randomIntRange(2, 4), "bot_force_check_switch");
|
self waittill_any_timeout(randomIntRange(2, 4), "bot_force_check_switch");
|
||||||
@ -2556,14 +2559,24 @@ bot_weapon_think()
|
|||||||
if (isDefined(threat) && !isPlayer(threat))
|
if (isDefined(threat) && !isPlayer(threat))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(curWeap != "none" && self getAmmoCount(curWeap) && curWeap != "strela_mp")
|
if (first)
|
||||||
{
|
{
|
||||||
if(randomInt(100) > 2)
|
first = false;
|
||||||
continue;
|
|
||||||
|
|
||||||
if(isDefined(threat))
|
if (randomInt(100) > 10)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(curWeap != "none" && self getAmmoCount(curWeap) && curWeap != "strela_mp")
|
||||||
|
{
|
||||||
|
if(randomInt(100) > 2)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if(isDefined(threat))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
weaponslist = self getweaponslist();
|
weaponslist = self getweaponslist();
|
||||||
weap = "";
|
weap = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user