mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #481 from acemod/FixUnconciousAnimWhileCarrying
Fixed breaking of unconscious animation on drop object.
This commit is contained in:
commit
6bfd3e5c74
@ -23,8 +23,10 @@ _unit removeAction (_unit getVariable [QGVAR(ReleaseActionID), -1]);
|
|||||||
private "_inBuilding";
|
private "_inBuilding";
|
||||||
_inBuilding = [_unit] call FUNC(isObjectOnObject);
|
_inBuilding = [_unit] call FUNC(isObjectOnObject);
|
||||||
|
|
||||||
|
if !(_unit getvariable ["ACE_isUnconscious", false]) then {
|
||||||
// play release animation
|
// play release animation
|
||||||
_unit playAction "released";
|
_unit playAction "released";
|
||||||
|
};
|
||||||
|
|
||||||
// prevent collision damage
|
// prevent collision damage
|
||||||
["fixCollision", _unit] call EFUNC(common,localEvent);
|
["fixCollision", _unit] call EFUNC(common,localEvent);
|
||||||
@ -58,3 +60,7 @@ if !(_target isKindOf "CAManBase") then {
|
|||||||
["fixPosition", _target, _target] call EFUNC(common,targetEvent);
|
["fixPosition", _target, _target] call EFUNC(common,targetEvent);
|
||||||
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
|
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (_unit getvariable ["ACE_isUnconscious", false]) then {
|
||||||
|
[_unit, "unconscious", 2, true] call EFUNC(common,doAnimation);
|
||||||
|
};
|
||||||
|
@ -32,7 +32,7 @@ detach _target;
|
|||||||
|
|
||||||
// fix anim when aborting carrying persons
|
// fix anim when aborting carrying persons
|
||||||
if (_target isKindOf "CAManBase" || {animationState _unit in CARRY_ANIMATIONS}) then {
|
if (_target isKindOf "CAManBase" || {animationState _unit in CARRY_ANIMATIONS}) then {
|
||||||
if (vehicle _unit == _unit) then {
|
if (vehicle _unit == _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then {
|
||||||
[_unit, "", 2, true] call EFUNC(common,doAnimation);
|
[_unit, "", 2, true] call EFUNC(common,doAnimation);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user