diff --git a/addons/client/functions/fnc_convertClientLocation.sqf b/addons/client/functions/fnc_convertClientLocation.sqf index 8f97a14..1eb60d1 100644 --- a/addons/client/functions/fnc_convertClientLocation.sqf +++ b/addons/client/functions/fnc_convertClientLocation.sqf @@ -77,6 +77,9 @@ switch (toLower worldName) do { case "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 { _warning = format ["ARMATAK
%1", "Unsupported Map"]; [[_warning, 1.5]] call CBA_fnc_notify; diff --git a/addons/main/CfgFunctions.hpp b/addons/main/CfgFunctions.hpp index 4475869..777099f 100644 --- a/addons/main/CfgFunctions.hpp +++ b/addons/main/CfgFunctions.hpp @@ -86,6 +86,9 @@ class CfgFunctions { class convert_to_vr { 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"; + }; }; }; }; diff --git a/addons/main/functions/api/fn_send_enemy_cot.sqf b/addons/main/functions/api/fn_send_enemy_cot.sqf new file mode 100644 index 0000000..9f3bf27 --- /dev/null +++ b/addons/main/functions/api/fn_send_enemy_cot.sqf @@ -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]]; diff --git a/addons/main/functions/map/fn_convert_to_zagor_zagorsk_reserved_forest.sqf b/addons/main/functions/map/fn_convert_to_zagor_zagorsk_reserved_forest.sqf new file mode 100644 index 0000000..2d2c86e --- /dev/null +++ b/addons/main/functions/map/fn_convert_to_zagor_zagorsk_reserved_forest.sqf @@ -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]