1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-06 15:15:34 +00:00

mLoopCount is the number of *remaining* loops. So we should be checking for >0, not >1.

This commit is contained in:
Mads Buvik Sandvei 2023-10-25 19:55:10 +02:00
parent 92a5e52407
commit a9ade184d8

View file

@ -1874,7 +1874,7 @@ namespace MWMechanics
mAnimation->play(mAnimQueue.front().mGroup, Priority_Default, MWRender::Animation::BlendMask_All, false, mAnimation->play(mAnimQueue.front().mGroup, Priority_Default, MWRender::Animation::BlendMask_All, false,
1.0f, "start", "stop", 0.0f, mAnimQueue.front().mLoopCount, loopfallback); 1.0f, "start", "stop", 0.0f, mAnimQueue.front().mLoopCount, loopfallback);
} }
else if (mAnimQueue.front().mLoopCount > 1 && mAnimQueue.front().mScripted) else if (mAnimQueue.front().mLoopCount > 0 && mAnimQueue.front().mScripted)
{ {
// A scripted animation stopped playing before time. // A scripted animation stopped playing before time.
// This happens when the animation object is rebuilt, so we should restart the animation here. // This happens when the animation object is rebuilt, so we should restart the animation here.