selectRandomWeighted is available now

This commit is contained in:
vbawol 2017-09-07 11:50:26 -05:00
parent 649bb5d942
commit f4ff04590f
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_lootTrash.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_animal","_animalPos","_animals","_bankTerminal","_blood","_bloodPos","_cfgItemInteractions","_cfgObjectInteractions","_config","_configWorldName","_destroyTrashObj","_found","_foundLootObject","_foundObjConfig","_foundObjType","_foundTerminal","_getWorldTypes","_id","_index","_inputWorldTypes","_interactAttributes","_lootAnimalObj","_objects","_output","_randomAIClass","_return","_trashClasses","_trashType"];
private ["_animal","_animalPos","_animals","_bankTerminal","_blood","_bloodPos","_cfgItemInteractions","_cfgObjectInteractions","_config","_destroyTrashObj","_found","_foundLootObject","_foundObjConfig","_foundObjType","_foundTerminal","_getWorldTypes","_id","_index","_inputWorldTypes","_interactAttributes","_lootAnimalObj","_objects","_output","_randomAIClass","_return","_trashClasses","_trashType"];
//[[[end]]]
_return = false;
if (diag_tickTime - EPOCH_lastTrash > 2) then {

View File

@ -1,8 +1,8 @@
_spawnChance = ((EPOCH_playerNuisance + EPOCH_playerSoiled)/2) max 1;
// add more antagonist spawn chances
if (random _antagonistRndChance < _spawnChance) then {
// TODO PRE 1.0 - replace below (selectRandomWeighted _antagonistChances)
(_antagonistChances call BIS_fnc_selectRandomWeighted) call EPOCH_unitSpawnIncrease;
// selectRandomWeighted arma 1.76 or higher
(selectRandomWeighted _antagonistChances) call EPOCH_unitSpawnIncrease;
};
// diag_log format["DEBUG: _spawnChance %1",_spawnChance];