From 78d0338386f2db3b8999189cccb664e16b8528b3 Mon Sep 17 00:00:00 2001 From: jwo7777777 Date: Wed, 29 Jan 2014 01:53:03 -0600 Subject: [PATCH] Fix AI from being counted as zeds. As it was, the loop simply counted everything within a certain radius that was not a player but is a CAManBase as a zombie. --- SQF/dayz_code/compile/player_spawnCheck.sqf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/compile/player_spawnCheck.sqf b/SQF/dayz_code/compile/player_spawnCheck.sqf index 5a5a6f121..61e99e5f4 100644 --- a/SQF/dayz_code/compile/player_spawnCheck.sqf +++ b/SQF/dayz_code/compile/player_spawnCheck.sqf @@ -31,10 +31,12 @@ dayz_maxGlobalZombies = dayz_maxGlobalZombiesInit; if(isPlayer _x) then { dayz_maxGlobalZombies = dayz_maxGlobalZombies + dayz_maxGlobalZombiesIncrease; } else { - if (local _x) then { - dayz_spawnZombies = dayz_spawnZombies + 1; + if (_x isKindOf "zZombie_Base") then { + if (local _x) then { + dayz_spawnZombies = dayz_spawnZombies + 1; + }; + dayz_CurrentZombies = dayz_CurrentZombies + 1; }; - dayz_CurrentZombies = dayz_CurrentZombies + 1; }; } foreach _players;