diff --git a/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp b/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp index 0886dc0a0b..cc33269d57 100644 --- a/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp +++ b/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp @@ -78,7 +78,7 @@ class GVAR(Actions) { items[] = {"ACE_tourniquet"}; treatmentTime = 4; callbackSuccess = QFUNC(treatmentTourniquet); - condition = QUOTE(!([ARR_2(_target,_bodyPart)] call EFUNC(medical,hasTourniquetAppliedTo))); + condition = QUOTE(!EGVAR(medical,basicBandages) && {!([ARR_2(_target,_bodyPart)] call EFUNC(medical,hasTourniquetAppliedTo))}); litter[] = {}; }; class RemoveTourniquet: Tourniquet { @@ -86,8 +86,8 @@ class GVAR(Actions) { displayNameProgress = ECSTRING(medical,RemovingTourniquet); items[] = {}; treatmentTime = 2.5; - callbackSuccess = QFUNC(actionRemoveTourniquet); - condition = QUOTE([ARR_2(_target,_bodyPart)] call EFUNC(medical,hasTourniquetAppliedTo)); + callbackSuccess = QFUNC(treatmentTourniquetRemove); + condition = QUOTE(!EGVAR(medical,basicBandages) && {[ARR_2(_target,_bodyPart)] call EFUNC(medical,hasTourniquetAppliedTo)}); }; // --- syringes diff --git a/addons/medical_treatment/XEH_PREP.hpp b/addons/medical_treatment/XEH_PREP.hpp index ca4cda0de9..6d634670f4 100644 --- a/addons/medical_treatment/XEH_PREP.hpp +++ b/addons/medical_treatment/XEH_PREP.hpp @@ -7,7 +7,6 @@ PREP(actionCheckResponse); PREP(actionDiagnose); PREP(actionLoadUnit); PREP(actionPlaceInBodyBag); -PREP(actionRemoveTourniquet); PREP(actionUnloadUnit); PREP(addToLog); PREP(addToTriageCard); @@ -34,6 +33,7 @@ PREP(treatmentBandage); PREP(treatmentBandageLocal); PREP(treatmentTourniquet); PREP(treatmentTourniquetLocal); +PREP(treatmentTourniquetRemove); PREP(treatmentMorphine); PREP(treatmentMorphineLocal); PREP(treatmentEpipen); diff --git a/addons/medical_treatment/functions/fnc_actionRemoveTourniquet.sqf b/addons/medical_treatment/functions/fnc_treatmentTourniquetRemove.sqf similarity index 93% rename from addons/medical_treatment/functions/fnc_actionRemoveTourniquet.sqf rename to addons/medical_treatment/functions/fnc_treatmentTourniquetRemove.sqf index 0db535957f..66e8711bb7 100644 --- a/addons/medical_treatment/functions/fnc_actionRemoveTourniquet.sqf +++ b/addons/medical_treatment/functions/fnc_treatmentTourniquetRemove.sqf @@ -12,7 +12,6 @@ * * Public: Yes */ - #include "script_component.hpp" params ["_caller", "_target", "_bodyPart"]; @@ -23,7 +22,7 @@ private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; private _tourniquets = _target getVariable [QEGVAR(medical,tourniquets), [0,0,0,0,0,0]]; // Check if there is a tourniquet on this bodypart -if ((_tourniquets select _partIndex) == 0) exitWith { +if (_tourniquets select _partIndex == 0) exitWith { [QEGVAR(common,displayTextStructured), [ELSTRING(medical,noTourniquetOnBodyPart), 1.5, _caller], [_caller]] call CBA_fnc_targetEvent; }; @@ -34,10 +33,11 @@ _target setVariable [QEGVAR(medical,tourniquets), _tourniquets, true]; // Adding the tourniquet item to the caller [_caller, "ACE_tourniquet", true] call CBA_fnc_addItem; -//Handle all injected medications now that blood is flowing: +//Handle all injected medications now that blood is flowing: @todo private _delayedMedications = _target getVariable [QGVAR(occludedMedications), []]; private _updatedArray = false; TRACE_2("meds",_partIndex,_delayedMedications); + { _x params ["", "", "_medPartNum"]; if (_partIndex == _medPartNum) then {