Remove redundant checks already being performed elsewhere

The checks are already being performed in player_spawnCheck and building_spawnZombies. There is no reason to perform them here.
This commit is contained in:
worldwidesorrow
2019-11-11 19:33:07 -06:00
committed by GitHub
parent a05a70efb4
commit e734b03be0

View File

@@ -1,7 +1,7 @@
#include "\z\addons\dayz_code\loot\Loot.hpp"
private ["_bypass","_position","_unitTypes","_radius","_method","_agent","_maxlocalspawned","_doLoiter","_wildspawns","_maxControlledZombies",
"_cantSee","_isOk","_zPos","__FILE__","_fov","_safeDistance","_farDistance","_xasl","_eye","_ed","_deg","_skipFOV","_wildSpawns","_tooClose",
"_cantSee","_isOk","_zPos","__FILE__","_fov","_safeDistance","_farDistance","_xasl","_eye","_ed","_deg","_skipFOV","_tooClose",
"_type","_loot","_array","_rnd","_lootType","_index","_weights","_loot_count","_favStance","_lootGroup"];
_position = _this select 0;
@@ -10,14 +10,6 @@ _unitTypes = _this select 2; // class of wanted models
//_wildspawns = _this select 3;
_bypass = _this select 3;
_maxlocalspawned = round(dayz_spawnZombies);
//Lets check if we need to divide the amount of zeds
if (r_player_divideinvehicle > 0) then {
_maxlocalspawned = round(dayz_spawnZombies / r_player_divideinvehicle);
};
_maxControlledZombies = round(dayz_maxLocalZombies);
_cantSee = {
private "_isOk";
@@ -61,7 +53,6 @@ _cantSee = {
_skipFOV = false;
if ((_maxlocalspawned < _maxControlledZombies) && (dayz_CurrentNearByZombies < dayz_maxNearByZombies) && (dayz_currentGlobalZombies < dayz_maxGlobalZeds)) then {
if (_bypass) then {
_skipFOV = true;
_position = [_position,3,20,1] call fn_selectRandomLocation;
@@ -120,4 +111,3 @@ if ((_maxlocalspawned < _maxControlledZombies) && (dayz_CurrentNearByZombies < d
_agent setVariable ["doLoiter", _doLoiter]; // true: Z will be wandering, false: stay still
};
};
};