mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-07-04 15:41:55 +03:00
Prevent loot pile cleanup right next to player
https://github.com/DayZMod/DayZ/commit/726155f16d3f308e77ec549e3956a72f163b7968
This commit is contained in:
@@ -44,10 +44,12 @@ _lootGroup = Loot_GetGroup(getText(_config >> "lootGroup"));
|
|||||||
_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
|
//Delete existing lootpiles within 1m of spawn location if no player is right next to it
|
||||||
{
|
{
|
||||||
deleteVehicle _x;
|
if ({isPlayer _x} count (_x nearEntities ["CAManBase",4]) == 0) then {
|
||||||
dayz_currentWeaponHolders = dayz_currentWeaponHolders - 1;
|
deleteVehicle _x;
|
||||||
|
dayz_currentWeaponHolders = dayz_currentWeaponHolders - 1;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
foreach (_worldPos nearObjects ["ReammoBox", 1]);
|
foreach (_worldPos nearObjects ["ReammoBox", 1]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user