mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 15:33:29 +00:00
added synced units as global variables
This commit is contained in:
@@ -24,22 +24,20 @@ if (isServer) exitWith {
|
||||
|
||||
missionNamespace setVariable ["armatak_marked_units", _syncUnits];
|
||||
|
||||
_syncedUnits = missionNamespace getVariable "armatak_marked_units";
|
||||
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
|
||||
|
||||
[{
|
||||
_syncedUnits = missionNamespace getVariable "armatak_marked_units";
|
||||
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
|
||||
|
||||
{
|
||||
_objectType = _x call BIS_fnc_objectType;
|
||||
if ((_objectType select 0) == "Soldier") then {
|
||||
if (!GETVAR(_x,EGVAR(client,eudConnected),false)) then {
|
||||
_callsign = [_x] call armatak_fnc_extract_unit_callsign;
|
||||
_group_name = [group _x] call armatak_fnc_extract_group_color;
|
||||
_group_role = [_x] call armatak_fnc_extract_group_role;
|
||||
_callsign = [_x] call armatak_fnc_extract_unit_callsign;
|
||||
_group_name = [group _x] call armatak_fnc_extract_group_color;
|
||||
_group_role = [_x] call armatak_fnc_extract_group_role;
|
||||
|
||||
[_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot;
|
||||
[_x] call armatak_fnc_send_digital_pointer_cot;
|
||||
};
|
||||
[_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot;
|
||||
[_x] call armatak_fnc_send_digital_pointer_cot;
|
||||
};
|
||||
if ((_objectType select 0) == "Vehicle") then {
|
||||
_atak_type = [_x] call armatak_fnc_extract_role;
|
||||
@@ -51,7 +49,7 @@ if (isServer) exitWith {
|
||||
[_x] call armatak_fnc_send_drone_cot;
|
||||
[_x] call armatak_fnc_send_digital_pointer_cot;
|
||||
};
|
||||
} forEach _syncedUnits;
|
||||
} forEach GVAR(syncedUnits);
|
||||
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ _syncUnits = [];
|
||||
|
||||
missionNamespace setVariable ["armatak_marked_units", _syncUnits];
|
||||
|
||||
_syncedUnits = missionNamespace getVariable "armatak_marked_units";
|
||||
/*
|
||||
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
|
||||
|
||||
[{
|
||||
_syncedUnits = missionNamespace getVariable "armatak_marked_units";
|
||||
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
|
||||
|
||||
{
|
||||
_objectType = _x call BIS_fnc_objectType;
|
||||
@@ -51,8 +51,7 @@ _syncedUnits = missionNamespace getVariable "armatak_marked_units";
|
||||
[_x] call armatak_fnc_send_drone_cot;
|
||||
[_x] call armatak_fnc_send_digital_pointer_cot;
|
||||
};
|
||||
} forEach _syncedUnits;
|
||||
} forEach GVAR(syncedUnits);
|
||||
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
||||
*/
|
||||
|
||||
closeDialog 1;
|
||||
Reference in New Issue
Block a user