Skip to content

Commit

Permalink
Medical - Fix getting no pulse on a dead patient receiving CPR (#9756)
Browse files Browse the repository at this point in the history
Co-authored-by: PabstMirror <[email protected]>
  • Loading branch information
LinkIsGrim and PabstMirror authored Jan 22, 2024
1 parent 4470b1f commit 7bc3fab
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions addons/medical_treatment/functions/fnc_checkPulseLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,16 @@ params ["_medic", "_patient", "_bodyPart"];

private _heartRate = 0;

if (alive _patient && {!([_patient, _bodyPart] call FUNC(hasTourniquetAppliedTo))}) then {
_heartRate = GET_HEART_RATE(_patient);
if (!([_patient, _bodyPart] call FUNC(hasTourniquetAppliedTo))) then {
_heartRate = switch (true) do {
case (alive _patient): {
GET_HEART_RATE(_patient)
};
case (alive (_patient getVariable [QEGVAR(medical,CPR_provider), objNull])): {
random [25, 30, 35] // fake heart rate because patient is dead and off state machine
};
default { 0 };
};
};

private _heartRateOutput = LSTRING(Check_Pulse_Output_5);
Expand Down

0 comments on commit 7bc3fab

Please sign in to comment.