From 75dcbea36545fd564fd98561988cb423342d44a4 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Fri, 22 Jun 2018 13:09:02 +0400 Subject: [PATCH 1/2] Apply weapon reload animations only for upper body --- apps/openmw/mwmechanics/character.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index e6a8e8152..ef158a258 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -1627,16 +1627,18 @@ bool CharacterController::updateWeaponState() break; } + // Note: apply reload animations only for upper body since blending with movement animations can give weird result. + // Especially noticable with crossbow reload animation. if(!start.empty()) { mAnimation->disable(mCurrentWeapon); if (mUpperBodyState == UpperCharState_FollowStartToFollowStop) mAnimation->play(mCurrentWeapon, priorityWeapon, - MWRender::Animation::BlendMask_All, true, + MWRender::Animation::BlendMask_UpperBody, true, weapSpeed, start, stop, 0.0f, 0); else mAnimation->play(mCurrentWeapon, priorityWeapon, - MWRender::Animation::BlendMask_All, false, + MWRender::Animation::BlendMask_UpperBody, false, weapSpeed, start, stop, 0.0f, 0); } } From 1c35e20fcc4d140e1fdabdc84d47e16263926d81 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Fri, 22 Jun 2018 18:40:49 +0400 Subject: [PATCH 2/2] Use 1h animations as fallback for crossbows --- CHANGELOG.md | 3 ++- apps/openmw/mwmechanics/character.cpp | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 140d6daf3..26f51d057 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Bug #2852: No murder bounty when a player follower commits murder Bug #2862: [macOS] Can't quit launcher using Command-Q or OpenMW->Quit Bug #2971: Compiler did not reject lines with naked expressions beginning with x.y + Bug #3249: Fixed revert function not updating views properly Bug #3374: Touch spells not hitting kwama foragers Bug #3486: [Mod] NPC Commands does not work Bug #3591: Angled hit distance too low @@ -59,7 +60,7 @@ Bug #4480: Segfault in QuickKeysMenu when item no longer in inventory Bug #4489: Goodbye doesn't block dialogue hyperlinks Bug #4490: PositionCell on player gives "Error: tried to add local script twice" - Bug #3249: Fixed revert function not updating views properly + Bug #4495: Crossbow animations blending is buggy Feature #2606: Editor: Implemented (optional) case sensitive global search Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results Feature #3641: Editor: Limit FPS in 3d preview window diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index ef158a258..c6114dd8c 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -370,6 +370,10 @@ void CharacterController::refreshJumpAnims(const WeaponInfo* weap, JumpingState { jumpmask = MWRender::Animation::BlendMask_LowerBody; jumpAnimName = "jump"; + + // For crossbow animations use 1h ones as fallback + if (mWeaponType == WeapType_Crossbow) + jumpAnimName += "1h"; } } } @@ -423,6 +427,10 @@ void CharacterController::refreshMovementAnims(const WeaponInfo* weap, Character { movemask = MWRender::Animation::BlendMask_LowerBody; movementAnimName = movestate->groupname; + + // For crossbow animations use 1h ones as fallback + if (mWeaponType == WeapType_Crossbow) + movementAnimName += "1h"; } }