small loot spawns

This commit is contained in:
Zac Surplice
2013-10-06 09:53:08 +11:00
parent a86568934e
commit 8ae2fbb588
2 changed files with 45 additions and 4 deletions

View File

@@ -36,14 +36,14 @@ _positionsSmall = [] + getArray (_config >> "lootPosSmall");
_iPos = _obj modelToWorld _x;
_nearBy = nearestObjects [_iPos, ["ReammoBox","WeaponHolder","WeaponHolderBase"], 1];
if (count _nearBy == 0) then {
_index = dayz_CBLBase find _type;
_index = dayzE_CBLSBase find _type;
//diag_log format["Found %2 at index: %1", _index,_type];
_weights = dayz_CBLChances select _index;
_weights = dayzE_CBLSChances select _index;
_cntWeights = count _weights;
_index = floor(random _cntWeights);
_index = _weights select _index;
_itemType = _itemTypes select _index;
[_itemType select 0, _itemType select 1 , _iPos, 0.0] call spawn_loot_small;
[_itemType select 0, _itemType select 1 , _iPos, 0.0] call spawn_loot_small;
_obj setVariable ["created",(DateToNumber date),true];
};
};