ACE3/addons/logistics_wirecutter/functions/fnc_getNearestFence.sqf
2015-01-28 03:22:39 -06:00

14 lines
254 B
Plaintext

#include "script_component.hpp"
private "_nearestFence";
PARAMS_1(_unit);
_nearestFence = objNull;
{
if ((isNull _nearestFence) && {[_x] call FUNC(isFence)}) then {
_nearestFence = _x;
};
} forEach nearestObjects [_unit, [], 5];
_nearestFence