diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index dcb48ecda5..ab4f944f89 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -14,8 +14,8 @@ * Success? * * Example: - * [bob, true] call ace_medical_status__fnc_setUnconscious; - * [player, true, 5, true] call ace_medical_status_fnc_setUnconscious; + * [bob, true] call ace_medical_fnc_setUnconscious; + * [player, true, 5, true] call ace_medical_fnc_setUnconscious; * * Public: yes */ diff --git a/addons/medical_treatment/functions/fnc_treatmentFullHealLocal.sqf b/addons/medical_treatment/functions/fnc_treatmentFullHealLocal.sqf index c31423e87a..4dfa555828 100644 --- a/addons/medical_treatment/functions/fnc_treatmentFullHealLocal.sqf +++ b/addons/medical_treatment/functions/fnc_treatmentFullHealLocal.sqf @@ -16,6 +16,17 @@ params ["_target"]; if (!alive _target) exitWith {}; +// Treatment conditions would normally limit this to non-unconc units, but treatment event may be called externally (zeus) +if (_target getVariable [QEGVAR(medical,inCardiacArrest), false]) then { + TRACE_1("exiting cardiac arrest",_target); + [QEGVAR(medical,CPRSucceeded), _target] call CBA_fnc_localEvent; +}; +if (_target getVariable ["ACE_isUnconscious",false]) then { + TRACE_1("waking up",_target); // wake up first or unconc variables will be reset + [QEGVAR(medical,WakeUp), _target] call CBA_fnc_localEvent; +}; + + _target setVariable [VAR_PAIN, 0, true]; _target setVariable [VAR_BLOOD_VOL, DEFAULT_BLOOD_VOLUME, true]; diff --git a/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf b/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf index 5c056757f5..e5fbc51704 100644 --- a/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf @@ -76,7 +76,9 @@ private _tourniquets = GET_TOURNIQUETS(_unit); _tourniquetPain = _tourniquetPain max (CBA_missionTime - _x - 120) * 0.001; }; } forEach _tourniquets; -[_unit, _tourniquetPain] call EFUNC(medical_status,adjustPainLevel); +if (_tourniquetPain > 0) then { + [_unit, _tourniquetPain] call EFUNC(medical_status,adjustPainLevel); +}; private _heartRate = [_unit, _deltaT, _syncValues] call FUNC(updateHeartRate); [_unit, _deltaT, _syncValues] call FUNC(updatePainSuppress); diff --git a/addons/zeus/functions/fnc_moduleHeal.sqf b/addons/zeus/functions/fnc_moduleHeal.sqf index 647112f67a..287a84ac79 100644 --- a/addons/zeus/functions/fnc_moduleHeal.sqf +++ b/addons/zeus/functions/fnc_moduleHeal.sqf @@ -43,8 +43,9 @@ switch (false) do { }; // Heal validated target -if (["ace_medical"] call EFUNC(common,isModLoaded) && {EGVAR(medical,level) > 0}) then { - [QEGVAR(medical,treatmentAdvanced_fullHealLocal), [_unit, _unit], _unit] call CBA_fnc_targetEvent; +if (["ace_medical"] call EFUNC(common,isModLoaded)) then { + TRACE_1("healing with ace_medical",_unit); + [QEGVAR(medical_treatment,treatmentFullHealLocal), [_unit], _unit] call CBA_fnc_targetEvent; } else { // BI's scripted revive system if ((missionNamespace getVariable ["bis_revive_mode", 0]) != 0) then { diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index ff1948dd92..9bcec2cdcb 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -37,9 +37,9 @@ if (isNil QEFUNC(medical,setUnconscious)) then { if !(alive _unit) then { [LSTRING(OnlyAlive)] call FUNC(showMessage); } else { - private _conscious = GETVAR(_unit,ACE_isUnconscious,false); + private _unconscious = GETVAR(_unit,ACE_isUnconscious,false); // Function handles locality for me - [_unit, !_conscious, 10e10] call EFUNC(medical,setUnconscious); + [_unit, !_unconscious, 10e10] call EFUNC(medical,setUnconscious); }; }; };