2021-06-13 13:21:01 +00:00
|
|
|
params [["_excludeList", []]];
|
2016-07-25 23:01:42 +00:00
|
|
|
|
2016-07-26 01:16:03 +00:00
|
|
|
private _candidates = lzList;
|
2016-07-25 23:01:42 +00:00
|
|
|
|
2021-06-13 13:21:01 +00:00
|
|
|
if (_excludeList isEqualType []) then
|
|
|
|
{
|
|
|
|
_candidates = _candidates - _excludeList;
|
2016-07-26 01:16:03 +00:00
|
|
|
};
|
2016-07-25 23:01:42 +00:00
|
|
|
|
2021-06-13 13:21:01 +00:00
|
|
|
private _taskLocations = [west] call getSideActiveTasks apply { [_x] call BIS_fnc_taskDestination };
|
|
|
|
|
|
|
|
for "_i" from 0 to LZCOUNT do {
|
|
|
|
private _candidate = selectRandom _candidates;
|
2021-06-24 14:16:32 +00:00
|
|
|
if (_taskLocations findIf { _x distance _candidate < LZMinDistace } == -1 && { allPlayers findIf { _x distance _candidate > LZMaxDistace } == -1 } && { allPlayers findIf { _x distance _candidate < 200 } == -1 }) exitWith { _candidate };
|
2021-06-13 13:21:01 +00:00
|
|
|
false
|
2021-06-24 14:16:32 +00:00
|
|
|
}
|