Merge pull request #481 from acemod/FixUnconciousAnimWhileCarrying

Fixed breaking of unconscious animation on drop object.
This commit is contained in:
Glowbal 2015-04-12 09:48:27 +02:00
commit 6bfd3e5c74
2 changed files with 9 additions and 3 deletions

View File

@ -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);
// play release animation if !(_unit getvariable ["ACE_isUnconscious", false]) then {
_unit playAction "released"; // play release animation
_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);
};

View File

@ -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);
}; };