mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 18:03:30 +00:00
added Tanoa map support
This commit is contained in:
@@ -49,23 +49,26 @@ class CfgFunctions {
|
||||
class convert_to_altis {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_altis.sqf";
|
||||
};
|
||||
class convert_to_stratis {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_stratis.sqf";
|
||||
};
|
||||
class convert_to_malden {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_malden.sqf";
|
||||
};
|
||||
class convert_to_vr {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_vr.sqf";
|
||||
class convert_to_chernarus {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_chernarus.sqf";
|
||||
};
|
||||
class convert_to_cucui {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_cucui.sqf";
|
||||
};
|
||||
class convert_to_malden {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_malden.sqf";
|
||||
};
|
||||
class convert_to_stratis {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_stratis.sqf";
|
||||
};
|
||||
class convert_to_takistan_montains {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_takistan_montains.sqf";
|
||||
};
|
||||
class convert_to_chernarus {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_chernarus.sqf";
|
||||
class convert_to_tanoa {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_tanoa.sqf";
|
||||
};
|
||||
class convert_to_vr {
|
||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_vr.sqf";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
30
addons/main/functions/map/fn_convert_to_tanoa.sqf
Normal file
30
addons/main/functions/map/fn_convert_to_tanoa.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 = -19.086825;
|
||||
private _SW_lon = 176.812772;
|
||||
|
||||
// SE corner
|
||||
private _SE_lat = -19.086825;
|
||||
private _SE_lon = 178.687920;
|
||||
|
||||
// NW corner
|
||||
private _NW_lat = -17.196898;
|
||||
private _NW_lon = 176.812622;
|
||||
|
||||
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