Fix alt/lat for maps not defined in getMapData

This commit is contained in:
PabstMirror 2016-06-11 14:32:36 -05:00
parent c268572649
commit 4f73ead80c
2 changed files with 5 additions and 3 deletions

View File

@ -23,8 +23,10 @@ private _lat = getNumber (configFile >> "CfgWorlds" >> _map >> "latitude");
private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationOffset");
private _mapData = _map call FUNC(getMapData);
_lat = _mapData select 0;
_alt = _mapData select 1;
if (!(_mapData isEqualTo [])) then {
_lat = _mapData select 0;
_alt = _mapData select 1;
};
TRACE_2("Latitude and Altitude",_lat,_alt);
private _UTM = [_long, _lat] call BIS_fnc_posDegToUTM;

View File

@ -94,4 +94,4 @@ if (_map in ["stratis"]) exitWith { [40, 0] };
if (_map in ["xcam_prototype"]) exitWith { [35, 0] };
if (_map in ["zargabad"]) exitWith { [35, 2000] };
[0, 0]
[] //Return empty array if we have no specific data for the map