mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical - Disable AI twitching when unconscious (#9708)
Disable AI twitching when unconscious
This commit is contained in:
parent
b10c68405a
commit
38684890eb
@ -68,8 +68,12 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
|||||||
|
|
||||||
// fix falling back to unconsciousness animation and disable rotating in that state
|
// fix falling back to unconsciousness animation and disable rotating in that state
|
||||||
class Unconscious: Default {
|
class Unconscious: Default {
|
||||||
ConnectTo[] = {};
|
// Prevents AI from moving torso and head when unconscious
|
||||||
|
aiming = "aimingNo";
|
||||||
|
aimingBody = "aimingUpNo";
|
||||||
head = "headNo";
|
head = "headNo";
|
||||||
|
|
||||||
|
ConnectTo[] = {};
|
||||||
forceAim = 1;
|
forceAim = 1;
|
||||||
static = 1;
|
static = 1;
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
class CfgMovesBasic;
|
class CfgMovesBasic;
|
||||||
class CfgMovesMaleSdr: CfgMovesBasic {
|
class CfgMovesMaleSdr: CfgMovesBasic {
|
||||||
class States {
|
class States {
|
||||||
@ -10,6 +9,11 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
|||||||
|
|
||||||
class DeadState;
|
class DeadState;
|
||||||
class UNCON_ANIM(1): DeadState {
|
class UNCON_ANIM(1): DeadState {
|
||||||
|
// Prevents AI from moving torso and head when unconscious
|
||||||
|
aiming = "aimingNo";
|
||||||
|
aimingBody = "aimingUpNo";
|
||||||
|
head = "headNo";
|
||||||
|
|
||||||
file = QPATHTO_T(data\ace_unconscious_1.rtm);
|
file = QPATHTO_T(data\ace_unconscious_1.rtm);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -50,26 +50,16 @@ if (_active) then {
|
|||||||
_unit call EFUNC(common,throwWeapon);
|
_unit call EFUNC(common,throwWeapon);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Unlock controls for copilot if unit is pilot of aircraft
|
// Unlock controls for copilot if unit is pilot of aircraft
|
||||||
if (vehicle _unit isKindOf "Air" && {_unit == driver vehicle _unit}) then {
|
if (vehicle _unit isKindOf "Air" && {_unit == driver vehicle _unit}) then {
|
||||||
TRACE_1("pilot of air vehicle - unlocking controls",vehicle _unit);
|
TRACE_1("pilot of air vehicle - unlocking controls",vehicle _unit);
|
||||||
// Do "Unlock controls" user action, co-pilot will then have to do the "Take Controls" actions
|
// Do "Unlock controls" user action, co-pilot will then have to do the "Take Controls" actions
|
||||||
_unit action ["UnlockVehicleControl", vehicle _unit];
|
_unit action ["UnlockVehicleControl", vehicle _unit];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Disable AI aiming
|
|
||||||
if (!isPlayer _unit && {_unit checkAIFeature "WEAPONAIM"}) then {
|
|
||||||
_unit disableAI "WEAPONAIM";
|
|
||||||
_unit setVariable [QGVAR(reenableWeaponAim), true, true];
|
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
// Unit has woken up, no longer need to track this
|
// Unit has woken up, no longer need to track this
|
||||||
_unit setVariable [QEGVAR(medical,lastWakeUpCheck), nil];
|
_unit setVariable [QEGVAR(medical,lastWakeUpCheck), nil];
|
||||||
|
|
||||||
// Reenable AI aiming
|
|
||||||
if (_unit getVariable [QGVAR(reenableWeaponAim), false]) then {
|
|
||||||
_unit enableAI "WEAPONAIM";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// This event doesn't correspond to unconscious in statemachine
|
// This event doesn't correspond to unconscious in statemachine
|
||||||
|
Loading…
Reference in New Issue
Block a user