Medical Engine - Prevent uncon units from ragdolling on death (#9762)

This commit is contained in:
Grim 2024-02-06 20:11:47 -03:00 committed by GitHub
parent 77a49a081a
commit 244bee4a61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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", {