mirror of
https://github.com/ineedbots/iw5_bot_warfare.git
synced 2025-04-25 23:29:12 +00:00
Ignore broken equipment
This commit is contained in:
parent
13ba1daadc
commit
9b63acb5d8
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user