From 7504a2c3a5282346f6afe257aa4cf2787d6997f7 Mon Sep 17 00:00:00 2001 From: Valmo Trindade Date: Fri, 31 Jan 2025 05:05:36 -0300 Subject: [PATCH] improved drone_cot function to use other extract functions --- addons/main/functions/api/fn_send_drone_cot.sqf | 6 ++---- addons/main/functions/api/fn_send_human_cot.sqf | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/addons/main/functions/api/fn_send_drone_cot.sqf b/addons/main/functions/api/fn_send_drone_cot.sqf index 5cf69a0..5737cc7 100644 --- a/addons/main/functions/api/fn_send_drone_cot.sqf +++ b/addons/main/functions/api/fn_send_drone_cot.sqf @@ -5,7 +5,7 @@ params["_drone"]; private _atak_role = "a-f-A"; -private _atak_callsign = getText(configFile >> "CfgVehicles" >> typeOf _drone >> "displayName"); +private _atak_callsign = [_unit] call armatak_fnc_extract_callsign; switch (side _drone) do { case "WEST": { @@ -25,6 +25,4 @@ switch (side _drone) do { }; }; -_cot = [_drone, _atak_role, _atak_callsign] call armatak_fnc_extract_marker_cot_info; - -"armatak" callExtension ["cot_router:send_marker_cot", [_cot]]; \ No newline at end of file +_cot = [_drone, _atak_role, _atak_callsign] call armatak_fnc_send_marker_cot; \ No newline at end of file diff --git a/addons/main/functions/api/fn_send_human_cot.sqf b/addons/main/functions/api/fn_send_human_cot.sqf index 998ef10..ff3c0d6 100644 --- a/addons/main/functions/api/fn_send_human_cot.sqf +++ b/addons/main/functions/api/fn_send_human_cot.sqf @@ -4,9 +4,9 @@ params ["_unit", "_callsign", "_group_name", "_group_role"]; -_unit_position = _unit call armatak_fnc_extract_position; +_position = _unit call armatak_fnc_extract_position; _uuid = _unit call armatak_fnc_extract_uuid; -_human_cot = [_uuid, _unit_position select 0, _unit_position select 1, _unit_position select 2, _callsign, _group_name, _group_role, _unit_position select 3, speed player / 3.6]; +_human_cot = [_uuid, _position select 0, _position select 1, _position select 2, _callsign, _group_name, _group_role, _position select 3, speed player / 3.6]; "armatak" callExtension ["cot_router:send_human_cot", [_human_cot]]; \ No newline at end of file