mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 16:03:31 +00:00
added Malden map suppport
This commit is contained in:
@@ -18,6 +18,9 @@ class CfgFunctions {
|
|||||||
class convert_to_stratis {
|
class convert_to_stratis {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_stratis.sqf";
|
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 {
|
class convert_to_vr {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_vr.sqf";
|
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_vr.sqf";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,10 +11,15 @@ switch (worldName) do {
|
|||||||
case "Stratis": {
|
case "Stratis": {
|
||||||
_realLocation = _position call armatak_fnc_convert_to_stratis;
|
_realLocation = _position call armatak_fnc_convert_to_stratis;
|
||||||
};
|
};
|
||||||
|
case "Malden": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_malden;
|
||||||
|
};
|
||||||
case "VR": {
|
case "VR": {
|
||||||
_realLocation = _position call armatak_fnc_convert_to_vr;
|
_realLocation = _position call armatak_fnc_convert_to_vr;
|
||||||
};
|
};
|
||||||
default {};
|
default {
|
||||||
|
_realLocation = [0, 0, 0];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_realLocation
|
_realLocation
|
||||||
23
addons/main/functions/map/fn_convert_to_malden.sqf
Normal file
23
addons/main/functions/map/fn_convert_to_malden.sqf
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
params["_latitude", "_longitude", "_altitude"];
|
||||||
|
|
||||||
|
_playerPosition = [_latitude, _longitude, _altitude];
|
||||||
|
|
||||||
|
_playerLatitude = _playerPosition select 0;
|
||||||
|
_playerLongitude = _playerPosition select 1;
|
||||||
|
|
||||||
|
_playerMaxLongitude = 12800;
|
||||||
|
_playerMaxLatitude = 12800;
|
||||||
|
|
||||||
|
_MapMaxLatitude = 20.827781;
|
||||||
|
_MapMinLatitude = 20.516731;
|
||||||
|
|
||||||
|
_MapMaxLongitude = 38.863442;
|
||||||
|
_MapMinLongitude = 38.549869;
|
||||||
|
|
||||||
|
_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