From 8d6f017f171950ddcf64cfdf835677a519407f59 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 9 Feb 2013 13:25:39 -0800 Subject: [PATCH] Remove an unneeded Animation field --- apps/openmw/mwrender/animation.cpp | 6 +----- apps/openmw/mwrender/animation.hpp | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 019217ca69..e157afc838 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -22,7 +22,6 @@ Animation::Animation(const MWWorld::Ptr &ptr) , mAccumRoot(NULL) , mNonAccumRoot(NULL) , mAccumulate(Ogre::Vector3::ZERO) - , mStartPosition(0.0f) , mLastPosition(0.0f) , mCurrentKeys(NULL) , mCurrentAnim(NULL) @@ -135,9 +134,6 @@ void Animation::createEntityList(Ogre::SceneNode *node, const std::string &model { mAccumRoot = mInsert; mNonAccumRoot = skelinst->getBone(bone->getName()); - - mStartPosition = mNonAccumRoot->getInitialPosition(); - mLastPosition = mStartPosition; } } } @@ -243,7 +239,7 @@ void Animation::reset(const std::string &marker) if(mNonAccumRoot) { mLastPosition = mNonAccumRoot->getPosition(); - mAccumRoot->setPosition(mStartPosition*mNonAccumRoot->_getDerivedScale() - mLastPosition); + mAccumRoot->setPosition(-mLastPosition * mAccumulate); } } diff --git a/apps/openmw/mwrender/animation.hpp b/apps/openmw/mwrender/animation.hpp index 62e93f1100..ee73193bf5 100644 --- a/apps/openmw/mwrender/animation.hpp +++ b/apps/openmw/mwrender/animation.hpp @@ -25,7 +25,6 @@ protected: Ogre::Node *mAccumRoot; Ogre::Bone *mNonAccumRoot; Ogre::Vector3 mAccumulate; - Ogre::Vector3 mStartPosition; Ogre::Vector3 mLastPosition; std::vector mSkeletonSources;