mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Add logging for non-existent loot group small
This can probably be removed for release but for now I noticed HangarSmall doesn't exist, perhaps others as well.
This commit is contained in:
@@ -65,23 +65,26 @@ foreach _lootPos;
|
|||||||
if (isArray (_config >> "lootPosSmall")) then {
|
if (isArray (_config >> "lootPosSmall")) then {
|
||||||
_lootPos = getArray (_config >> "lootPosSmall");
|
_lootPos = getArray (_config >> "lootPosSmall");
|
||||||
_lootGroup = Loot_GetGroup((getText(_config >> "lootGroup")) + "Small");
|
_lootGroup = Loot_GetGroup((getText(_config >> "lootGroup")) + "Small");
|
||||||
|
if (_lootGroup >= 1) then {
|
||||||
{
|
|
||||||
//Get the world position of the spawn position
|
|
||||||
_worldPos = _this modelToWorld _x;
|
|
||||||
_worldPos set [2, 0 max (_worldPos select 2)];
|
|
||||||
|
|
||||||
//Delete existing lootpiles within 1m of spawn location
|
|
||||||
{
|
{
|
||||||
deleteVehicle _x;
|
//Get the world position of the spawn position
|
||||||
dayz_currentWeaponHolders = dayz_currentWeaponHolders - 1;
|
_worldPos = _this modelToWorld _x;
|
||||||
|
_worldPos set [2, 0 max (_worldPos select 2)];
|
||||||
|
|
||||||
|
//Delete existing lootpiles within 1m of spawn location
|
||||||
|
{
|
||||||
|
deleteVehicle _x;
|
||||||
|
dayz_currentWeaponHolders = dayz_currentWeaponHolders - 1;
|
||||||
|
}
|
||||||
|
foreach (_worldPos nearObjects ["ReammoBox", 1]);
|
||||||
|
|
||||||
|
if (_lootChance > random 1 && {dayz_currentWeaponHolders < dayz_maxMaxWeaponHolders}) then
|
||||||
|
{
|
||||||
|
Loot_SpawnGroup(_lootGroup, _worldPos);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
foreach (_worldPos nearObjects ["ReammoBox", 1]);
|
foreach _lootPos;
|
||||||
|
} else {
|
||||||
if (_lootChance > random 1 && {dayz_currentWeaponHolders < dayz_maxMaxWeaponHolders}) then
|
diag_log format["Loot group small: %1 does not exist", ((getText(_config >> "lootGroup")) + "Small")];
|
||||||
{
|
};
|
||||||
Loot_SpawnGroup(_lootGroup, _worldPos);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
foreach _lootPos;
|
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user