Fixed script ads

This commit is contained in:
Your Name 2020-08-07 20:42:57 -06:00
parent f58f6d4ae5
commit 63a18c0667

View File

@ -1269,8 +1269,6 @@ aim()
{ {
if(no_trace_time > no_trace_ads_time && !usingRemote) if(no_trace_time > no_trace_ads_time && !usingRemote)
{ {
self ads(false);
if(isplay) if(isplay)
{ {
//better room to nade? cook time function with dist? //better room to nade? cook time function with dist?
@ -1315,19 +1313,18 @@ aim()
if(false && isplay && conedot > 0.9 && dist < level.bots_maxKnifeDistance && trace_time > reaction_time) if(false && isplay && conedot > 0.9 && dist < level.bots_maxKnifeDistance && trace_time > reaction_time)
{ {
self ads(false); self knife(target);
self knife();
continue; continue;
} }
if(!self canFire(curweap) || !self isInRange(dist, curweap)) if(!self canFire(curweap) || !self isInRange(dist, curweap))
{ {
self ads(false);
continue; continue;
} }
canADS = self canAds(dist, curweap); canADS = self canAds(dist, curweap);
self ads(canADS); if (canADS)
self thread pressAds();
if((!canADS || self botAdsAmount() == 1.0) && (conedot > 0.95 || dist < level.bots_maxKnifeDistance) && trace_time > reaction_time) if((!canADS || self botAdsAmount() == 1.0) && (conedot > 0.95 || dist < level.bots_maxKnifeDistance) && trace_time > reaction_time)
{ {
@ -1338,8 +1335,6 @@ aim()
} }
} }
self ads(false);
if (!isDefined(self.bot.script_aimpos)) if (!isDefined(self.bot.script_aimpos))
{ {
if (!usingRemote) if (!usingRemote)
@ -1788,6 +1783,13 @@ getRandomLargestStafe(dist)
return toptraces[randomInt(toptraces.size)]["position"]; return toptraces[randomInt(toptraces.size)]["position"];
} }
/*
Bot will knife.
*/
knife(ent)
{
}
/* /*
Bot will reload. Bot will reload.
*/ */
@ -1800,13 +1802,6 @@ reload()
// the script should reload for us. // the script should reload for us.
} }
/*
Bot will knife.
*/
knife()
{
}
botThrowGrenade(grenName) botThrowGrenade(grenName)
{ {
self endon("death"); self endon("death");