7 Commits

Author SHA1 Message Date
Valmo Trindade
7e4379ada4 Added enemy marker function to ease enemy marking 2025-11-20 04:51:10 -03:00
Valmo Trindade
572b2a360f ADded zagorsk reserverd forest map 2025-11-20 04:50:52 -03:00
Valmo Trindade
083ccd2906 Linted cot refresh rate 2025-11-15 06:56:47 -03:00
Valmo Trindade
35a45d2cd4 fixed drone handler 2025-11-15 06:48:03 -03:00
Valmo Trindade
2b241fbeaf Fixed extract position function and dependency chain 2025-11-15 01:57:23 -03:00
Valmo Trindade
ad9ba834cc Merge pull request #22 from Roborob1234/patch-1
Update fn_convert_to_stratis.sqf
2025-10-18 02:29:58 -03:00
Rob Haddow
469403d9b5 Update fn_convert_to_stratis.sqf
[Fix] Corrected NW corner from my earlier work, NW corner had the Lat value of the S edge.
2025-10-17 19:28:17 -05:00
13 changed files with 114 additions and 59 deletions

View File

@@ -77,6 +77,9 @@ switch (toLower worldName) do {
case "tanoa": { case "tanoa": {
_realLocation = _position call armatak_fnc_convert_to_tanoa; _realLocation = _position call armatak_fnc_convert_to_tanoa;
}; };
case "zagor_zagorsk_reserved_forest": {
_realLocation = _position call armatak_fnc_convert_to_zagor_zagorsk_reserved_forest;
};
default { default {
_warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Unsupported Map"]; _warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Unsupported Map"];
[[_warning, 1.5]] call CBA_fnc_notify; [[_warning, 1.5]] call CBA_fnc_notify;

View File

@@ -86,6 +86,9 @@ class CfgFunctions {
class convert_to_vr { class convert_to_vr {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_vr.sqf"; file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_vr.sqf";
}; };
class convert_to_zagor_zagorsk_reserved_forest {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_zagor_zagorsk_reserved_forest.sqf";
};
}; };
}; };
}; };

View File

@@ -3,12 +3,12 @@ params ["_unit"];
_digitalPointer = laserTarget _unit; _digitalPointer = laserTarget _unit;
if (!isNull _digitalPointer) then { if (!isNull _digitalPointer) then {
_digitalPointerPosition = _digitalPointer call armatak_client_fnc_extractClientPosition; _digitalPointerPosition = _digitalPointer call armatak_client_fnc_extractClientPosition;
_link_uid = [_unit] call armatak_fnc_extract_uuid; _link_uid = [_unit] call armatak_fnc_extract_uuid;
_contact_callsign = ([player] call armatak_fnc_extract_unit_callsign) + ".DP1"; _contact_callsign = ([player] call armatak_fnc_extract_unit_callsign) + ".DP1";
_dpCot = [_link_uid, _contact_callsign, _digitalPointerPosition select 0, _digitalPointerPosition select 1, _digitalPointerPosition select 2]; _dpCot = [_link_uid, _contact_callsign, _digitalPointerPosition select 1, _digitalPointerPosition select 2, _digitalPointerPosition select 3];
"armatak" callExtension ["tcp_socket:send_digital_pointer_cot", [_dpCot]]; "armatak" callExtension ["tcp_socket:send_digital_pointer_cot", [_dpCot]];
}; };

View File

@@ -1,11 +1,11 @@
// function name: armatak_fnc_extract_drone // function name: armatak_fnc_send_drone_cot
// function author: Valmo // function author: Valmo
// function description: Gets the drone information for the CoT Router // function description: Gets the drone information for the CoT Router
params["_drone"]; params["_drone"];
private _atak_role = "a-f-A"; private _atak_role = "a-f-A";
private _atak_callsign = [_drone] call armatak_fnc_extract_unit_callsign; private _atak_callsign = [_drone] call armatak_fnc_extract_marker_callsign;
switch (side _drone) do { switch (side _drone) do {
case "WEST": { case "WEST": {
@@ -25,4 +25,10 @@ switch (side _drone) do {
}; };
}; };
_pre_defined_role = _drone getVariable "_atak_group_role";
if (!isNil "_pre_defined_role") then {
_callsign = _pre_defined_role;
};
_cot = [_drone, _atak_role, _atak_callsign] call armatak_fnc_send_marker_cot; _cot = [_drone, _atak_role, _atak_callsign] call armatak_fnc_send_marker_cot;

View File

@@ -0,0 +1,15 @@
// function name: armatak_fnc_send_eud_cot
// function author: Valmo
// function description: Gets the information necessary for generating the EUD Cursor Over Time
params ["_unit"];
_unit_position = _unit call armatak_client_fnc_extractClientPosition;
_uuid = _unit call armatak_fnc_extract_uuid;
_type = _unit call armatak_fnc_extract_role;
_callsign = _unit call armatak_fnc_extract_marker_callsign;
_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];
"armatak" callExtension ["tcp_socket:send_marker_cot", [_marker_cot]];

View File

@@ -1,4 +1,4 @@
// function name: armatak_fnc_extract_eud_cot_info // function name: armatak_fnc_send_eud_cot
// function author: Valmo // function author: Valmo
// function description: Gets the information necessary for generating the EUD Cursor Over Time // function description: Gets the information necessary for generating the EUD Cursor Over Time
@@ -8,6 +8,5 @@ _position = _unit call armatak_client_fnc_extractClientPosition;
_uuid = _unit call armatak_fnc_extract_uuid; _uuid = _unit call armatak_fnc_extract_uuid;
_eud_cot = [_uuid, _position select 0, _position select 1, _position select 2, _callsign, _group_name, _group_role, _position select 3, speed player / 3.6]; _eud_cot = [_uuid, _position select 1, _position select 2, _position select 3, _callsign, _group_name, _group_role, _position select 5, _position select 6];
"armatak" callExtension ["tcp_socket:send_eud_cot", [_eud_cot]]; "armatak" callExtension ["tcp_socket:send_eud_cot", [_eud_cot]];

View File

@@ -8,6 +8,6 @@ _unit_position = _unit call armatak_client_fnc_extractClientPosition;
_uuid = _unit call armatak_fnc_extract_uuid; _uuid = _unit call armatak_fnc_extract_uuid;
_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]; _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];
"armatak" callExtension ["tcp_socket:send_marker_cot", [_marker_cot]]; "armatak" callExtension ["tcp_socket:send_marker_cot", [_marker_cot]];

View File

@@ -12,7 +12,7 @@ private _SE_lat = 39.458019;
private _SE_lon = 25.081992; private _SE_lon = 25.081992;
// NW corner // NW corner
private _NW_lat = 39.458019; private _NW_lat = 39.568847;
private _NW_lon = 24.939314; private _NW_lon = 24.939314;
private _edgeSE_lat = _SE_lat - _SW_lat; private _edgeSE_lat = _SE_lat - _SW_lat;

View File

@@ -0,0 +1,23 @@
params["_latitude", "_longitude", "_altitude"];
_playerPosition = [_latitude, _longitude, _altitude];
_playerLatitude = _playerPosition select 0;
_playerLongitude = _playerPosition select 1;
_playerMaxLongitude = 20480;
_playerMaxLatitude = 20480;
_MapMaxLongitude = 48.351216;
_MapMinLongitude = 48.097496;
_MapMaxLatitude = 38.345389;
_MapMinLatitude = 37.956754;
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
[_RealLongitude, _RealLatitude, _playerPosition select 2]

View File

@@ -21,12 +21,12 @@ if (isServer) exitWith {
_syncUnits = synchronizedObjects _logic; _syncUnits = synchronizedObjects _logic;
missionNamespace setVariable ["armatak_marked_units", _syncUnits]; missionNamespace setVariable ["armatak_server_syncedUnits", _syncUnits];
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units"; GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
[{ [{
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units"; GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
{ {
_objectType = _x call BIS_fnc_objectType; _objectType = _x call BIS_fnc_objectType;
@@ -45,13 +45,16 @@ if (isServer) exitWith {
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot; [_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
}; };
}; case ((_objectType select 0) == "VehicleAutonomous"): {
if (unitIsUAV _x) then { _atak_type = [_x] call armatak_fnc_extract_role;
[_x] call armatak_fnc_send_drone_cot; _callsign = [_x] call armatak_fnc_extract_marker_callsign;
[_x] call armatak_fnc_send_digital_pointer_cot;
[_x, _atak_type, _callsign] call armatak_fnc_send_drone_cot;
[_x] call armatak_fnc_send_digital_pointer_cot;
};
}; };
} forEach GVAR(syncedUnits); } forEach GVAR(syncedUnits);
}, 2, []] call CBA_fnc_addPerFrameHandler; }, 1, []] call CBA_fnc_addPerFrameHandler;
}; };
true; true;

View File

@@ -25,36 +25,39 @@ missionNamespace setVariable ["armatak_tcp_socket_is_running", true];
_syncUnits = []; _syncUnits = [];
missionNamespace setVariable ["armatak_marked_units", _syncUnits]; missionNamespace setVariable ["armatak_server_syncedUnits", _syncUnits];
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units"; GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
[{ [{
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units"; GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
{ {
_objectType = _x call BIS_fnc_objectType; _objectType = _x call BIS_fnc_objectType;
switch (true) do { switch (true) do {
case ((_objectType select 0) == "Soldier"): { case ((_objectType select 0) == "Soldier"): {
_callsign = [_x] call armatak_fnc_extract_unit_callsign; _callsign = [_x] call armatak_fnc_extract_unit_callsign;
_group_name = [group _x] call armatak_fnc_extract_group_color; _group_name = [group _x] call armatak_fnc_extract_group_color;
_group_role = [_x] call armatak_fnc_extract_group_role; _group_role = [_x] call armatak_fnc_extract_group_role;
[_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot; [_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot;
[_x] call armatak_fnc_send_digital_pointer_cot; [_x] call armatak_fnc_send_digital_pointer_cot;
};
case ((_objectType select 0) == "Vehicle"): {
_atak_type = [_x] call armatak_fnc_extract_role;
_callsign = [_x] call armatak_fnc_extract_marker_callsign;
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
};
case ((_objectType select 0) == "VehicleAutonomous"): {
_atak_type = [_x] call armatak_fnc_extract_role;
_callsign = [_x] call armatak_fnc_extract_marker_callsign;
[_x, _atak_type, _callsign] call armatak_fnc_send_drone_cot;
[_x] call armatak_fnc_send_digital_pointer_cot;
};
}; };
case ((_objectType select 0) == "Vehicle"): { } forEach GVAR(syncedUnits);
_atak_type = [_x] call armatak_fnc_extract_role; }, 1, []] call CBA_fnc_addPerFrameHandler;
_callsign = [_x] call armatak_fnc_extract_marker_callsign;
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
};
};
if (unitIsUAV _x) then {
[_x] call armatak_fnc_send_drone_cot;
[_x] call armatak_fnc_send_digital_pointer_cot;
};
} forEach GVAR(syncedUnits);
}, 2, []] call CBA_fnc_addPerFrameHandler;
deleteVehicle _logic; deleteVehicle _logic;
closeDialog 1; closeDialog 1;

View File

@@ -27,16 +27,16 @@ switch (false) do {
deleteVehicle _logic; deleteVehicle _logic;
}; };
default { default {
if (_unit in (missionNamespace getVariable ["armatak_marked_units", []])) exitWith { if (_unit in (missionNamespace getVariable ["armatak_server_syncedUnits", []])) exitWith {
["Unit already marked", "warning", "TCP Socket"] call EFUNC(main,notify); ["Unit already marked", "warning", "TCP Socket"] call EFUNC(main,notify);
deleteVehicle _logic; deleteVehicle _logic;
}; };
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units"; GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
GVAR(syncedUnits) pushBack _unit; GVAR(syncedUnits) pushBack _unit;
missionNamespace setVariable ["armatak_marked_units", GVAR(syncedUnits)]; missionNamespace setVariable ["armatak_server_syncedUnits", GVAR(syncedUnits)];
SETVAR(_unit,GVAR(isRouting),true); SETVAR(_unit,GVAR(isRouting),true);
deleteVehicle _logic; deleteVehicle _logic;

View File

@@ -34,7 +34,7 @@ switch (false) do {
}; };
} forEach GVAR(syncedUnits); } forEach GVAR(syncedUnits);
missionNmaespace setVariable ["armatak_marked_units", GVAR(syncedUnits)]; missionNmaespace setVariable ["armatak_server_syncedUnits", GVAR(syncedUnits)];
SETVAR(_unit,GVAR(isRouting),false); SETVAR(_unit,GVAR(isRouting),false);
deleteVehicle _logic; deleteVehicle _logic;