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 limb damage in medical menu #10474

Merged
merged 1 commit into from
Nov 3, 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: 6 additions & 6 deletions addons/medical_gui/functions/fnc_updateBodyImage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,17 @@ private _bodyPartBloodLoss = [0, 0, 0, 0, 0, 0];
// TODO: make multipliers for head and torso a macro in medical_engine/script_macros_medical.hpp
switch (true) do { // torso damage threshold doesn't need scaling
case (_forEachIndex > 3): { // legs: index 4 & 5
if (!EGVAR(medical,useLimbDamage) || EGVAR(medical,limbDamageThreshold) == 0) then { // Just indicate how close to the limping threshold we are
_damageThreshold = LIMPING_DAMAGE_THRESHOLD * 4;
} else {
if (EGVAR(medical,limbDamageThreshold) != 0 && {[false, !isPlayer _target, true] select EGVAR(medical,useLimbDamage)}) then { // Just indicate how close to the limping threshold we are
_damageThreshold = _damageThreshold * EGVAR(medical,limbDamageThreshold);
} else {
_damageThreshold = LIMPING_DAMAGE_THRESHOLD * 4;
};
};
case (_forEachIndex > 1): { // arms: index 2 & 3
if (!EGVAR(medical,useLimbDamage) || EGVAR(medical,limbDamageThreshold) == 0) then { // Just indicate how close to the fracture threshold we are
_damageThreshold = FRACTURE_DAMAGE_THRESHOLD * 4;
} else {
if (EGVAR(medical,limbDamageThreshold) != 0 && {[false, !isPlayer _target, true] select EGVAR(medical,useLimbDamage)}) then { // Just indicate how close to the fracture threshold we are
_damageThreshold = _damageThreshold * EGVAR(medical,limbDamageThreshold);
} else {
_damageThreshold = FRACTURE_DAMAGE_THRESHOLD * 4;
};
};
case (_forEachIndex == 0): { // head: index 0
Expand Down