-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Medical - Fix broken AI ragdolls if AI unconsciousness is disabled (#…
…9917) Co-authored-by: jonpas <[email protected]> Co-authored-by: PabstMirror <[email protected]>
- Loading branch information
1 parent
f3f7f2c
commit 6a2f3a2
Showing
4 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters