Support for enableOverdosing setting in advanced

This commit is contained in:
Glowbal 2015-04-03 21:53:58 +02:00
parent c3ddbb4be7
commit 1ef262c119

View File

@ -49,7 +49,7 @@ if (!_foundEntry) then {
_usedMeds = _target getvariable [_variable, 0]; _usedMeds = _target getvariable [_variable, 0];
if (_usedMeds >= floor (_maxDosage + round(random(2))) && _maxDosage >= 1) then { if (_usedMeds >= floor (_maxDosage + round(random(2))) && _maxDosage >= 1 && GVAR(enableOverdosing)) then {
[_target] call FUNC(setDead); [_target] call FUNC(setDead);
}; };
@ -65,7 +65,7 @@ _hasOverDosed = 0;
}foreach _allUsedMedication; }foreach _allUsedMedication;
}foreach _incompatabileMeds; }foreach _incompatabileMeds;
if (_hasOverDosed > 0) then { if (_hasOverDosed > 0 && GVAR(enableOverdosing)) then {
_medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication"); _medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication");
_onOverDose = getText (_medicationConfig >> "onOverDose"); _onOverDose = getText (_medicationConfig >> "onOverDose");
if (isClass (_medicationConfig >> _className)) then { if (isClass (_medicationConfig >> _className)) then {