mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical Engine - Fix script error for 0 overall hitpoint armor (#9633)
* Update fnc_getHitpointArmor.sqf * Update addons/medical_engine/functions/fnc_getHitpointArmor.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
This commit is contained in:
parent
9f9507931f
commit
0ae00248c5
@ -44,6 +44,10 @@ if (_rags != _prevRags) then {
|
||||
_armorScaled = _armorScaled + _itemArmorScaled;
|
||||
} forEach _gear;
|
||||
|
||||
// Armor should be at least 1 to prevent dividing by 0
|
||||
_armor = _armor max 1;
|
||||
_armorScaled = _armorScaled max 1;
|
||||
|
||||
_unit setVariable [_var, [_rags, _armor, _armorScaled]];
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user