From f8e06b49a21e2d005acd93e67286a60e1ba4b2c9 Mon Sep 17 00:00:00 2001 From: Zman6258 Date: Tue, 9 Nov 2021 14:49:36 -0500 Subject: [PATCH] SOG Compat - Add `isDamageAllowed` check to punji damage handler (#8670) * SOG Compat - Exclude invulnerable units from punji damage handler Title. Previously, even units with damage disabled would still have wounds added upon triggering punji traps. * Implement lazy select Co-authored-by: commy2 Co-authored-by: commy2 --- optionals/compat_sog/functions/fnc_handlePunjiTrapDamage.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optionals/compat_sog/functions/fnc_handlePunjiTrapDamage.sqf b/optionals/compat_sog/functions/fnc_handlePunjiTrapDamage.sqf index 9201929656..2448dcf7d0 100644 --- a/optionals/compat_sog/functions/fnc_handlePunjiTrapDamage.sqf +++ b/optionals/compat_sog/functions/fnc_handlePunjiTrapDamage.sqf @@ -19,7 +19,7 @@ params ["_trap"]; if (isNull (configFile >> "CfgPatches" >> "ace_medical")) exitWith {}; private _radius = getNumber (configOf _trap >> "indirectHitRange"); -private _affectedUnits = (_trap nearEntities ["CAManBase", _radius]) select {local _x}; +private _affectedUnits = (_trap nearEntities ["CAManBase", _radius]) select {local _x} select {isDamageAllowed _x}; (getShotParents _trap) params ["", "_instigator"]; if (_affectedUnits isEqualTo []) exitWith {};