Use nearEntities for empty drivable vehicles

NearEntities is faster and works fine for empty drivable vehicles that
are not destroyed.
This commit is contained in:
ebaydayz
2016-02-22 16:52:39 -05:00
parent ea948c7e0d
commit 9bbeb1e43e
3 changed files with 4 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ _towTruckSize = (sizeOf typeOf _towTruck);
_allowedSize = _towTruckSize-(_towTruckSize/3);
// Get all nearby vehicles within 10m
_findNearestVehicles = nearestObjects [_towTruck, ["Car","Motorcycle"], 10];
_findNearestVehicles = _towTruck nearEntities [["Car","Motorcycle"],10];
_findNearestVehicle = [];
{
if (alive _x && _towTruck != _x) then {