Now returns location

This commit is contained in:
IT07 2016-04-17 16:36:02 +02:00
parent 536951ad05
commit 8934358c2a

View File

@ -14,8 +14,8 @@
_this select 6: STRING (optional) - Exact config name of mission override settings to load _this select 6: STRING (optional) - Exact config name of mission override settings to load
Returns: Returns:
if mode = loc then: ARRAY - format [name of town/location, town center position] if mode = loc: LOCATION
if mode = pos then POSITION if mode = pos: POSITION
*/ */
private ["_ret","_settings","_nonPopulated","_blackPos","_missionDistance","_range","_missionConfigName"]; private ["_ret","_settings","_nonPopulated","_blackPos","_missionDistance","_range","_missionConfigName"];
@ -136,7 +136,7 @@ if not(_mode isEqualTo "") then
}; };
if (_cntr distance (locationPosition _x) > _tooCloseRange) then if (_cntr distance (locationPosition _x) > _tooCloseRange) then
{ {
if (([text _x, locationPosition _x]) in _usedLocs) then if (_x in _usedLocs) then
{ {
_remLocs pushBack _x; _remLocs pushBack _x;
}; };
@ -147,7 +147,7 @@ if not(_mode isEqualTo "") then
private ["_loc"]; private ["_loc"];
_loc = _x; _loc = _x;
{ {
if (((locationPosition _loc) distance (_x select 1)) < _missionDistance) then if (((locationPosition _loc) distance (locationPosition _x)) < _missionDistance) then
{ {
_remLocs pushBack _loc; _remLocs pushBack _loc;
}; };
@ -199,8 +199,8 @@ if not(_mode isEqualTo "") then
if (count _locs > 0) then if (count _locs > 0) then
{ {
// Return Name and POS // Return Name and POS
_ret = [text _loc, locationPosition _loc]; _ret = _loc;
(uiNamespace getVariable "VEMFrUsedLocs") pushBack _ret; (uiNamespace getVariable "VEMFrUsedLocs") pushBack _loc;
}; };
}; };
}; };