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 */