From 495e0c35794d4eb86e48466c6ac65ffadfa31e98 Mon Sep 17 00:00:00 2001 From: INeedBots Date: Fri, 5 Feb 2021 02:54:00 -0600 Subject: [PATCH] fixed hotel --- main_shared/maps/mp/gametypes/_bot.gsc | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/main_shared/maps/mp/gametypes/_bot.gsc b/main_shared/maps/mp/gametypes/_bot.gsc index 46bfc91..d9a6ce3 100644 --- a/main_shared/maps/mp/gametypes/_bot.gsc +++ b/main_shared/maps/mp/gametypes/_bot.gsc @@ -658,6 +658,58 @@ bot_damage_callback( eAttacker, iDamage, sMeansOfDeath, sWeapon, eInflictor, sHi self maps\mp\bots\_bot_script::bot_damage_callback( eAttacker, iDamage, sMeansOfDeath, sWeapon, eInflictor, sHitLoc ); } +/* + Bot is idle +*/ +bot_is_idle() +{ + if ( !IsDefined( self ) ) + { + return false; + } + + if ( !IsAlive( self ) ) + { + return false; + } + + if ( !self is_bot() ) + { + return false; + } + + if ( self inLastStand() ) + { + return false; + } + + if ( self HasScriptGoal() ) + { + return false; + } + + if ( IsDefined( self GetThreat() ) ) + { + return false; + } + + if ( self IsRemoteControlling() || self.bot_lock_goal ) + { + return false; + } + + if(self UseButtonPressed()) + return false; + + if(self isPlanting()) + return false; + + if(self isDefusing()) + return false; + + return true; +} + /* Watch all players grenades */