From c8841264e086e2274a9f457d5ae018042cc9b042 Mon Sep 17 00:00:00 2001 From: Grim <69561145+LinkIsGrim@users.noreply.github.com> Date: Tue, 26 Nov 2024 21:00:53 -0300 Subject: [PATCH] Medical GUI - Fix bad comparison for useLimbDamage setting (#10526) --- .../medical_gui/functions/fnc_updateInjuryList.sqf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/medical_gui/functions/fnc_updateInjuryList.sqf b/addons/medical_gui/functions/fnc_updateInjuryList.sqf index f7a9eec1122..c9c9694a445 100644 --- a/addons/medical_gui/functions/fnc_updateInjuryList.sqf +++ b/addons/medical_gui/functions/fnc_updateInjuryList.sqf @@ -168,17 +168,17 @@ if (GVAR(showDamageEntry)) then { private _damageThreshold = GET_DAMAGE_THRESHOLD(_target); switch (true) do { case (_selectionN > 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 = FRACTURE_DAMAGE_THRESHOLD * 4; }; }; case (_selectionN > 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 (_selectionN == 0): { // head: index 0