mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-05-10 22:24:52 +00:00
Fast swap, swap on spawn
This commit is contained in:
parent
a0c3666653
commit
afdc975a97
@ -47,6 +47,7 @@ added()
|
|||||||
self.pers["bots"]["behavior"]["jump"] = 100; // percentage of how often the bot will jumpshot and dropshot
|
self.pers["bots"]["behavior"]["jump"] = 100; // percentage of how often the bot will jumpshot and dropshot
|
||||||
|
|
||||||
self.pers["bots"]["behavior"]["quickscope"] = false; // is a quickscoper
|
self.pers["bots"]["behavior"]["quickscope"] = false; // is a quickscoper
|
||||||
|
self.pers["bots"]["behavior"]["initswitch"] = 10; // percentage of how often the bot will switch weapons on spawn
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2154,7 +2154,7 @@ doReloadCancel()
|
|||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
self waittill("reload");
|
ret = self waittill_any_return("reload", "weapon_change");
|
||||||
|
|
||||||
if(self BotIsFrozen())
|
if(self BotIsFrozen())
|
||||||
continue;
|
continue;
|
||||||
@ -2166,10 +2166,17 @@ doReloadCancel()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
curWeap = self GetCurrentWeapon();
|
curWeap = self GetCurrentWeapon();
|
||||||
// check single reloads
|
|
||||||
if (self GetWeaponAmmoClip(curWeap) < WeaponClipSize(curWeap))
|
if (!maps\mp\gametypes\_weapons::isSideArm( weapon ) && !maps\mp\gametypes\_weapons::isPrimaryWeapon( weapon ))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (ret == "reload")
|
||||||
|
{
|
||||||
|
// check single reloads
|
||||||
|
if (self GetWeaponAmmoClip(curWeap) < WeaponClipSize(curWeap))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// check difficulty
|
// check difficulty
|
||||||
if (self.pers["bots"]["skill"]["base"] <= 3)
|
if (self.pers["bots"]["skill"]["base"] <= 3)
|
||||||
continue;
|
continue;
|
||||||
@ -2200,6 +2207,7 @@ doReloadCancel()
|
|||||||
self BotChangeToWeapon(weap);
|
self BotChangeToWeapon(weap);
|
||||||
wait 0.25;
|
wait 0.25;
|
||||||
self BotChangeToWeapon(curWeap);
|
self BotChangeToWeapon(curWeap);
|
||||||
|
wait 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2211,6 +2219,8 @@ bot_weapon_think()
|
|||||||
self endon("death");
|
self endon("death");
|
||||||
self endon("disconnect");
|
self endon("disconnect");
|
||||||
level endon("game_ended");
|
level endon("game_ended");
|
||||||
|
|
||||||
|
first = true;
|
||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
@ -2237,13 +2247,23 @@ bot_weapon_think()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(curWeap != "none" && self getAmmoCount(curWeap) && curWeap != "c4_mp")
|
if (first)
|
||||||
{
|
{
|
||||||
if(randomInt(100) > self.pers["bots"]["behavior"]["switch"])
|
first = false;
|
||||||
|
|
||||||
|
if(randomInt(100) > self.pers["bots"]["behavior"]["initswitch"])
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(curWeap != "none" && self getAmmoCount(curWeap) && curWeap != "c4_mp")
|
||||||
|
{
|
||||||
|
if(randomInt(100) > self.pers["bots"]["behavior"]["switch"])
|
||||||
|
continue;
|
||||||
|
|
||||||
if(hasTarget)
|
if(hasTarget)
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
weaponslist = self getweaponslist();
|
weaponslist = self getweaponslist();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user