Skip to content

Commit 572b2a3

Browse files
committed
ADded zagorsk reserverd forest map
1 parent 083ccd2 commit 572b2a3

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

addons/client/functions/fnc_convertClientLocation.sqf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ switch (toLower worldName) do {
7777
case "tanoa": {
7878
_realLocation = _position call armatak_fnc_convert_to_tanoa;
7979
};
80+
case "zagor_zagorsk_reserved_forest": {
81+
_realLocation = _position call armatak_fnc_convert_to_zagor_zagorsk_reserved_forest;
82+
};
8083
default {
8184
_warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Unsupported Map"];
8285
[[_warning, 1.5]] call CBA_fnc_notify;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
params["_latitude", "_longitude", "_altitude"];
2+
3+
_playerPosition = [_latitude, _longitude, _altitude];
4+
5+
_playerLatitude = _playerPosition select 0;
6+
_playerLongitude = _playerPosition select 1;
7+
8+
_playerMaxLongitude = 20480;
9+
_playerMaxLatitude = 20480;
10+
11+
_MapMaxLongitude = 48.351216;
12+
_MapMinLongitude = 48.097496;
13+
14+
_MapMaxLatitude = 38.345389;
15+
_MapMinLatitude = 37.956754;
16+
17+
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
18+
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
19+
20+
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
21+
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
22+
23+
[_RealLongitude, _RealLatitude, _playerPosition select 2]

0 commit comments

Comments
 (0)