mostly working

This commit is contained in:
2024-02-10 16:13:42 -08:00
parent 032377d7f6
commit ba708a8aa9
14 changed files with 417 additions and 94 deletions

View File

@@ -7,7 +7,7 @@
if (!isServer) exitWith {};
//get center and radius
params [["_origin", objNull, [[], objNull]],["_rad",1500, [300]]];
params [["_origin", objNull, [[], objNull]],["_radius",1500, [300]]];
if (_origin isEqualType []) then {
if (count _origin != 3) exitWith {
@@ -22,14 +22,10 @@ if (_origin isEqualType objNull) then {
_origin = getPosASL _origin;
};
private _objectsToAffect = [_origin, _rad] call FUNC(getObjectsToAffect);
// for groups, deduplicate and get AI groups only
private _groupsToAffect = _objectsToAffect apply {group _x};
_groupsToAffect = _groupsToAffect arrayIntersect _groupsToAffect;
_groupsToAffect = _groupsToAffect select {!isPlayer (leader _x)};
[QGVAR(event_empDeployed), [_origin, _objectsToAffect, _groupsToAffect]] call CBA_fnc_globalEvent;
[QGVAR(event_empDeployedPreCheck), [
random 100000,
_origin,
_radius
]] call CBA_fnc_globalEvent;
true;