From 426f5952a5bfbdf3c6d2114164a4176b85c6db3e Mon Sep 17 00:00:00 2001 From: Mads Buvik Sandvei Date: Wed, 25 Oct 2023 21:02:17 +0200 Subject: [PATCH] Prevent movement only when *scripted* animations are playing. Otherwise idle animations of wandering NPCs will slide. --- apps/openmw/mwmechanics/character.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index ad201997bd..08c035ce31 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -1861,7 +1861,6 @@ namespace MWMechanics else isFrontAnimPlaying = mAnimation->isPlaying(mAnimQueue.front().mGroup); - if (!isFrontAnimPlaying) { if (mAnimQueue.size() > 1) @@ -2373,7 +2372,7 @@ namespace MWMechanics } } - if (!isMovementAnimationControlled() && mAnimQueue.empty()) + if (!isMovementAnimationControlled() && !isScriptedAnimPlaying()) world->queueMovement(mPtr, vec); } @@ -2442,7 +2441,7 @@ namespace MWMechanics } // Update movement - if (isMovementAnimationControlled() && mPtr.getClass().isActor() && mAnimQueue.empty()) + if (isMovementAnimationControlled() && mPtr.getClass().isActor() && !isScriptedAnimPlaying()) world->queueMovement(mPtr, moved); mSkipAnim = false; @@ -2522,7 +2521,7 @@ namespace MWMechanics if (!mAnimation || !mAnimation->hasAnimation(groupname)) return false; - // We should not interrupt persistent animations by non-persistent ones + // We should not interrupt persistent animations by non-scripted ones if (isScriptedAnimPlaying() && !scripted) return true;