From be6d72606a81d14e642a1ec085e743ed1145d6e9 Mon Sep 17 00:00:00 2001 From: ulteq Date: Thu, 11 Jun 2015 22:35:50 +0200 Subject: [PATCH] Pain is always suppressed again --- .../fnc_treatmentAdvanced_medicationLocal.sqf | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf index 0b3bc9ea22..0457e909a6 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf @@ -72,13 +72,10 @@ if (alive _target) then { }; if (_painReduce > 0) then { - // Reduce the pain level - if (GVAR(painIsOnlySuppressed)) then { - // Suppress the pain - _painSuppress = _target getvariable [QGVAR(painSuppress), 0]; - _target setvariable [QGVAR(painSuppress), (_painSuppress + _painReduce) max 0]; - } else { - // Remove the pain + // Reduce pain + _painSuppress = _target getvariable [QGVAR(painSuppress), 0]; + _target setvariable [QGVAR(painSuppress), (_painSuppress + _painReduce) max 0]; + if (!GVAR(painIsOnlySuppressed)) then { _pain = _target getvariable [QGVAR(pain), 0]; _target setvariable [QGVAR(pain), (_pain - _painReduce) max 0, true]; };