mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Can no longer go below zero
This commit is contained in:
parent
8f76832177
commit
83cdef770a
@ -85,7 +85,7 @@ _viscosityAdjustment = _viscosityChange / _timeInSystem;
|
||||
_amountDecreased = _amountDecreased + _decreaseAmount;
|
||||
|
||||
// Restoring the viscosity while the medication is leaving the system
|
||||
_target setvariable [QGVAR(peripheralResistance), (_target getvariable [QGVAR(peripheralResistance), 100]) - _viscosityAdjustment];
|
||||
_target setvariable [QGVAR(peripheralResistance), ((_target getvariable [QGVAR(peripheralResistance), 100]) - _viscosityAdjustment) max 0];
|
||||
|
||||
if (_amountDecreased >= 1 || (_usedMeds <= 0) || !alive _target) then {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
|
@ -74,7 +74,7 @@ _target setvariable [QGVAR(pain), _pain];
|
||||
|
||||
_resistance = _unit getvariable [QGVAR(peripheralResistance), 100];
|
||||
_resistance = _resistance + _viscosityChange;
|
||||
_unit setvariable [QGVAR(peripheralResistance), _resistance];
|
||||
_unit setvariable [QGVAR(peripheralResistance), _resistance max 0];
|
||||
|
||||
// Call back to ensure that the medication is decreased over time
|
||||
[_target, _classname, _varName, _maxDose, _timeInSystem, _inCompatableMedication, _viscosityChange] call FUNC(onMedicationUsage);
|
||||
|
Loading…
Reference in New Issue
Block a user