mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Smaller fixes / changes / comments #2
This commit is contained in:
parent
c76fc19333
commit
60b1d7e4e1
@ -13,10 +13,11 @@
|
|||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_server/EPOCH_serverLootObject.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_server/EPOCH_serverLootObject.sqf
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[cog import generate_private_arrays ]]]
|
||||||
private ["_config","_debug","_exit","_loop","_lootItemArray","_lootItemWeightedArray","_lootTable","_lootTableClass","_lootTableIndex","_loots","_magazineSize","_mags","_maxLoot","_maxPayout","_minLoot","_pricingConfig","_quan","_randomItem","_randomItemArray","_randomizeMagazineAmmoCount","_weightedItemArray"];
|
private ["_config","_debug","_exit","_loop","_lootItemArray","_lootItemWeightedArray","_lootTable","_lootTableClass","_lootTableIndex","_loots","_magazineSize","_mags","_maxLoot","_maxPayout","_minLoot","_pricingConfig","_quan","_randomItem","_randomItemArray","_randomizeMagazineAmmoCount","_weightedItemArray","_LootWHs"];
|
||||||
//[[[end]]]
|
//[[[end]]]
|
||||||
params ["_object","_type",["_forceSpawn",false],["_pos",[]],["_scatter",[]]];
|
params ["_object","_type",["_forceSpawn",false],["_pos",[]],["_scatter",[]]];
|
||||||
_debug = true;
|
_debug = true;
|
||||||
|
_LootWHs = [];
|
||||||
_pricingConfig = 'CfgPricing' call EPOCH_returnConfig;
|
_pricingConfig = 'CfgPricing' call EPOCH_returnConfig;
|
||||||
|
|
||||||
_lootTableIndex = if (EPOCH_modCUPVehiclesEnabled) then {if (EPOCH_mod_madArma_Enabled) then {3} else {1}} else {if (EPOCH_mod_madArma_Enabled) then {2} else {0}};
|
_lootTableIndex = if (EPOCH_modCUPVehiclesEnabled) then {if (EPOCH_mod_madArma_Enabled) then {3} else {1}} else {if (EPOCH_mod_madArma_Enabled) then {2} else {0}};
|
||||||
@ -44,8 +45,9 @@ if (!isNull _object || !(_scatter isequalto [])) then{
|
|||||||
{
|
{
|
||||||
if (_doScatter) then {
|
if (_doScatter) then {
|
||||||
_randomPos = [_pos,_ScatterRadiusArr call BIS_fnc_randomInt,[0,359] call BIS_fnc_randomInt] call BIS_fnc_relPos;
|
_randomPos = [_pos,_ScatterRadiusArr call BIS_fnc_randomInt,[0,359] call BIS_fnc_randomInt] call BIS_fnc_relPos;
|
||||||
_object = createVehicle ["groundweaponholder",_randomPos,[],0,"CAN_COLLIDE"];
|
_object = createVehicle ["Epoch_LootHolder",_randomPos,[],0,"CAN_COLLIDE"];
|
||||||
_object setPosATL [_randomPos select 0, _randomPos select 1, 0.1];
|
_object setPosATL [_randomPos select 0, _randomPos select 1, 0.1];
|
||||||
|
_LootWHs pushback _object;
|
||||||
};
|
};
|
||||||
_lootItemWeightedArray = [_lootTableClass, _x, "items"] call EPOCH_fnc_weightedArray;
|
_lootItemWeightedArray = [_lootTableClass, _x, "items"] call EPOCH_fnc_weightedArray;
|
||||||
if !(_lootItemWeightedArray isEqualTo[]) then {
|
if !(_lootItemWeightedArray isEqualTo[]) then {
|
||||||
@ -129,3 +131,4 @@ if (!isNull _object || !(_scatter isequalto [])) then{
|
|||||||
} forEach _loots;
|
} forEach _loots;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
_LootWHs
|
||||||
|
Loading…
Reference in New Issue
Block a user