diff --git a/addons/overthrow_main/functions/AI/NPC/fn_initNATOCheckpoint.sqf b/addons/overthrow_main/functions/AI/NPC/fn_initNATOCheckpoint.sqf index 5fe6cb15..f4bea0d6 100644 --- a/addons/overthrow_main/functions/AI/NPC/fn_initNATOCheckpoint.sqf +++ b/addons/overthrow_main/functions/AI/NPC/fn_initNATOCheckpoint.sqf @@ -87,8 +87,12 @@ while {!(isNil "_group") && count (units _group) > 0} do {\ if(vehicle _x != _x) then { _v = vehicle _x; _v setVelocity [0,0,0]; + private _playerpos = getpos ((units _v) select 0); { - [_x,_v,true] call OT_fnc_dumpStuff; + private _dist = _playerpos distance _x; + if (_dist < 10) then { + [_x,_v,true] call OT_fnc_dumpStuff; + } }foreach(units _v); }; }; diff --git a/addons/overthrow_main/functions/inventory/fn_getSearchStock.sqf b/addons/overthrow_main/functions/inventory/fn_getSearchStock.sqf index 7ab6c76e..25760265 100644 --- a/addons/overthrow_main/functions/inventory/fn_getSearchStock.sqf +++ b/addons/overthrow_main/functions/inventory/fn_getSearchStock.sqf @@ -10,8 +10,12 @@ if(_this isKindOf "Man") then { }else{ _myitems = (itemCargo _this) + (weaponCargo _this) + (magazineCargo _this) + (backpackCargo _this); { - _myitems = [_myitems,(items _this) + (magazines _this)] call BIS_fnc_arrayPushStack; - }foreach(units _this); + private _playerpos = getpos ((units _v) select 0); + private _dist = _playerpos distance _x; + if (_dist < 10) then { + _myitems = [_myitems,(items _x) + (magazines _x)] call BIS_fnc_arrayPushStack; + } + }foreach(units _this); }; if !(isNil "_myitems") then { {