mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
enable debug on building_spawnLoot
This commit is contained in:
@@ -2,6 +2,7 @@ private["_obj","_type","_config","_positions","_iPos","_nearBy","_itemType","_it
|
||||
|
||||
_obj = _this select 0;
|
||||
_type = typeOf _obj;
|
||||
diag_log format["Spawning loot for: %1", _type];
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
_positions = [] + getArray (_config >> "lootPos");
|
||||
_itemTypes = [] + getArray (_config >> "itemType");
|
||||
@@ -12,6 +13,7 @@ _lootChance = getNumber (_config >> "lootChance");
|
||||
_nearBy = nearestObjects [_iPos, ["WeaponHolder","WeaponHolderBase"], 1];
|
||||
if (count _nearBy == 0) then {
|
||||
_index = dayz_CBLBase find _type;
|
||||
diag_log format["Found %2 at index: %1", _index,_type];
|
||||
_weights = dayz_CBLChances select _index;
|
||||
_cntWeights = count _weights;
|
||||
_index = floor(random _cntWeights);
|
||||
|
||||
Reference in New Issue
Block a user