mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user