From 9b63acb5d8342bac510e2ef2e1289c3dfd95b8dc Mon Sep 17 00:00:00 2001 From: ineedbots Date: Tue, 18 May 2021 21:10:56 -0600 Subject: [PATCH] Ignore broken equipment --- maps/mp/bots/_bot_script.gsc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/maps/mp/bots/_bot_script.gsc b/maps/mp/bots/_bot_script.gsc index 8d85dd3..b4a9811 100644 --- a/maps/mp/bots/_bot_script.gsc +++ b/maps/mp/bots/_bot_script.gsc @@ -3030,6 +3030,12 @@ bot_equipment_kill_think() if (item.model != "weapon_radar" && item.model != "mp_trophy_system" && item.model != "weapon_jammer" && item.model != "projectile_bouncing_betty_grenade") continue; + if (isDefined(equ.damageTaken) && isDefined(equ.maxHealth)) + { + if (equ.damageTaken >= equ.maxHealth) + continue; + } + if ( IsDefined( item.owner ) && ((level.teamBased && item.owner.team == self.team) || item.owner == self) ) continue; @@ -3097,6 +3103,12 @@ bot_equipment_attack(equ) { return; } + + if (isDefined(equ.damageTaken) && isDefined(equ.maxHealth)) + { + if (equ.damageTaken >= equ.maxHealth) + return; + } } }