From 7cfc0816d58c47b84a401f724a10d9b1cb140054 Mon Sep 17 00:00:00 2001 From: Apricot <50947830+Apricot-ale@users.noreply.github.com> Date: Sun, 29 Jun 2025 01:09:18 +0900 Subject: [PATCH] Prevents airway collapse in awake units --- addons/airway/functions/fnc_handleAirway.sqf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/airway/functions/fnc_handleAirway.sqf b/addons/airway/functions/fnc_handleAirway.sqf index ec3526e04..958c9fc23 100644 --- a/addons/airway/functions/fnc_handleAirway.sqf +++ b/addons/airway/functions/fnc_handleAirway.sqf @@ -20,6 +20,12 @@ params ["_unit"]; //Other mods can utilise KAT_Obstruction_Exclussion variable to prevent obstructions from happening if ( !(GVAR(enable)) || (_unit getVariable ["KAT_Obstruction_Exclussion", false])) exitWith {}; +private _isUnconscious = _unit getVariable ["ACE_isUnconscious", false]; + +if (!_isUnconscious || (_unit getVariable [QGVAR(airway_item), ""] in ["Larynxtubus","Guedeltubus"])) exitWith { + _unit setVariable [QGVAR(obstruction), false, true]; +}; + if (random(100) < GVAR(probability_obstruction)) then { _unit setVariable [QGVAR(obstruction), true, true]; };