Skip to content

Commit

Permalink
fix no wounds on body part
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkIsGrim committed Dec 14, 2024
1 parent 35088e3 commit d47f4da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/medical_treatment/functions/fnc_stitchWound.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
params ["_patient", "_bodyPart", ["_treatedWound", []]];

private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient);
private _bandagedWoundsOnPart = _bandagedWounds get _bodyPart;
private _bandagedWoundsOnPart = _bandagedWounds getOrDefault [_bodyPart, []];

// Get the first stitchable wound from bandaged wounds, or make sure the passed wound exists
private _bandagedIndex = (count _bandagedWoundsOnPart) - 1;
if (_treatedWound isEqualTo []) then {
_treatedWound = _bandagedWoundsOnPart select -1;
_treatedWound = _bandagedWoundsOnPart param [_bandagedIndex, _treatedWound];
} else {
_bandagedIndex = _bandagedWoundsOnPart find _treatedWound;
};
Expand Down

0 comments on commit d47f4da

Please sign in to comment.