diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index b42d5bc5a6..6ab24379c5 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -79,7 +79,11 @@ class ACE_Settings { displayName = "$STR_ACE_Medical_litterSimulationDetail"; description = "$STR_ACE_Medical_litterSimulationDetail_Desc"; typeName = "SCALAR"; - value = 500; + + value = 3; + values[] = {"Off", "Low", "Medium", "High", "Ultra"}; + _values[] = { 0, 50, 100, 1000, 5000 }; + isClientSettable = 1; }; class GVAR(litterCleanUpDelay) { diff --git a/addons/medical/functions/fnc_handleCreateLitter.sqf b/addons/medical/functions/fnc_handleCreateLitter.sqf index aca47250cd..ee7e591cd1 100644 --- a/addons/medical/functions/fnc_handleCreateLitter.sqf +++ b/addons/medical/functions/fnc_handleCreateLitter.sqf @@ -4,7 +4,7 @@ if(!hasInterface) exitWith { false }; PARAMS_3(_litterClass,_position,_direction); -private["_litterObject"]; +private["_litterObject", "_maxLitterCount"]; if (isNil QGVAR(allCreatedLitter)) then { GVAR(allCreatedLitter) = []; @@ -14,7 +14,8 @@ if (isNil QGVAR(allCreatedLitter)) then { _litterObject = _litterClass createVehicleLocal _position; _litterObject setDir _direction; -if((count GVAR(allCreatedLitter)) > GVAR(litterSimulationDetail) ) then { +_maxLitterCount = getArray (configFile >> "ACE_Settings" >> QGVAR(litterSimulationDetail) >> "_values") select GVAR(litterSimulationDetail); +if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then { // gank the first litter object, and spawn ours. private["_oldLitter"]; _oldLitter = GVAR(allCreatedLitter) deleteAt 0;