mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 16:03:31 +00:00
added Stratis Map support
This commit is contained in:
@@ -30,6 +30,9 @@ class CfgFunctions {
|
|||||||
class convert_to_altis {
|
class convert_to_altis {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_altis.sqf";
|
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 postMarker {
|
class postMarker {
|
||||||
file = "\armatak\armatak\armatak_main\functions\api\fn_postMarker.sqf";
|
file = "\armatak\armatak\armatak_main\functions\api\fn_postMarker.sqf";
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ switch (worldName) do {
|
|||||||
case "Altis": {
|
case "Altis": {
|
||||||
_realLocation = _position call armatak_fnc_convert_to_altis;
|
_realLocation = _position call armatak_fnc_convert_to_altis;
|
||||||
};
|
};
|
||||||
|
case "Stratis": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_stratis;
|
||||||
|
};
|
||||||
default {};
|
default {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
23
addons/main/functions/map/fn_convert_to_stratis.sqf
Normal file
23
addons/main/functions/map/fn_convert_to_stratis.sqf
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
params["_latitude", "_longitude", "_altitude"];
|
||||||
|
|
||||||
|
_playerPosition = [_latitude, _longitude, _altitude];
|
||||||
|
|
||||||
|
_playerLatitude = _playerPosition select 0;
|
||||||
|
_playerLongitude = _playerPosition select 1;
|
||||||
|
|
||||||
|
_playerMaxLongitude = 8190;
|
||||||
|
_playerMaxLatitude = 8190;
|
||||||
|
|
||||||
|
_MapMaxLatitude = 25.080683;
|
||||||
|
_MapMinLatitude = 24.940569;
|
||||||
|
|
||||||
|
_MapMaxLongitude = 39.569794;
|
||||||
|
_MapMinLongitude = 39.456881;
|
||||||
|
|
||||||
|
_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