2019-08-27 04:34:11 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
2019-09-06 03:58:27 +00:00
|
|
|
* (Server Only)
|
2019-08-27 04:34:11 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ace_radiodirectionfinder_fnc_beaconCleanup
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
TRACE_1("beaconCleanup",_this);
|
|
|
|
|
|
|
|
[{
|
|
|
|
private _removed = false;
|
|
|
|
private _list = missionNamespace getVariable [QGVAR(signalList), []];
|
2019-09-06 03:58:27 +00:00
|
|
|
private _countStart = count _list;
|
|
|
|
_list = _list select { // select if array or alive or just not-null (if not a transmitter)
|
2019-08-27 04:34:11 +00:00
|
|
|
_x params ["_obj"];
|
2019-09-06 03:58:27 +00:00
|
|
|
(_obj isEqualType []) || {alive _obj} || {(!isNull _obj) && {!(_obj isKindOf "ACE_transmitter_base")}}
|
|
|
|
};
|
|
|
|
TRACE_2("",_countStart,count _list);
|
|
|
|
if (_countStart != count _list) then {
|
|
|
|
missionNamespace setVariable [QGVAR(signalList), _list, true];
|
2019-08-27 04:34:11 +00:00
|
|
|
};
|
2019-09-06 03:58:27 +00:00
|
|
|
}, []] call CBA_fnc_execNextFrame; // delay a frame because deletedEH is weird
|