Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical - Fix getting no pulse on a dead patient receiving CPR #9756

Merged
merged 3 commits into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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