From a6bcaad182d0ba66968808056c200d68cdd8284e Mon Sep 17 00:00:00 2001 From: justchil Date: Sat, 5 Jul 2014 11:17:48 -0400 Subject: [PATCH] Update zombie_generate.sqf Fixes problem with zeds not spawning loot (or EXTREMELY rare). I believe this is not returning bool which is why count isn't working. --- SQF/dayz_code/compile/zombie_generate.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/compile/zombie_generate.sqf b/SQF/dayz_code/compile/zombie_generate.sqf index bd3d8ba5b..bd860b2e1 100644 --- a/SQF/dayz_code/compile/zombie_generate.sqf +++ b/SQF/dayz_code/compile/zombie_generate.sqf @@ -91,7 +91,7 @@ if ((dayz_spawnZombies < _maxControlledZombies) && (dayz_CurrentNearByZombies < _array = []; { _array set [count _array, _x select 0] - } count getArray (configFile >> "cfgLoot" >> getText(_lootType)); + } forEach getArray (configFile >> "cfgLoot" >> getText(_lootType)); if (count _array > 0) then { _index = dayz_CLBase find getText(_lootType); _weights = dayz_CLChances select _index; @@ -154,4 +154,4 @@ if ((dayz_spawnZombies < _maxControlledZombies) && (dayz_CurrentNearByZombies < //Start behavior _id = [_position,_agent] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm"; }; -}; \ No newline at end of file +};