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.
This commit is contained in:
ebaydayz
2016-05-04 15:47:47 -04:00
parent c4d3f01f38
commit f503e53097

View File

@@ -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;