From faf3e9ba5a0f75986135a929b8f0435f4231854b Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Thu, 5 Jul 2018 01:37:11 +0300 Subject: [PATCH 1/2] Make spellcasting stance transition more smooth (fixes #4358) If a movement animation was identical to the previous one that was played, restart it from the point the previous animation ended --- apps/openmw/mwmechanics/character.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index c049d7933..6c1332154 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -459,9 +459,11 @@ void CharacterController::refreshMovementAnims(const WeaponInfo* weap, Character } } - /* If we're playing the same animation, restart from the loop start instead of the - * beginning. */ - int mode = ((movementAnimName == mCurrentMovement) ? 2 : 1); + // If we're playing the same animation, start it from the point it ended + bool sameAnim = (movementAnimName == mCurrentMovement); + float startPoint = 0.f; + if (sameAnim) + mAnimation->getInfo(mCurrentMovement, &startPoint); mMovementAnimationControlled = true; @@ -510,7 +512,7 @@ void CharacterController::refreshMovementAnims(const WeaponInfo* weap, Character } mAnimation->play(mCurrentMovement, Priority_Movement, movemask, false, - 1.f, ((mode!=2)?"start":"loop start"), "stop", 0.0f, ~0ul, true); + 1.f, (!sameAnim ? "start" : "loop start"), "stop", startPoint, ~0ul, true); } } } From 5bc073603e8c7887e015a0ef41b4cefd6e688aaf Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Thu, 5 Jul 2018 01:59:14 +0300 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f839279f3..da7dda03a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ Bug #4293: Faction members are not aware of faction ownerships in barter Bug #4307: World cleanup should remove dead bodies only if death animation is finished Bug #4327: Missing animations during spell/weapon stance switching + Bug #4358: Running animation is interrupted when magic mode is toggled Bug #4368: Settings window ok button doesn't have key focus by default Bug #4393: NPCs walk back to where they were after using ResetActors Bug #4416: Handle exception if we try to play non-music file