mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
properly remove fake weapon after carrying persons
This commit is contained in:
parent
ebe9d7ed5f
commit
20882ed694
@ -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 {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user