1.7.5.D1202

This commit is contained in:
A Clark
2012-12-07 20:29:23 -06:00
parent 73f951f1cf
commit 5521090b9e
74 changed files with 1258 additions and 576 deletions

View File

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