mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
6a2f3a21f2
Co-authored-by: jonpas <jonpas33@gmail.com> Co-authored-by: PabstMirror <pabstmirror@gmail.com>
15 lines
512 B
Plaintext
15 lines
512 B
Plaintext
#include "script_component.hpp"
|
|
|
|
["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;
|