1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Don't restrict animations to the keyframe time limits

This commit is contained in:
Chris Robinson 2013-04-07 10:03:13 -07:00
parent ab5980ae18
commit 399394ff10

View File

@ -384,10 +384,8 @@ static void buildAnimation(Ogre::Skeleton *skel, const std::string &name, const
lasttrans = curtrans = traniter->mValue; lasttrans = curtrans = traniter->mValue;
if(scaleiter != scalekeys.mKeys.end()) if(scaleiter != scalekeys.mKeys.end())
lastscale = curscale = Ogre::Vector3(scaleiter->mValue); lastscale = curscale = Ogre::Vector3(scaleiter->mValue);
float begTime = std::max(kfc->timeStart, startTime);
float endTime = std::min(kfc->timeStop, stopTime);
bool didlast = false;
bool didlast = false;
while(!didlast) while(!didlast)
{ {
float curtime = std::numeric_limits<float>::max(); float curtime = std::numeric_limits<float>::max();
@ -400,11 +398,11 @@ static void buildAnimation(Ogre::Skeleton *skel, const std::string &name, const
if(scaleiter != scalekeys.mKeys.end()) if(scaleiter != scalekeys.mKeys.end())
curtime = std::min(curtime, scaleiter->mTime); curtime = std::min(curtime, scaleiter->mTime);
curtime = std::max(curtime, begTime); curtime = std::max(curtime, startTime);
if(curtime >= endTime) if(curtime >= stopTime)
{ {
didlast = true; didlast = true;
curtime = endTime; curtime = stopTime;
} }
// Get the latest quaternions, translations, and scales for the // Get the latest quaternions, translations, and scales for the