revert distance to player check

Occasionally errors out, but may not be worth implementing in Epoch due to the increased loot
This commit is contained in:
icomrade
2017-09-15 21:12:30 -04:00
parent 51ccf16c30
commit f69bd80f43

View File

@@ -44,12 +44,10 @@ if (!(_this call DZE_SafeZonePosCheck)) then {
//Get the world position of the spawn position //Get the world position of the spawn position
_worldPos = _this modelToWorld _x; _worldPos = _this modelToWorld _x;
_worldPos set [2, 0 max (_worldPos select 2)]; _worldPos set [2, 0 max (_worldPos select 2)];
//Delete existing lootpiles within 1m of spawn location if no player is right next to it //Delete existing lootpiles within 1m of spawn location
{ {
if ({isPlayer _x} count (_x nearEntities ["CAManBase",4]) == 0) then { deleteVehicle _x;
deleteVehicle _x; dayz_currentWeaponHolders = dayz_currentWeaponHolders - 1;
dayz_currentWeaponHolders = dayz_currentWeaponHolders - 1;
};
} foreach (_worldPos nearObjects ["ReammoBox", 1]); } foreach (_worldPos nearObjects ["ReammoBox", 1]);
if (_lootChance > random 1 && {dayz_currentWeaponHolders < dayz_maxMaxWeaponHolders}) then if (_lootChance > random 1 && {dayz_currentWeaponHolders < dayz_maxMaxWeaponHolders}) then
@@ -71,12 +69,10 @@ if (isArray (_config >> "lootPosSmall")) then {
//Get the world position of the spawn position //Get the world position of the spawn position
_worldPos = _this modelToWorld _x; _worldPos = _this modelToWorld _x;
_worldPos set [2, 0 max (_worldPos select 2)]; _worldPos set [2, 0 max (_worldPos select 2)];
//Delete existing lootpiles within 1m of spawn location if no player is right next to it //Delete existing lootpiles within 1m of spawn location
{ {
if ({isPlayer _x} count (_x nearEntities ["CAManBase",4]) == 0) then { deleteVehicle _x;
deleteVehicle _x; dayz_currentWeaponHolders = dayz_currentWeaponHolders - 1;
dayz_currentWeaponHolders = dayz_currentWeaponHolders - 1;
};
} foreach (_worldPos nearObjects ["ReammoBox", 1]); } foreach (_worldPos nearObjects ["ReammoBox", 1]);
if (_lootChance > random 1 && {dayz_currentWeaponHolders < dayz_maxMaxWeaponHolders}) then if (_lootChance > random 1 && {dayz_currentWeaponHolders < dayz_maxMaxWeaponHolders}) then