Skip to content

Commit

Permalink
Add locality check to fnc_searchNearby. See #366
Browse files Browse the repository at this point in the history
  • Loading branch information
Killswitch00 committed Jun 6, 2016
1 parent a36cf13 commit 524354a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/ai/fnc_searchNearby.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
Expand Down

0 comments on commit 524354a

Please sign in to comment.