diff --git a/addons/lifecycle/functions/fnc_initConfig.sqf b/addons/lifecycle/functions/fnc_initConfig.sqf index d9070b6..20ba808 100644 --- a/addons/lifecycle/functions/fnc_initConfig.sqf +++ b/addons/lifecycle/functions/fnc_initConfig.sqf @@ -71,6 +71,19 @@ private _settingsGroup = ["GRAD Civilians", "2) lifecycle - performance & spawni false ] call CBA_fnc_addSetting; + +[ + QGVAR(spawnRate), + "SLIDER", + ["Spawn rate", "Spawn attempts per second"], + _settingsGroup, + [0.1, 25, 0.5, 2], + true, + {}, + true +] call CBA_fnc_addSetting; + + [ QGVAR(minCivOwnerFps), "SLIDER", @@ -120,7 +133,7 @@ private _settingsGroup = ["GRAD Civilians", "2) lifecycle - performance & spawni removeMissionEventHandler ["EachFrame", _x]; } forEach GVAR(efIDs); GVAR(efIDs) = []; - + [] call FUNC(overclockStateMachines); }, false diff --git a/addons/lifecycle/functions/fnc_initHCs.sqf b/addons/lifecycle/functions/fnc_initHCs.sqf index ff0d230..c9e395e 100644 --- a/addons/lifecycle/functions/fnc_initHCs.sqf +++ b/addons/lifecycle/functions/fnc_initHCs.sqf @@ -19,7 +19,7 @@ GVAR(globalSpawnHandler) = [QGVAR(globalSpawn), FUNC(localSpawnPass)] call CBA_f [FUNC(cleanupLocalCivs), 10, []] call CBA_fnc_addPerFrameHandler; if (isServer) then { - [FUNC(globalSpawnPass), 2, []] call CBA_fnc_addPerFrameHandler; + [FUNC(globalSpawnPass), 1 / GVAR(spawnRate), []] call CBA_fnc_addPerFrameHandler; }; if (CBA_isHeadlessClient) then {