From 399394ff103ec1f2779cdb8244caccff6da5621e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 7 Apr 2013 10:03:13 -0700 Subject: [PATCH] Don't restrict animations to the keyframe time limits --- components/nifogre/ogrenifloader.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/components/nifogre/ogrenifloader.cpp b/components/nifogre/ogrenifloader.cpp index e5e072620e..90139c9f02 100644 --- a/components/nifogre/ogrenifloader.cpp +++ b/components/nifogre/ogrenifloader.cpp @@ -384,10 +384,8 @@ static void buildAnimation(Ogre::Skeleton *skel, const std::string &name, const lasttrans = curtrans = traniter->mValue; if(scaleiter != scalekeys.mKeys.end()) 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) { float curtime = std::numeric_limits::max(); @@ -400,11 +398,11 @@ static void buildAnimation(Ogre::Skeleton *skel, const std::string &name, const if(scaleiter != scalekeys.mKeys.end()) curtime = std::min(curtime, scaleiter->mTime); - curtime = std::max(curtime, begTime); - if(curtime >= endTime) + curtime = std::max(curtime, startTime); + if(curtime >= stopTime) { didlast = true; - curtime = endTime; + curtime = stopTime; } // Get the latest quaternions, translations, and scales for the