mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
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 <commy-2@gmx.de> Co-authored-by: commy2 <commy-2@gmx.de>
This commit is contained in:
parent
d73f0f3db4
commit
f8e06b49a2
@ -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 {};
|
||||
|
Loading…
Reference in New Issue
Block a user