1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 10:53:51 +00:00

Revert "Use a child scene node for the accumulation root"

This reverts commit d6f923f274.

We don't need it for any of the NIFs we're currently handling. As long as
there's no NIF files that would break it, we should require a stationary root
if an animation wants to accumulate. If we must, a better idea may be to inject
an extra bone into the skeleton instance and make that the accumulation root.
This commit is contained in:
Chris Robinson 2013-02-01 08:50:32 -08:00
parent c6a9ea5007
commit 376dfed15b
2 changed files with 4 additions and 3 deletions

View file

@ -48,7 +48,7 @@ Animation::~Animation()
void Animation::createEntityList(Ogre::SceneNode *node, const std::string &model)
{
mInsert = node->createChildSceneNode();
mInsert = node;
assert(mInsert);
mEntityList = NifOgre::Loader::createEntities(mInsert, model);
@ -76,7 +76,8 @@ void Animation::createEntityList(Ogre::SceneNode *node, const std::string &model
if(data.isEmpty() || !Ogre::any_cast<bool>(data))
continue;
mAccumRoot = mInsert;
mAccumRoot = skelinst->getRootBone();
mAccumRoot->setManuallyControlled(true);
mNonAccumRoot = skelinst->getBone(bone->getHandle());
mStartPosition = mNonAccumRoot->getInitialPosition();

View file

@ -22,7 +22,7 @@ protected:
Ogre::SceneNode* mInsert;
NifOgre::EntityList mEntityList;
std::map<std::string,NifOgre::TextKeyMap> mTextKeys;
Ogre::Node *mAccumRoot;
Ogre::Bone *mAccumRoot;
Ogre::Bone *mNonAccumRoot;
Ogre::Vector3 mAccumulate;
Ogre::Vector3 mStartPosition;