From 524354acca4f838c70eecaa9d08c4cf572111c72 Mon Sep 17 00:00:00 2001 From: Killswitch Date: Mon, 6 Jun 2016 17:42:21 +0200 Subject: [PATCH] Add locality check to fnc_searchNearby. See #366 --- addons/ai/fnc_searchNearby.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/ai/fnc_searchNearby.sqf b/addons/ai/fnc_searchNearby.sqf index ca798152a..e7a39c404 100644 --- a/addons/ai/fnc_searchNearby.sqf +++ b/addons/ai/fnc_searchNearby.sqf @@ -21,7 +21,9 @@ Author: ---------------------------------------------------------------------------- */ params ["_group"]; + _group = _group call CBA_fnc_getGroup; +if !(local _group) exitWith {}; // Don't create waypoints on each machine private _building = nearestBuilding (leader _group); if ((leader _group) distanceSqr _building > 250e3) exitwith {};