mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 16:03:31 +00:00
added main loop on module init function to handle CoT Routing in the module for all syncronized objects
This commit is contained in:
@@ -18,26 +18,35 @@ if (isServer) exitWith {
|
|||||||
|
|
||||||
"armatak" callExtension ["cot_router:start", [_tak_server_fulladdress]];
|
"armatak" callExtension ["cot_router:start", [_tak_server_fulladdress]];
|
||||||
|
|
||||||
/*
|
_syncUnits = synchronizedObjects _logic;
|
||||||
|
|
||||||
|
missionNamespace setVariable ["_armatak_marked_units", _syncUnits];
|
||||||
|
|
||||||
|
_syncedUnits = missionNamespace getVariable "_armatak_marked_units";
|
||||||
|
|
||||||
[{
|
[{
|
||||||
[{
|
_syncedUnits = missionNamespace getVariable "_armatak_marked_units";
|
||||||
_syncedUnits = missionNamespace getVariable "_armatak_marked_units";
|
|
||||||
_markers = [];
|
|
||||||
|
|
||||||
{
|
{
|
||||||
if (unitIsUAV _x) then {
|
_objectType = _x call BIS_fnc_objectType;
|
||||||
_marker = _x call armatak_fnc_extract_drone_info;
|
if ((_objectType select 0) == "Soldier") then {
|
||||||
_markers append [_marker];
|
_callsign = [_x] call armatak_fnc_extract_callsign;
|
||||||
} else {
|
_group_name = [group _x] call armatak_fnc_extract_group_color;
|
||||||
_marker = _x call armatak_fnc_extract_info;
|
_group_role = [_x] call armatak_fnc_extract_group_role;
|
||||||
_markers append [_marker];
|
|
||||||
};
|
|
||||||
} forEach _syncedUnits;
|
|
||||||
|
|
||||||
_request = "armatak" callExtension ["ots_api:post", [_markers]];
|
[_x, _callsign, _group_name, _group_role] call armatak_fnc_send_human_cot;
|
||||||
}, 1, []] call CBA_fnc_addPerFrameHandler;
|
};
|
||||||
}, [], 1] call CBA_fnc_waitAndExecute;
|
if ((_objectType select 0) == "Vehicle") then {
|
||||||
*/
|
_atak_type = [_x] call armatak_fnc_extract_role;
|
||||||
|
_callsign = [_x] call armatak_fnc_extract_callsign;
|
||||||
|
|
||||||
|
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
|
||||||
|
};
|
||||||
|
if (unitIsUAV _x) then {
|
||||||
|
[_x] call armatak_fnc_send_drone_cot;
|
||||||
|
};
|
||||||
|
} forEach _syncedUnits;
|
||||||
|
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
true;
|
true;
|
||||||
Reference in New Issue
Block a user