Skip to content

Commit de5ac9d

Browse files
committed
Added Malvinas Maps
1 parent ef3be1e commit de5ac9d

7 files changed

+140
-0
lines changed

addons/client/functions/fnc_convertClientLocation.sqf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,21 @@ switch (toLower worldName) do {
7474
case "kunduz_valley": {
7575
_realLocation = _position call armatak_fnc_convert_to_kunduz_valley;
7676
};
77+
case "malvinasfalkands": {
78+
_realLocation = _position call armatak_fnc_convert_to_malvinas_malvinasfalkands;
79+
};
80+
case "pebble_island_airfield": {
81+
_realLocation = _position call armatak_fnc_convert_to_malvinas_pebble_island_airfield;
82+
};
83+
case "p_argentino_stanley": {
84+
_realLocation = _position call armatak_fnc_convert_to_malvinas_p_argentino_stanley;
85+
};
86+
case "top_malo_house": {
87+
_realLocation = _position call armatak_fnc_convert_to_malvinas_top_malo_house;
88+
};
89+
case "pradera_ganso": {
90+
_realLocation = _position call armatak_fnc_convert_to_malvinas_pradera_ganso;
91+
};
7792
case "tanoa": {
7893
_realLocation = _position call armatak_fnc_convert_to_tanoa;
7994
};

addons/main/CfgFunctions.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ class CfgFunctions {
7474
class convert_to_malden {
7575
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malden.sqf";
7676
};
77+
class convert_to_malvinas_malvinasfalkands {
78+
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_malvinasfalkands.sqf";
79+
};
80+
class convert_to_malvinas_p_argentino_stanley {
81+
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_p_argentino_stanley.sqf";
82+
};
83+
class convert_to_malvinas_pebble_island_airfield {
84+
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_pebble_island_airfield.sqf";
85+
};
86+
class convert_to_malvinas_top_malo_house {
87+
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_top_malo_house.sqf";
88+
};
7789
class convert_to_southen_sahrani {
7890
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_southen_sahrani.sqf";
7991
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
2+
3+
private _mapWidth = 11264;
4+
private _mapHeight = 11264;
5+
6+
// SW corner (used as origin)
7+
private _SW_lat = -51.736078;
8+
private _SW_lon = -57.915032;
9+
10+
// SE corner
11+
private _SE_lat = -51.736078;
12+
private _SE_lon = -58.077879;
13+
14+
// NW corner
15+
private _NW_lat = -51.634750;
16+
private _NW_lon = -58.077879;
17+
18+
private _edgeSE_lat = _SE_lat - _SW_lat;
19+
private _edgeSE_lon = _SE_lon - _SW_lon;
20+
21+
private _edgeNW_lat = _NW_lat - _SW_lat;
22+
private _edgeNW_lon = _NW_lon - _SW_lon;
23+
24+
private _fx = _longitudeInGame / _mapWidth;
25+
private _fy = _latitudeInGame / _mapHeight;
26+
27+
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
28+
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
29+
30+
[_realLat, _realLon, _altitude]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
2+
3+
private _mapWidth = 16384;
4+
private _mapHeight = 16384;
5+
6+
// SW corner (used as origin)
7+
private _SW_lat = -51.806546;
8+
private _SW_lon = -57.939747;
9+
10+
// SE corner
11+
private _SE_lat = -51.806546;
12+
private _SE_lon = -57.701978;
13+
14+
// NW corner
15+
private _NW_lat = -51.658913;
16+
private _NW_lon = -57.939747;
17+
18+
private _edgeSE_lat = _SE_lat - _SW_lat;
19+
private _edgeSE_lon = _SE_lon - _SW_lon;
20+
21+
private _edgeNW_lat = _NW_lat - _SW_lat;
22+
private _edgeNW_lon = _NW_lon - _SW_lon;
23+
24+
private _fx = _longitudeInGame / _mapWidth;
25+
private _fy = _latitudeInGame / _mapHeight;
26+
27+
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
28+
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
29+
30+
[_realLat, _realLon, _altitude]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
2+
3+
private _mapWidth = 10240;
4+
private _mapHeight = 10240;
5+
6+
// SW corner (used as origin)
7+
private _SW_lat = -51.863358;
8+
private _SW_lon = -59.054585;
9+
10+
// SE corner
11+
private _SE_lat = -51.863358;
12+
private _SE_lon = -58.906155;
13+
14+
// NW corner
15+
private _NW_lat = -51.771493;
16+
private _NW_lon = -59.054585;
17+
18+
private _edgeSE_lat = _SE_lat - _SW_lat;
19+
private _edgeSE_lon = _SE_lon - _SW_lon;
20+
21+
private _edgeNW_lat = _NW_lat - _SW_lat;
22+
private _edgeNW_lon = _NW_lon - _SW_lon;
23+
24+
private _fx = _longitudeInGame / _mapWidth;
25+
private _fy = _latitudeInGame / _mapHeight;
26+
27+
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
28+
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
29+
30+
[_realLat, _realLon, _altitude]

addons/main/functions/map/fn_convert_to_malvinas_pradera_ganso.sqf

Whitespace-only changes.
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 = 5120;
9+
_playerMaxLatitude = 5120;
10+
11+
_MapMaxLatitude = -51.619725;
12+
_MapMinLatitude = -51.664223;
13+
14+
_MapMaxLongitude = -58.394630;
15+
_MapMinLongitude = -58.469580;
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)