mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-16 21:22:57 +03:00
1.7.5.D1202
This commit is contained in:
@@ -1,21 +1,15 @@
|
||||
private["_serial","_positions","_lootGroup","_iArray","_iItem","_iClass","_iPos","_item","_mags","_qty","_max","_tQty","_canType","_obj","_type","_nearBy","_allItems","_items","_itemType","_itemChance","_lootChance","_weights","_index"];
|
||||
private["_obj","_type","_config","_positions","_lootChance","_itemType","_itemChance","_iPos2","_rnd","_nearBy","_weights","_index","_iArray","_item"];
|
||||
_obj = _this select 0;
|
||||
_fastRun = _this select 1;
|
||||
|
||||
_type = typeOf _obj;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
|
||||
_positions = [] + getArray (_config >> "lootPos");
|
||||
//diag_log ("LOOTSPAWN: READ:" + str(_type));
|
||||
_lootChance = getNumber (_config >> "lootChance");
|
||||
_itemType = [] + getArray (_config >> "itemType");
|
||||
//diag_log ("LOOTSPAWN: READ:" + str(_itemType));
|
||||
_itemChance = [] + getArray (_config >> "itemChance");
|
||||
|
||||
//diag_log ("LOOTSPAWN: Type " + str(count _itemType) + " / Chance " + str(count _itemChance));
|
||||
|
||||
//diag_log ("I want to spawn loot...");
|
||||
|
||||
{
|
||||
private["_iPos2"];
|
||||
_iPos2 = _obj modelToWorld _x;
|
||||
@@ -38,13 +32,10 @@ _itemChance = [] + getArray (_config >> "itemChance");
|
||||
_iArray set [3,0];
|
||||
_iArray call spawn_loot;
|
||||
_iArray = [];
|
||||
diag_log ("LOOTSPAWN");
|
||||
//diag_log ("LOOTSPAWN");
|
||||
};
|
||||
_item setVariable ["created",(DateToNumber date),true];
|
||||
};
|
||||
if (!_fastRun) then {
|
||||
sleep 0.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach _positions;
|
||||
Reference in New Issue
Block a user