Skip to content

Commit

Permalink
Medical Engine - Prevent uncon units from ragdolling on death (#9762)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkIsGrim authored Feb 6, 2024
1 parent 77a49a0 commit 244bee4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions addons/medical_engine/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down

0 comments on commit 244bee4

Please sign in to comment.