mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 15:43:29 +00:00
Added Cucui map support for ARMATAK
This commit is contained in:
Binary file not shown.
@@ -42,7 +42,6 @@ workshop = [
|
||||
"623475643", # 3den enhanced
|
||||
"1779063631" # Zeus enhanced
|
||||
]
|
||||
mission = "atak_test_malden.Malden"
|
||||
|
||||
parameters = [
|
||||
"-skipIntro",
|
||||
|
||||
@@ -43,6 +43,9 @@ class CfgFunctions {
|
||||
class convert_to_vr {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_vr.sqf";
|
||||
};
|
||||
class convert_to_cucui {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_cucui.sqf";
|
||||
};
|
||||
class ots_postMarkers {
|
||||
file = "\armatak\armatak\armatak_main\functions\api\fn_ots_postMarkers.sqf";
|
||||
};
|
||||
|
||||
@@ -17,6 +17,9 @@ switch (worldName) do {
|
||||
case "VR": {
|
||||
_realLocation = _position call armatak_fnc_convert_to_vr;
|
||||
};
|
||||
case "cucui": {
|
||||
_realLocation = _position call armatak_fnc_convert_to_cucui;
|
||||
};
|
||||
default {
|
||||
_realLocation = [0, 0, 0];
|
||||
};
|
||||
|
||||
23
addons/main/functions/map/fn_convert_to_cucui.sqf
Normal file
23
addons/main/functions/map/fn_convert_to_cucui.sqf
Normal file
@@ -0,0 +1,23 @@
|
||||
params["_latitude", "_longitude", "_altitude"];
|
||||
|
||||
_playerPosition = [_latitude, _longitude, _altitude];
|
||||
|
||||
_playerLatitude = _playerPosition select 0;
|
||||
_playerLongitude = _playerPosition select 1;
|
||||
|
||||
_playerMaxLongitude = 19456;
|
||||
_playerMaxLatitude = 19456;
|
||||
|
||||
_MapMaxLatitude = -66.762250;
|
||||
_MapMinLatitude = -66.937028;
|
||||
|
||||
_MapMaxLongitude = 1.273167;
|
||||
_MapMinLongitude = 1.098444;
|
||||
|
||||
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
|
||||
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
|
||||
|
||||
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
|
||||
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
|
||||
|
||||
[_RealLongitude, _RealLatitude, _playerPosition select 2]
|
||||
Reference in New Issue
Block a user