From 23acf4b130e10213403b3655dca97eeb13f5808b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 3 Feb 2013 01:38:42 -0800 Subject: [PATCH] Don't break right away when the animation time remaining is 0 --- apps/openmw/mwrender/animation.cpp | 2 +- apps/openmw/mwrender/animation.hpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index b811040676..0e906181c5 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -225,7 +225,7 @@ Ogre::Vector3 Animation::runAnimation(float timepassed) Ogre::Vector3 movement = Ogre::Vector3::ZERO; timepassed *= mAnimSpeedMult; - while(mCurrentAnim && mPlaying && timepassed > 0.0f) + while(mCurrentAnim && mPlaying) { float targetTime = mCurrentTime + timepassed; if(mNextKey == mCurrentKeys->end() || mNextKey->first > targetTime) diff --git a/apps/openmw/mwrender/animation.hpp b/apps/openmw/mwrender/animation.hpp index 165a6525c3..46a1ed88d2 100644 --- a/apps/openmw/mwrender/animation.hpp +++ b/apps/openmw/mwrender/animation.hpp @@ -44,6 +44,7 @@ protected: * bone names) are positioned identically. */ void updateSkeletonInstance(const Ogre::SkeletonInstance *skelsrc, Ogre::SkeletonInstance *skel); + /* Updates the animation to the specified time, and returns the movement * vector since the last update or reset. */ Ogre::Vector3 updatePosition(float time); @@ -52,6 +53,7 @@ protected: * anything. If the marker is not found, it resets to the beginning. */ void reset(const std::string &marker); + void createEntityList(Ogre::SceneNode *node, const std::string &model); public: