1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-07-03 20:11:37 +00:00

Prevent movement only when *scripted* animations are playing. Otherwise idle animations of wandering NPCs will slide.

This commit is contained in:
Mads Buvik Sandvei 2023-10-25 21:02:17 +02:00
parent a9ade184d8
commit 426f5952a5

View file

@ -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;