From 7345f46fed15c58480e9a6d2af2e21144e91d2ab Mon Sep 17 00:00:00 2001 From: deadeye2 Date: Wed, 22 Oct 2014 10:20:42 -0400 Subject: [PATCH] DZE_MissionLootTable fix Fixes a zombie loot error when using loot tables in mission file. --- SQF/dayz_code/compile/zombie_generate.sqf | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/compile/zombie_generate.sqf b/SQF/dayz_code/compile/zombie_generate.sqf index bd860b2e1..467c5373d 100644 --- a/SQF/dayz_code/compile/zombie_generate.sqf +++ b/SQF/dayz_code/compile/zombie_generate.sqf @@ -89,9 +89,15 @@ if ((dayz_spawnZombies < _maxControlledZombies) && (dayz_CurrentNearByZombies < _lootType = configFile >> "CfgVehicles" >> _type >> "zombieLoot"; if (isText _lootType) then { _array = []; - { - _array set [count _array, _x select 0] - } forEach getArray (configFile >> "cfgLoot" >> getText(_lootType)); + if (DZE_MissionLootTable) then { + { + _array set [count _array, _x select 0] + } forEach getArray (missionConfigFile >> "cfgLoot" >> getText(_lootType)); + } else { + { + _array set [count _array, _x select 0] + } forEach getArray (configFile >> "cfgLoot" >> getText(_lootType)); + }; if (count _array > 0) then { _index = dayz_CLBase find getText(_lootType); _weights = dayz_CLChances select _index;