From a05a70efb4c31941f53fb47f75fed467cf4ea1df Mon Sep 17 00:00:00 2001 From: worldwidesorrow Date: Mon, 11 Nov 2019 15:12:35 -0600 Subject: [PATCH] Move zombie and loot spawn checks to player_spawnCheck --- SQF/dayz_code/system/player_spawn_2.sqf | 41 ------------------------- 1 file changed, 41 deletions(-) diff --git a/SQF/dayz_code/system/player_spawn_2.sqf b/SQF/dayz_code/system/player_spawn_2.sqf index 0f373434b..326dc3db0 100644 --- a/SQF/dayz_code/system/player_spawn_2.sqf +++ b/SQF/dayz_code/system/player_spawn_2.sqf @@ -7,7 +7,6 @@ _isPZombie = player isKindOf "PZombie_VB"; _radTimer = 0; _timer = diag_tickTime; -_timer1 = diag_tickTime; _timer30 = diag_Ticktime; _timer150 = diag_ticktime; _timerMonitor = diag_ticktime; @@ -346,46 +345,6 @@ while {1 == 1} do { }; }; - if ((diag_tickTime - _timer1) > 10) then { - _position = getPosATL player; - //Other Counters - dayz_currentGlobalZombies = count entities "zZombie_Base"; - _zeds = _position nearEntities ["zZombie_Base",200]; - dayz_spawnZombies = 0; - dayz_CurrentNearByZombies = 0; - //Current amounts - { - if (alive _x) then { - if (local _x) then { - dayz_spawnZombies = dayz_spawnZombies + 1; - }; - dayz_CurrentNearByZombies = dayz_CurrentNearByZombies + 1; - }; - } count _zeds; - - //dayz_spawnZombies = {alive _x AND local _x} count (_position nearEntities ["zZombie_Base",400]); - //dayz_CurrentNearByZombies = {alive _x} count (_position nearEntities ["zZombie_Base",400]); - dayz_currentWeaponHolders = count (_position nearObjects ["ReammoBox",200]); - - //Remove empty cardborad box's << this needs to be changed moved (action menu or close button) - { - //get contents - _weapons = getWeaponCargo _x; - _magazines = getMagazineCargo _x; - _backpacks = getBackpackCargo _x; - - if ((count (_weapons select 0) < 1) and (count (_magazines select 0) < 1) and (count (_backpacks select 0) < 1)) then { - //remove vehicle, Need to ask server to remove. - diag_log format["Deleting empty nearby box: %1",_x]; - PVDZ_obj_Delete = [_x,player]; - publicVariableServer "PVDZ_obj_Delete"; - }; - - } count (_position nearObjects ["CardboardBox",10]); - - _timer1 = diag_tickTime; - }; - //Two primary guns pickup exploit fix if ((DZE_TwoPrimaries < 2) && (primaryWeapon player != "") && (!(primaryWeapon player in MeleeWeapons)) && (dayz_onBack != "") && (!(dayz_onBack in MeleeWeapons)) && (isNull (findDisplay 106)) && (animationState player != "amovpknlmstpslowwrfldnon_amovpknlmstpsraswrfldnon" OR animationState player != "amovpercmstpslowwrfldnon_amovpercmstpsraswrfldnon" OR animationState player != "amovpercmstpslowwrfldnon_amovpercmstpsraswrfldnon")) then {