enable debug on building_spawnLoot

This commit is contained in:
vbawol
2013-03-17 15:11:20 -05:00
parent 2bb2fb67f4
commit e1db7e5a30

View File

@@ -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);