Skip to content

Commit

Permalink
Merge pull request #1 from dgibso29/pr/7684
Browse files Browse the repository at this point in the history
Corrected issue with checking array equality.
  • Loading branch information
anden3 authored Sep 8, 2020
2 parents df896e7 + fd52164 commit 3e4da8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addons/medical_status/functions/fnc_isInStableCondition.sqf
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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

0 comments on commit 3e4da8d

Please sign in to comment.