mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 05:55:42 +00:00
added bot quickscope
This commit is contained in:
parent
5a4bffdbaa
commit
c98583bd62
@ -54,6 +54,8 @@ added()
|
||||
self.pers["bots"]["behavior"]["class"] = 1; // percentage of how often the bot will change classes
|
||||
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"]["unlocks"] = [];
|
||||
}
|
||||
|
||||
@ -1088,6 +1090,9 @@ watchToLook()
|
||||
if(!self isInRange(self.bot.target.dist, curweap))
|
||||
continue;
|
||||
|
||||
if (weaponClass(curweap) == "sniper")
|
||||
continue;
|
||||
|
||||
if(randomInt(100) > self.pers["bots"]["behavior"]["jump"])
|
||||
continue;
|
||||
|
||||
@ -1260,7 +1265,10 @@ aim()
|
||||
else
|
||||
{
|
||||
if (self canAds(dist, curweap))
|
||||
self thread pressAds();
|
||||
{
|
||||
if (weaponClass(curweap) != "sniper" || !self.pers["bots"]["behavior"]["quickscope"])
|
||||
self thread pressAds();
|
||||
}
|
||||
}
|
||||
|
||||
if (!usingRemote)
|
||||
@ -1316,7 +1324,19 @@ aim()
|
||||
|
||||
canADS = (self canAds(dist, curweap) && conedot > 0.75);
|
||||
if (canADS)
|
||||
self thread pressAds();
|
||||
{
|
||||
stopAdsOverride = false;
|
||||
if (weaponClass(curweap) == "sniper")
|
||||
{
|
||||
if (self.pers["bots"]["behavior"]["quickscope"] && self.bot.last_fire_time != -1 && getTime() - self.bot.last_fire_time < 1000)
|
||||
stopAdsOverride = true;
|
||||
else
|
||||
self notify("kill_goal");
|
||||
}
|
||||
|
||||
if (!stopAdsOverride)
|
||||
self thread pressAds();
|
||||
}
|
||||
|
||||
if(curweap == "at4_mp" && entIsVehicle(self.bot.target.entity) && (!IsDefined( self.stingerStage ) || self.stingerStage != 2))
|
||||
continue;
|
||||
@ -1358,7 +1378,19 @@ aim()
|
||||
|
||||
canADS = (self canAds(dist, curweap) && conedot > 0.75);
|
||||
if (canADS)
|
||||
self thread pressAds();
|
||||
{
|
||||
stopAdsOverride = false;
|
||||
if (weaponClass(curweap) == "sniper")
|
||||
{
|
||||
if (self.pers["bots"]["behavior"]["quickscope"] && self.bot.last_fire_time != -1 && getTime() - self.bot.last_fire_time < 1000)
|
||||
stopAdsOverride = true;
|
||||
else
|
||||
self notify("kill_goal");
|
||||
}
|
||||
|
||||
if (!stopAdsOverride)
|
||||
self thread pressAds();
|
||||
}
|
||||
|
||||
if((!canADS || adsAmount >= 1.0 || self InLastStand() || self GetStance() == "prone") && (conedot > 0.95 || dist < level.bots_maxKnifeDistance) && getDvarInt("bots_play_fire"))
|
||||
self botFire(curweap);
|
||||
@ -1558,7 +1590,7 @@ walk()
|
||||
|
||||
if(self.bot.target.isplay && self.bot.target.trace_time && self canFire(curweap) && self isInRange(self.bot.target.dist, curweap))
|
||||
{
|
||||
if (self InLastStand() || self GetStance() == "prone")
|
||||
if (self InLastStand() || self GetStance() == "prone" || (weaponClass(curweap) == "sniper" && self PlayerADS() > 0))
|
||||
continue;
|
||||
|
||||
if(self.bot.target.rand <= self.pers["bots"]["behavior"]["strafe"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user