From c36fe1c8d9b169acc352eb811f6325523536c2e5 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 7 Aug 2020 20:39:48 -0600 Subject: [PATCH] fixed script ads and grenade --- main_shared/maps/mp/bots/_bot_internal.gsc | 27 ++-------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/main_shared/maps/mp/bots/_bot_internal.gsc b/main_shared/maps/mp/bots/_bot_internal.gsc index 909e48d..a23e087 100644 --- a/main_shared/maps/mp/bots/_bot_internal.gsc +++ b/main_shared/maps/mp/bots/_bot_internal.gsc @@ -852,8 +852,6 @@ aim() { if(no_trace_time > no_trace_ads_time) { - self ads(false); - if(isplay) { //better room to nade? cook time function with dist? @@ -871,18 +869,12 @@ aim() } } } - else - { - self stopNading(); - } } self botLookAt(last_pos + (0, 0, self getEyeHeight() + nadeAimOffset), aimspeed); continue; } - self stopNading(); - if(isplay) { aimpos = target getTagOrigin( "j_spineupper" ) + (0, 0, nadeAimOffset); @@ -909,21 +901,20 @@ aim() if(isplay && conedot > 0.9 && dist < level.bots_maxKnifeDistance && trace_time > reaction_time) { - self ads(false); self knife(); continue; } if(!self canFire(curweap) || !self isInRange(dist, curweap)) { - self ads(false); continue; } //c4 logic here, but doesnt work anyway canADS = self canAds(dist, curweap); - self ads(canADS); + if (canADS) + self thread pressADS(); if((!canADS || self playerads() == 1.0) && (conedot > 0.95 || dist < level.bots_maxKnifeDistance) && trace_time > reaction_time) { @@ -934,9 +925,6 @@ aim() } } - self ads(false); - self stopNading(); - if (!isDefined(self.bot.script_aimpos)) { lookat = undefined; @@ -988,17 +976,6 @@ doSemiTime() self.bot.semi_time = false; } -/* - Stop the bot from nading. -*/ -stopNading() -{ - if(self.bot.isfragging) - self thread frag(0); - if(self.bot.issmoking) - self thread smoke(0); -} - /* Returns a random grenade in the bot's inventory. */