From 910619eb21c05fc9baa93e139a7d011bce9ea775 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 6 Jan 2013 17:31:53 -0800 Subject: [PATCH] Store the NonAccum animation root from the skeleton instance Currently this is assumed to be the node with the animation text keys. --- apps/openmw/mwrender/animation.cpp | 4 +++- apps/openmw/mwrender/animation.hpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index d7f3d52d6..b8be879e5 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -14,8 +14,9 @@ Animation::Animation(const MWWorld::Ptr &ptr) : mPtr(ptr) , mInsert(NULL) , mTime(0.0f) - , mSkipFrame(false) , mAnimState(NULL) + , mSkipFrame(false) + , mNonAccumRoot(NULL) { } @@ -62,6 +63,7 @@ void Animation::createEntityList(Ogre::SceneNode *node, const std::string &model if(!data.isEmpty()) { mTextKeys = Ogre::any_cast(data); + mNonAccumRoot = mEntityList.mSkelBase->getSkeleton()->getBone(bone->getHandle()); break; } } diff --git a/apps/openmw/mwrender/animation.hpp b/apps/openmw/mwrender/animation.hpp index 593538ea6..3bc173d70 100644 --- a/apps/openmw/mwrender/animation.hpp +++ b/apps/openmw/mwrender/animation.hpp @@ -31,12 +31,13 @@ protected: float mTime; GroupTimes mCurGroup; GroupTimes mNextGroup; + Ogre::AnimationState *mAnimState; bool mSkipFrame; NifOgre::EntityList mEntityList; NifOgre::TextKeyMap mTextKeys; - Ogre::AnimationState *mAnimState; + Ogre::Node *mNonAccumRoot; bool findGroupTimes(const std::string &groupname, GroupTimes *times);