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 Treatment - Fix low SpO2 making units go into cardiac arrest again #10003

Merged
merged 4 commits into from
May 11, 2024
Merged
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion addons/medical_treatment/functions/fnc_cprLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ TRACE_2("cprLocal",_medic,_patient);
private _bloodVolume = GET_BLOOD_VOLUME(_patient);
private _successChance = linearConversion [BLOOD_VOLUME_CLASS_4_HEMORRHAGE, BLOOD_VOLUME_CLASS_2_HEMORRHAGE, _bloodVolume, GVAR(cprSuccessChanceMin), GVAR(cprSuccessChanceMax), true];
if ((random 1) < _successChance) then {
// If SpO2 is too low, it will make HR skyrocket to the point where patient goes back into CA
_patient setVariable [VAR_SPO2, DEFAULT_SPO2 / 2, true];

TRACE_2("CPR random success",_bloodVolume,_successChance);
[QEGVAR(medical,CPRSucceeded), _patient] call CBA_fnc_localEvent;
} else {
TRACE_2("CPR random fail",_bloodVolume,_successChance);
};

Loading