From f503e530976a34c4ffb3ff136881423feb0c5cdb Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Wed, 4 May 2016 15:47:47 -0400 Subject: [PATCH] Fix Adv. Trade nearby vehicle check detecting animals Was getting "Buying in Rabbit" when one was nearby. No need to check "AllVehicles", this is faster and will get all drivable vehicle types. --- .../AdvancedTrading/functions/z_at_checkCloseVehicle.sqf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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;