added a more refined way to handle drones used by the player

This commit is contained in:
Valmo Trindade
2024-09-03 00:21:17 -03:00
parent eacccd8911
commit bc07343edb
3 changed files with 33 additions and 11 deletions

View File

@@ -1,8 +1,4 @@
params["_unit"];
_drone = vehicle (getConnectedUAVUnit _unit);
if (isNull _drone) exitWith {};
params["_drone"];
private _location = (getPos _drone) call armatak_fnc_convert_location;
@@ -12,7 +8,7 @@ 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 = "[UAV]" + name _unit;
private _atak_callsign = _drone getVariable "_atak_uav_callsign";
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;