mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 17:06:43 +00:00
Properly handle starting an animation at the end
This commit is contained in:
parent
54f91d4b3a
commit
465f4d2063
1 changed files with 17 additions and 1 deletions
|
@ -589,7 +589,7 @@ void Animation::play(const std::string &groupname, int priority, int groups, boo
|
||||||
state.mSource = *iter;
|
state.mSource = *iter;
|
||||||
state.mSpeedMult = speedmult;
|
state.mSpeedMult = speedmult;
|
||||||
state.mLoopCount = loops;
|
state.mLoopCount = loops;
|
||||||
state.mPlaying = true;
|
state.mPlaying = (state.mTime < state.mStopTime);
|
||||||
state.mPriority = priority;
|
state.mPriority = priority;
|
||||||
state.mGroups = groups;
|
state.mGroups = groups;
|
||||||
state.mAutoDisable = autodisable;
|
state.mAutoDisable = autodisable;
|
||||||
|
@ -602,6 +602,22 @@ void Animation::play(const std::string &groupname, int priority, int groups, boo
|
||||||
textkey++;
|
textkey++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(state.mTime >= state.mLoopStopTime && state.mLoopCount > 0)
|
||||||
|
{
|
||||||
|
state.mLoopCount--;
|
||||||
|
state.mTime = state.mLoopStartTime;
|
||||||
|
state.mPlaying = true;
|
||||||
|
if(state.mTime >= state.mLoopStopTime)
|
||||||
|
break;
|
||||||
|
|
||||||
|
textkey = textkeys.lower_bound(state.mTime);
|
||||||
|
while(textkey != textkeys.end() && textkey->first <= state.mTime)
|
||||||
|
{
|
||||||
|
handleTextKey(state, groupname, textkey);
|
||||||
|
textkey++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue