From cdf02f629e657cb6ca7263243df1bdad348a3d10 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 4 Feb 2020 12:17:25 +0100 Subject: [PATCH] Only set unconscious upon entering CA (#7503) Hopefully fix players being able to self interact when transitioning from cardiac arrest -> unconscious --- .../medical_status/functions/fnc_setCardiacArrestState.sqf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/medical_status/functions/fnc_setCardiacArrestState.sqf b/addons/medical_status/functions/fnc_setCardiacArrestState.sqf index 2dd54c9c4d3..3dec76ab358 100644 --- a/addons/medical_status/functions/fnc_setCardiacArrestState.sqf +++ b/addons/medical_status/functions/fnc_setCardiacArrestState.sqf @@ -28,7 +28,9 @@ if (_active isEqualTo IN_CRDC_ARRST(_unit)) exitWith { TRACE_2("no change",_acti _unit setVariable [VAR_CRDC_ARRST, _active, true]; _unit setVariable [VAR_HEART_RATE, [40, 0] select _active, true]; -// Cardiac arrest is an extension of unconsciousness -[_unit, _active] call FUNC(setUnconsciousState); +// Cardiac arrest is an extension of unconsciousness, but only set when entering Cardiac arrest +if (_active) then { + [_unit, true] call FUNC(setUnconsciousState); +}; ["ace_cardiacArrest", [_unit, _active]] call CBA_fnc_localEvent;