Skip to content

Commit

Permalink
Only set unconscious upon entering CA (#7503)
Browse files Browse the repository at this point in the history
Hopefully fix players being able to self interact when transitioning from cardiac arrest -> unconscious
  • Loading branch information
Whigital authored Feb 4, 2020
1 parent 3be84e9 commit cdf02f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addons/medical_status/functions/fnc_setCardiacArrestState.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit cdf02f6

Please sign in to comment.