mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 17:23:28 +00:00
added handling on SQF for letting the OTS server handle sync links on entities with core armatak module
This commit is contained in:
@@ -4,5 +4,9 @@ if (roleDescription _unit != "") then {
|
||||
_callsign = name _unit + " | " + roleDescription _unit;
|
||||
} else {
|
||||
_callsign = name _unit;
|
||||
|
||||
if (_callsign == "Error: No unit") then {
|
||||
_callsign = getText(configFile >> "CfgVehicles" >> typeOf _unit >> "displayName");
|
||||
};
|
||||
};
|
||||
_callsign
|
||||
@@ -1,4 +1,5 @@
|
||||
params["_drone"];
|
||||
|
||||
private _location = (getPos _drone) call armatak_fnc_convert_location;
|
||||
private _atak_uid = _drone call armatak_fnc_extract_uuid;
|
||||
private _atak_latitude = _location select 0;
|
||||
@@ -6,10 +7,17 @@ private _atak_longitude = _location select 1;
|
||||
private _atak_speed = speed _drone;
|
||||
private _atak_bearing = parseNumber ((getDir _drone) toFixed 0);
|
||||
private _atak_role = "a-f-A";
|
||||
private _atak_callsign = _drone getVariable "_atak_uav_callsign";
|
||||
private _atak_callsign = "UAV";
|
||||
private _atak_server_instance = missionNamespace getVariable "_atak_server_instance";
|
||||
private _atak_server_instance_token = missionNamespace getVariable "_atak_server_instance_token";
|
||||
private _atak_altitude = _location select 2;
|
||||
|
||||
if (isUAVConnected _unit) then {
|
||||
_atak_callsign = format ["[UAV]%1", typeOf _unit ];
|
||||
} else {
|
||||
_atak_callsign = getText(configFile >> "CfgVehicles" >> typeOf _unit >> "displayName");
|
||||
};
|
||||
|
||||
switch (side _drone) do {
|
||||
case "WEST": {
|
||||
_atak_role = "a-f-A-M-F-Q"
|
||||
@@ -27,6 +35,7 @@ switch (side _drone) do {
|
||||
_atak_role = "a-f-A-M-F-Q"
|
||||
};
|
||||
};
|
||||
|
||||
_drone_info = [_atak_uid, _atak_latitude, _atak_longitude, _atak_speed, _atak_bearing, _atak_role, _atak_callsign, _atak_altitude, _atak_server_instance, _atak_server_instance_token];
|
||||
|
||||
_drone_info
|
||||
@@ -3,6 +3,7 @@
|
||||
// function description: Receives a player's unit as param and return the information array needed to send the HTTP request
|
||||
|
||||
params["_unit"];
|
||||
|
||||
private _location = (getPos _unit) call armatak_fnc_convert_location;
|
||||
|
||||
private _atak_uid = [_unit] call armatak_fnc_extract_uuid;
|
||||
@@ -15,11 +16,6 @@ private _atak_callsign = [_unit] call armatak_fnc_extract_callsign;
|
||||
private _atak_altitude = _location select 2;
|
||||
private _atak_server_instance = missionNamespace getVariable "_atak_server_instance";
|
||||
private _atak_server_instance_token = missionNamespace getVariable "_atak_server_instance_token";
|
||||
_drone = vehicle (getConnectedUAVUnit _unit);
|
||||
if (!isNull _drone) then {
|
||||
_drone setVariable ["_atak_uav_connected", true];
|
||||
_drone setVariable ["_atak_uav_callsign", "[UAV]" + name _unit];
|
||||
};
|
||||
|
||||
_unit_info = [_atak_uid, _atak_latitude, _atak_longitude, _atak_speed, _atak_bearing, _atak_role, _atak_callsign, _atak_altitude, _atak_server_instance, _atak_server_instance_token];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user