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 Painkiller has no effect when Advanced Medication is off #9942

Merged
merged 3 commits into from
Apr 11, 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
7 changes: 7 additions & 0 deletions addons/medical_treatment/functions/fnc_medicationLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

// todo: move this macro to script_macros_medical.hpp?
#define MORPHINE_PAIN_SUPPRESSION 0.6
// 0.2625 = 0.6/0.8 * 0.35
// 0.6 = basic medication morph. pain suppr., 0.8 = adv. medication morph. pain suppr., 0.35 = adv. medication painkillers. pain suppr.
#define PAINKILLERS_PAIN_SUPPRESSION 0.2625

params ["_patient", "_bodyPart", "_classname"];
TRACE_3("medicationLocal",_patient,_bodyPart,_classname);
Expand All @@ -36,6 +39,10 @@ if (!GVAR(advancedMedication)) exitWith {
case "Epinephrine": {
[QEGVAR(medical,WakeUp), _patient] call CBA_fnc_localEvent;
};
case "Painkillers": {
private _painSuppress = GET_PAIN_SUPPRESS(_patient);
_patient setVariable [VAR_PAIN_SUPP, (_painSuppress + PAINKILLERS_PAIN_SUPPRESSION) min 1, true];
};
};
};
TRACE_1("Running treatmentMedicationLocal with Advanced configuration for",_patient);
Expand Down