mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 20:43:30 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e4379ada4 | ||
|
|
572b2a360f | ||
|
|
083ccd2906 | ||
|
|
35a45d2cd4 | ||
|
|
2b241fbeaf | ||
|
|
ad9ba834cc | ||
|
|
469403d9b5 |
@@ -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;
|
||||||
|
|||||||
@@ -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";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ if (!isNull _digitalPointer) then {
|
|||||||
_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]];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
15
addons/main/functions/api/fn_send_enemy_cot.sqf
Normal file
15
addons/main/functions/api/fn_send_enemy_cot.sqf
Normal 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]];
|
||||||
@@ -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]];
|
||||||
|
|||||||
@@ -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]];
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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]
|
||||||
@@ -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, _atak_type, _callsign] call armatak_fnc_send_drone_cot;
|
||||||
[_x] call armatak_fnc_send_digital_pointer_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;
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ 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;
|
||||||
@@ -49,12 +49,15 @@ GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
|
|||||||
|
|
||||||
[_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, _atak_type, _callsign] call armatak_fnc_send_drone_cot;
|
||||||
[_x] call armatak_fnc_send_digital_pointer_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;
|
||||||
deleteVehicle _logic;
|
deleteVehicle _logic;
|
||||||
closeDialog 1;
|
closeDialog 1;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user