mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 17:53:53 +00:00
Improve handling of reaching the stop animation text key
This commit is contained in:
parent
c4806f01f8
commit
8c9e2e0ee9
1 changed files with 2 additions and 1 deletions
|
@ -449,6 +449,7 @@ void Animation::doLoop(size_t layeridx)
|
|||
mLayer[layeridx].mTime = mLayer[layeridx].mLoopStartKey->first;
|
||||
mLayer[layeridx].mNextKey = mLayer[layeridx].mLoopStartKey;
|
||||
mLayer[layeridx].mNextKey++;
|
||||
mLayer[layeridx].mPlaying = true;
|
||||
if(layeridx == 0 && mNonAccumCtrl)
|
||||
mLastPosition = mNonAccumCtrl->getTranslation(mLayer[layeridx].mTime) * mAccumulate;
|
||||
}
|
||||
|
@ -608,7 +609,7 @@ Ogre::Vector3 Animation::runAnimation(float duration)
|
|||
if(layeridx == 0 && mNonAccumRoot)
|
||||
movement += updatePosition();
|
||||
|
||||
mLayer[layeridx].mPlaying = (mLayer[layeridx].mLooping || mLayer[layeridx].mStopKey->first > mLayer[layeridx].mTime);
|
||||
mLayer[layeridx].mPlaying = (key != mLayer[layeridx].mStopKey);
|
||||
timepassed = targetTime - mLayer[layeridx].mTime;
|
||||
|
||||
if(!handleTextKey(layeridx, key))
|
||||
|
|
Loading…
Reference in a new issue