Skip to content

Commit 2b241fb

Browse files
committed
Fixed extract position function and dependency chain
1 parent ad9ba83 commit 2b241fb

File tree

8 files changed

+34
-29
lines changed

8 files changed

+34
-29
lines changed

addons/main/functions/api/fn_send_digital_pointer_cot.sqf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ params ["_unit"];
33
_digitalPointer = laserTarget _unit;
44

55
if (!isNull _digitalPointer) then {
6-
_digitalPointerPosition = _digitalPointer call armatak_client_fnc_extractClientPosition;
7-
8-
_link_uid = [_unit] call armatak_fnc_extract_uuid;
9-
_contact_callsign = ([player] call armatak_fnc_extract_unit_callsign) + ".DP1";
10-
11-
_dpCot = [_link_uid, _contact_callsign, _digitalPointerPosition select 0, _digitalPointerPosition select 1, _digitalPointerPosition select 2];
12-
13-
"armatak" callExtension ["tcp_socket:send_digital_pointer_cot", [_dpCot]];
6+
_digitalPointerPosition = _digitalPointer call armatak_client_fnc_extractClientPosition;
7+
8+
_link_uid = [_unit] call armatak_fnc_extract_uuid;
9+
_contact_callsign = ([player] call armatak_fnc_extract_unit_callsign) + ".DP1";
10+
11+
_dpCot = [_link_uid, _contact_callsign, _digitalPointerPosition select 1, _digitalPointerPosition select 2, _digitalPointerPosition select 3];
12+
13+
"armatak" callExtension ["tcp_socket:send_digital_pointer_cot", [_dpCot]];
1414
};

addons/main/functions/api/fn_send_drone_cot.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// function name: armatak_fnc_extract_drone
1+
// function name: armatak_fnc_send_drone_cot
22
// function author: Valmo
33
// function description: Gets the drone information for the CoT Router
44

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// function name: armatak_fnc_extract_eud_cot_info
1+
// function name: armatak_fnc_send_eud_cot
22
// function author: Valmo
33
// function description: Gets the information necessary for generating the EUD Cursor Over Time
44

@@ -8,6 +8,5 @@ _position = _unit call armatak_client_fnc_extractClientPosition;
88

99
_uuid = _unit call armatak_fnc_extract_uuid;
1010

11-
_eud_cot = [_uuid, _position select 0, _position select 1, _position select 2, _callsign, _group_name, _group_role, _position select 3, speed player / 3.6];
12-
11+
_eud_cot = [_uuid, _position select 1, _position select 2, _position select 3, _callsign, _group_name, _group_role, _position select 5, _position select 6];
1312
"armatak" callExtension ["tcp_socket:send_eud_cot", [_eud_cot]];

addons/main/functions/api/fn_send_marker_cot.sqf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
params ["_unit", "_type", "_callsign"];
66

7-
_unit_position = _unit call armatak_client_fnc_extractClientPosition;
8-
9-
_uuid = _unit call armatak_fnc_extract_uuid;
10-
11-
_marker_cot = [_uuid, _type, _unit_position select 0, _unit_position select 1, _unit_position select 2, _callsign, _unit_position select 3, speed _unit / 3.6];
12-
13-
"armatak" callExtension ["tcp_socket:send_marker_cot", [_marker_cot]];
7+
_unit_position = _unit call armatak_client_fnc_extractClientPosition;
8+
9+
_uuid = _unit call armatak_fnc_extract_uuid;
10+
11+
_marker_cot = [_uuid, _type, _unit_position select 1, _unit_position select 2, _unit_position select 3, _callsign, _unit_position select 5, _unit_position select 6];
12+
13+
"armatak" callExtension ["tcp_socket:send_marker_cot", [_marker_cot]];

addons/server/functions/fnc_3denCoreModuleConfig.sqf

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ if (isServer) exitWith {
2121

2222
_syncUnits = synchronizedObjects _logic;
2323

24-
missionNamespace setVariable ["armatak_marked_units", _syncUnits];
24+
missionNamespace setVariable ["armatak_server_syncedUnits", _syncUnits];
2525

26-
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
26+
GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
2727

2828
[{
29-
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
29+
GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
3030

3131
{
3232
_objectType = _x call BIS_fnc_objectType;
@@ -45,6 +45,12 @@ if (isServer) exitWith {
4545

4646
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
4747
};
48+
case ((_objectType select 0) == "VehicleAutonomous"): {
49+
_atak_type = [_x] call armatak_fnc_extract_role;
50+
_callsign = [_x] call armatak_fnc_extract_marker_callsign;
51+
52+
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
53+
};
4854
};
4955
if (unitIsUAV _x) then {
5056
[_x] call armatak_fnc_send_drone_cot;

addons/server/functions/fnc_ZeusCoreModuleConfig.sqf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ missionNamespace setVariable ["armatak_tcp_socket_is_running", true];
2525

2626
_syncUnits = [];
2727

28-
missionNamespace setVariable ["armatak_marked_units", _syncUnits];
28+
missionNamespace setVariable ["armatak_server_syncedUnits", _syncUnits];
2929

30-
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
30+
GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
3131

3232
[{
33-
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
33+
GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
3434

3535
{
3636
_objectType = _x call BIS_fnc_objectType;

addons/server/functions/fnc_routerEntityAdd.sqf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ switch (false) do {
2727
deleteVehicle _logic;
2828
};
2929
default {
30-
if (_unit in (missionNamespace getVariable ["armatak_marked_units", []])) exitWith {
30+
if (_unit in (missionNamespace getVariable ["armatak_server_syncedUnits", []])) exitWith {
3131
["Unit already marked", "warning", "TCP Socket"] call EFUNC(main,notify);
3232
deleteVehicle _logic;
3333
};
3434

35-
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
35+
GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
3636

3737
GVAR(syncedUnits) pushBack _unit;
3838

39-
missionNamespace setVariable ["armatak_marked_units", GVAR(syncedUnits)];
39+
missionNamespace setVariable ["armatak_server_syncedUnits", GVAR(syncedUnits)];
4040
SETVAR(_unit,GVAR(isRouting),true);
4141

4242
deleteVehicle _logic;

addons/server/functions/fnc_routerEntityRemove.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ switch (false) do {
3434
};
3535
} forEach GVAR(syncedUnits);
3636

37-
missionNmaespace setVariable ["armatak_marked_units", GVAR(syncedUnits)];
37+
missionNmaespace setVariable ["armatak_server_syncedUnits", GVAR(syncedUnits)];
3838
SETVAR(_unit,GVAR(isRouting),false);
3939

4040
deleteVehicle _logic;

0 commit comments

Comments
 (0)