mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 16:23:30 +00:00
Added Kunduz map integration
This commit is contained in:
@@ -65,6 +65,9 @@ class CfgFunctions {
|
|||||||
class convert_to_cucui {
|
class convert_to_cucui {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_cucui.sqf";
|
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_cucui.sqf";
|
||||||
};
|
};
|
||||||
|
class convert_to_kunduz {
|
||||||
|
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_kunduz.sqf";
|
||||||
|
};
|
||||||
class convert_to_livonia {
|
class convert_to_livonia {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_livonia.sqf";
|
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_livonia.sqf";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ switch (toLower worldName) do {
|
|||||||
case "enoch": {
|
case "enoch": {
|
||||||
_realLocation = _position call armatak_fnc_convert_to_livonia;
|
_realLocation = _position call armatak_fnc_convert_to_livonia;
|
||||||
};
|
};
|
||||||
|
case "kunduz": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_kunduz;
|
||||||
|
};
|
||||||
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;
|
||||||
|
|||||||
30
addons/main/functions/map/fn_convert_to_kunduz.sqf
Normal file
30
addons/main/functions/map/fn_convert_to_kunduz.sqf
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
|
||||||
|
|
||||||
|
private _mapWidth = 30720;
|
||||||
|
private _mapHeight = 30720;
|
||||||
|
|
||||||
|
// SW corner (used as origin)
|
||||||
|
private _SW_lat = 36.588437;
|
||||||
|
private _SW_lon = 68.834763;
|
||||||
|
|
||||||
|
// SE corner
|
||||||
|
private _SE_lat = 36.574950;
|
||||||
|
private _SE_lon = 68.899151;
|
||||||
|
|
||||||
|
// NW corner
|
||||||
|
private _NW_lat = 36.640080;
|
||||||
|
private _NW_lon = 68.847941;
|
||||||
|
|
||||||
|
private _edgeSE_lat = _SE_lat - _SW_lat;
|
||||||
|
private _edgeSE_lon = _SE_lon - _SW_lon;
|
||||||
|
|
||||||
|
private _edgeNW_lat = _NW_lat - _SW_lat;
|
||||||
|
private _edgeNW_lon = _NW_lon - _SW_lon;
|
||||||
|
|
||||||
|
private _fx = _longitudeInGame / _mapWidth;
|
||||||
|
private _fy = _latitudeInGame / _mapHeight;
|
||||||
|
|
||||||
|
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
|
||||||
|
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
|
||||||
|
|
||||||
|
[_realLat, _realLon, _altitude]
|
||||||
Reference in New Issue
Block a user