diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_checkCloseVehicle.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_checkCloseVehicle.sqf index 932f8d374..5b70f02a2 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_checkCloseVehicle.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_checkCloseVehicle.sqf @@ -1,9 +1,10 @@ -private ["_vehicle","_list","_result"]; +private ["_vehicle","_list","_result","_pos"]; Z_vehicle = objNull; _vehicle = objNull; -_list = nearestObjects [(getPosATL player), ["AllVehicles"], Z_VehicleDistance]; +_pos = [player] call FNC_GetPos; +_list = nearestObjects [_pos, ["Air","LandVehicle","Ship"], Z_VehicleDistance]; { - if(!isNull _x && local _x && !isPlayer _x && alive _x && !(_x isKindOf "zZombie_base"))then{ + if (!isNull _x && local _x && alive _x) then { _vehicle = _x; }; }count _list;