properly remove fake weapon after carrying persons

This commit is contained in:
commy2 2015-03-25 14:07:50 +01:00
parent ebe9d7ed5f
commit 20882ed694
2 changed files with 4 additions and 11 deletions

View File

@ -33,7 +33,7 @@ _unit playAction "released";
// release object
detach _target;
if (_target isKindOf "CAManBase") then {
if (_target isKindOf "CAManBase" || {animationState _unit in CARRY_ANIMATIONS}) then {
if (_target getVariable ["ACE_isUnconscious", false]) then {
[_target, "unconscious", 2, true] call EFUNC(common,doAnimation);
} else {

View File

@ -30,6 +30,7 @@ _inBuilding = [_unit] call FUNC(isObjectOnObject);
// release object
detach _target;
// fix anim when aborting carrying persons
if (_target isKindOf "CAManBase") then {
[_unit, "", 2, true] call EFUNC(common,doAnimation);
@ -40,16 +41,8 @@ if (_target isKindOf "CAManBase") then {
};
};
// fix anim when aborting carrying persons
if (animationState _unit in CARRY_ANIMATIONS) then {
[_unit, "", 2, true] call EFUNC(common,doAnimation);
if (_target getVariable ["ACE_isUnconscious", false]) then {
[_target, "unconscious", 2, true] call EFUNC(common,doAnimation);
} else {
[_target, "", 2, true] call EFUNC(common,doAnimation);
};
};
// properly remove fake weapon
_unit removeWeapon "ACE_FakePrimaryWeapon";
// reselect weapon and re-enable sprint
_unit selectWeapon primaryWeapon _unit;