From 244bee4a619af774a531e42f98d35e61f557668d Mon Sep 17 00:00:00 2001 From: Grim <69561145+LinkIsGrim@users.noreply.github.com> Date: Tue, 6 Feb 2024 20:11:47 -0300 Subject: [PATCH] Medical Engine - Prevent uncon units from ragdolling on death (#9762) --- addons/medical_engine/XEH_postInit.sqf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/medical_engine/XEH_postInit.sqf b/addons/medical_engine/XEH_postInit.sqf index 2514c62254f..55578076296 100644 --- a/addons/medical_engine/XEH_postInit.sqf +++ b/addons/medical_engine/XEH_postInit.sqf @@ -86,6 +86,12 @@ if (!isNull objectParent _unit && {local objectParent _unit}) exitWith { [_unit] call FUNC(lockUnconsciousSeat); }; + + // Prevent second ragdoll of uncon units when they're killed + if (IS_UNCONSCIOUS(_unit) && !isAwake _unit) then { + _unit enableSimulation false; + [{_this enableSimulation true}, _unit, 2] call CBA_fnc_waitAndExecute; + }; }] call CBA_fnc_addEventHandler; ["CAManBase", "deleted", {