From ed2798093b8961cd86a56eee32fd1b7cfe81603e Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Tue, 8 Sep 2020 12:22:02 -0400 Subject: [PATCH 1/2] Corrected issue with checking array equality. --- addons/medical_status/functions/fnc_isInStableCondition.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/medical_status/functions/fnc_isInStableCondition.sqf b/addons/medical_status/functions/fnc_isInStableCondition.sqf index 882f1b3d463..c3cc2f45529 100644 --- a/addons/medical_status/functions/fnc_isInStableCondition.sqf +++ b/addons/medical_status/functions/fnc_isInStableCondition.sqf @@ -30,9 +30,9 @@ if (EGVAR(medical_treatment,allowPainPAK) == 0 && { IS_IN_PAIN(_unit) }) exitWit if (EGVAR(medical_treatment,allowFracturesPAK) == 0 && { !(GET_FRACTURES(_unit) isEqualTo []) }) exitWith {false}; // Require at least bandaged wounds. -if (EGVAR(medical_treatment,requiredWoundStatePAK) >= 1 && { !(GET_OPEN_WOUNDS(_unit) isEqualTo []) }) exitWith {false}; +if (EGVAR(medical_treatment,requiredWoundStatePAK) == 1 && { !(count GET_OPEN_WOUNDS(_unit) == (count GET_BANDAGED_WOUNDS(_unit) + count GET_STITCHED_WOUNDS(_unit))) }) exitWith {false}; // Require stitched wounds. -if (EGVAR(medical_treatment,requiredWoundStatePAK) == 2 && { !(GET_BANDAGED_WOUNDS(_unit) isEqualTo []) }) exitWith {false}; +if (EGVAR(medical_treatment,requiredWoundStatePAK) == 2 && { !(count GET_OPEN_WOUNDS(_unit) == count GET_STITCHED_WOUNDS(_unit)) }) exitWith {false}; true From fd52164b75446f95e9d0b522c3dacc2709271490 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Tue, 8 Sep 2020 12:22:56 -0400 Subject: [PATCH 2/2] Update fnc_isInStableCondition.sqf --- addons/medical_status/functions/fnc_isInStableCondition.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical_status/functions/fnc_isInStableCondition.sqf b/addons/medical_status/functions/fnc_isInStableCondition.sqf index c3cc2f45529..21739416054 100644 --- a/addons/medical_status/functions/fnc_isInStableCondition.sqf +++ b/addons/medical_status/functions/fnc_isInStableCondition.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: Glowbal, anden3 + * Author: Glowbal, anden3, dgibso29 * Check if a unit is in a stable condition, needed for PersonalAidKit treatment * * Arguments: