From 14f156330a88ff3f819c7fdfd0da4b55529efe10 Mon Sep 17 00:00:00 2001 From: MGT Date: Sun, 17 Nov 2019 13:37:23 +0000 Subject: [PATCH] Update fn_SpawnNonPersistentVehicle.sqf Make sure area to spawn vehicle is clear --- .../addons/a3_dms/scripts/fn_SpawnNonPersistentVehicle.sqf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/@ExileServer/addons/a3_dms/scripts/fn_SpawnNonPersistentVehicle.sqf b/@ExileServer/addons/a3_dms/scripts/fn_SpawnNonPersistentVehicle.sqf index bb8359f..09d4e50 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_SpawnNonPersistentVehicle.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_SpawnNonPersistentVehicle.sqf @@ -43,6 +43,10 @@ if !(isClass (configFile >> "CfgVehicles" >> _vehicleClass)) exitWith objNull }; +//make sure area to spawn vehicle is clear +_objs = nearestTerrainObjects [_position, ["TREE","BUSH","SMALL TREE","ROCK","ROCKS","FENCE","WALL"], 50]; +{ _x hideObjectGlobal true; } forEach _objs; + private _vehObj = createVehicle [_vehicleClass, _position, [], 0, "NONE"]; clearWeaponCargoGlobal _vehObj;