diff --git a/main_shared/maps/mp/bots/_bot_internal.gsc b/main_shared/maps/mp/bots/_bot_internal.gsc index a48d33e..7dd4b93 100644 --- a/main_shared/maps/mp/bots/_bot_internal.gsc +++ b/main_shared/maps/mp/bots/_bot_internal.gsc @@ -45,6 +45,8 @@ added() self.pers["bots"]["behavior"]["switch"] = 1; // percentage of how often the bot will switch weapons 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 } /* @@ -971,6 +973,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; @@ -1126,7 +1131,10 @@ aim() else { if (self canAds(dist, curweap)) - self thread pressADS(); + { + if (weaponClass(curweap) != "sniper" || !self.pers["bots"]["behavior"]["quickscope"]) + self thread pressAds(); + } } self botLookAt(last_pos + (0, 0, self getEyeHeight() + nadeAimOffset), aimspeed); @@ -1182,7 +1190,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 (trace_time > reaction_time) { @@ -1219,7 +1239,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(); @@ -1391,7 +1423,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"]) diff --git a/main_shared/maps/mp/bots/_bot_script.gsc b/main_shared/maps/mp/bots/_bot_script.gsc index 0afa9bb..f13279d 100644 --- a/main_shared/maps/mp/bots/_bot_script.gsc +++ b/main_shared/maps/mp/bots/_bot_script.gsc @@ -562,6 +562,11 @@ set_class(rankxp) rank = self maps\mp\gametypes\_rank::getRankForXp( rankxp ) + 1; + if (RandomFloatRange(0, 1) < ((rank / level.maxRank) + 0.1)) + { + self.pers["bots"]["behavior"]["quickscope"] = true; + } + for(i=0; i < 5; i++) { primary = get_random_weapon(primaryGroups, rank);