1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 23:39:41 +00:00

MR Comments

This commit is contained in:
Mads Buvik Sandvei 2024-01-28 16:24:15 +01:00
parent 36e1bdab10
commit 993cea7d65

View file

@ -2516,7 +2516,8 @@ namespace MWMechanics
{
AnimationQueueEntry entry;
entry.mGroup = iter->mGroup;
entry.mLoopCount = iter->mLoopCount;
entry.mLoopCount
= static_cast<uint32_t>(std::min<uint64_t>(iter->mLoopCount, std::numeric_limits<uint32_t>::max()));
entry.mLooping = mAnimation->isLoopingAnimation(entry.mGroup);
entry.mStartKey = "start";
entry.mStopKey = "stop";
@ -2586,7 +2587,6 @@ namespace MWMechanics
// exactly x times, while non-actors will loop x+1 instead.
if (mPtr.getClass().isActor())
count--;
count = std::max(count, 0u);
AnimationQueueEntry entry;
entry.mGroup = groupname;
@ -2633,7 +2633,7 @@ namespace MWMechanics
entry.mGroup = groupname;
// Note: MWScript gives one less loop to actors than non-actors.
// But this is the Lua version. We don't need to reproduce this weirdness here.
entry.mLoopCount = std::max(loops, 0u);
entry.mLoopCount = loops;
entry.mStartKey = startKey;
entry.mStopKey = stopKey;
entry.mLooping = mAnimation->isLoopingAnimation(groupname) || forceLoop;