2024-04-07 01:20:51 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2024-07-17 19:49:23 +00:00
|
|
|
["CBA_settingsInitialized", {
|
|
|
|
if !(GETEGVAR(medical,enabled,false)) exitWith {};
|
2024-04-07 01:20:51 +00:00
|
|
|
|
2024-07-17 19:49:23 +00:00
|
|
|
["ace_killed", { // global event
|
|
|
|
params ["_unit"];
|
|
|
|
|
|
|
|
// Prevent second ragdoll of uncon units when they're killed
|
|
|
|
if (
|
|
|
|
IS_UNCONSCIOUS(_unit) && !isAwake _unit // uncon and not ragdolling
|
|
|
|
&& {isPlayer _unit || {_unit getVariable [QGVAR(AIUnconsciousness), GVAR(AIUnconsciousness)]}}
|
|
|
|
) then {
|
|
|
|
_unit enableSimulation false;
|
|
|
|
[{_this enableSimulation true}, _unit, 2] call CBA_fnc_waitAndExecute;
|
|
|
|
};
|
|
|
|
}] call CBA_fnc_addEventHandler;
|
2024-04-07 01:20:51 +00:00
|
|
|
}] call CBA_fnc_addEventHandler;
|