From 20882ed694acbd6784ef4e5df453caf0ff78d48e Mon Sep 17 00:00:00 2001 From: commy2 <commy-2@gmx.de> Date: Wed, 25 Mar 2015 14:07:50 +0100 Subject: [PATCH] properly remove fake weapon after carrying persons --- addons/dragging/functions/fnc_dropObject.sqf | 2 +- addons/dragging/functions/fnc_dropObject_carry.sqf | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 489457bfbc..30b6fbf21b 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -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 { diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index b8d90a2c22..1808c1cb81 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -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;