mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
selectRandomWeighted is available now
This commit is contained in:
parent
649bb5d942
commit
f4ff04590f
@ -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 {
|
||||
|
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user