Skip to content

Commit

Permalink
External - Share radios when unconscious (#1294)
Browse files Browse the repository at this point in the history
* Radios of unconscious units are shared

* Use "lifeState" to catch not just ACE's unconsciousness

Co-authored-by: Filip Maciejewski <[email protected]>

* Indent fix

Co-authored-by: jonpas <[email protected]>

---------

Co-authored-by: Filip Maciejewski <[email protected]>
Co-authored-by: jonpas <[email protected]>
  • Loading branch information
3 people authored Oct 12, 2023
1 parent 8b3cb76 commit 37d9a18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/sys_external/fnc_getSharedExternalRadios.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ params ["_unit"];
private _radios = [_unit] call EFUNC(sys_core,getGear);
private _radioList = _radios select {_x call EFUNC(sys_radio,isUniqueRadio)};

if (!(alive _unit) || {captive _unit}) exitWith {_radioList};
if (
!(alive _unit) ||
{captive _unit} ||
{lifeState _unit isEqualTo "INCAPACITATED"}
) exitWith {_radioList};

_radioList select {[_x, "getState", "radioShared"] call EFUNC(sys_data,dataEvent)}

0 comments on commit 37d9a18

Please sign in to comment.