Skip to content

Commit bb978d1

Browse files
Medical - Allow scripted damage on dead units (#11256)
Fix condition check for unit validity in fnc_addDamageToUnit
1 parent 7104392 commit bb978d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/medical/functions/fnc_addDamageToUnit.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ _bodyPart = toLowerANSI _bodyPart;
3838
private _bodyPartIndex = ALL_BODY_PARTS find _bodyPart;
3939
if (_bodyPartIndex < 0) then { _bodyPartIndex = ALL_SELECTIONS find _bodyPart; }; // 2nd attempt with selection names ("hand_l", "hand_r", "leg_l", "leg_r")
4040
if (_bodyPartIndex < 0) exitWith {ERROR_1("addDamageToUnit - bad selection %1",_this); false};
41-
if (isNull _unit || {!local _unit} || {!alive _unit}) exitWith {ERROR_2("addDamageToUnit - badUnit %1 [local %2]",_this,local _unit); false};
41+
if (isNull _unit || {!local _unit}) exitWith {ERROR_2("addDamageToUnit - badUnit %1 [local %2]",_this,local _unit); false};
4242
if (_damageToAdd < 0) exitWith {ERROR_1("addDamageToUnit - bad damage %1",_this); false};
4343

4444
if (!_overrideInvuln && {!((isDamageAllowed _unit) && {_unit getVariable [QEGVAR(medical,allowDamage), true]})}) exitWith {

0 commit comments

Comments
 (0)