1
0
Fork 0
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:
Chris Robinson 2013-04-23 05:34:08 -07:00
parent c4806f01f8
commit 8c9e2e0ee9

View file

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