From 38fa4e0a8ab443bf26bb87bd70c8c75d7171eed7 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Tue, 17 Jul 2018 14:06:41 +0400 Subject: [PATCH] Do not play un-equipping animation when we switch to hand-to-hand --- apps/openmw/mwmechanics/character.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index aaa6c7aeb..f843be66e 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -1229,12 +1229,17 @@ bool CharacterController::updateWeaponState() && mUpperBodyState != UpperCharState_UnEquipingWeap && !isStillWeapon) { - // Note: we do not disable unequipping animation automatically to avoid body desync - getWeaponGroup(mWeaponType, weapgroup); - mAnimation->play(weapgroup, priorityWeapon, - MWRender::Animation::BlendMask_All, false, - 1.0f, "unequip start", "unequip stop", 0.0f, 0); - mUpperBodyState = UpperCharState_UnEquipingWeap; + // We can not play un-equip animation when we switch to HtH + // because we already un-equipped weapon + if (weaptype != WeapType_HandToHand || mWeaponType == WeapType_Spell) + { + // Note: we do not disable unequipping animation automatically to avoid body desync + getWeaponGroup(mWeaponType, weapgroup); + mAnimation->play(weapgroup, priorityWeapon, + MWRender::Animation::BlendMask_All, false, + 1.0f, "unequip start", "unequip stop", 0.0f, 0); + mUpperBodyState = UpperCharState_UnEquipingWeap; + } if(!downSoundId.empty()) {