From 67eb8bc1141d4c4fe7ec3d044b8c058ec08747b5 Mon Sep 17 00:00:00 2001 From: He-Man Date: Fri, 26 Aug 2016 18:33:19 +0200 Subject: [PATCH] Update EPOCH_spawnLoot.sqf --- Sources/epoch_code/compile/looting/EPOCH_spawnLoot.sqf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/epoch_code/compile/looting/EPOCH_spawnLoot.sqf b/Sources/epoch_code/compile/looting/EPOCH_spawnLoot.sqf index 0f8c54af..2e8ea7cf 100644 --- a/Sources/epoch_code/compile/looting/EPOCH_spawnLoot.sqf +++ b/Sources/epoch_code/compile/looting/EPOCH_spawnLoot.sqf @@ -80,7 +80,10 @@ if ((random 100) < _lootBias) then { EPOCH_lootObjects pushBack _item; if (count EPOCH_lootObjects > _lootObjectLimit) then { - deleteVehicle (EPOCH_lootObjects deleteAt 0); + _delete = EPOCH_lootObjects deleteAt 0; + if (!isnull _delete) then { + deleteVehicle _delete; + }; }; if (surfaceIsWater _pos) then {