Prevent loot pile cleanup right next to player

726155f16d
This commit is contained in:
icomrade
2017-09-08 11:12:40 -04:00
parent 0a54dd02a2
commit e0005850b8

View File

@@ -44,10 +44,12 @@ _lootGroup = Loot_GetGroup(getText(_config >> "lootGroup"));
_worldPos = _this modelToWorld _x;
_worldPos set [2, 0 max (_worldPos select 2)];
//Delete existing lootpiles within 1m of spawn location
//Delete existing lootpiles within 1m of spawn location if no player is right next to it
{
deleteVehicle _x;
dayz_currentWeaponHolders = dayz_currentWeaponHolders - 1;
if ({isPlayer _x} count (_x nearEntities ["CAManBase",4]) == 0) then {
deleteVehicle _x;
dayz_currentWeaponHolders = dayz_currentWeaponHolders - 1;
};
}
foreach (_worldPos nearObjects ["ReammoBox", 1]);