Only set mNonAccumRoot from mSkelBase

actorid
Chris Robinson 12 years ago
parent a3511c62cf
commit a7776e124c

@ -98,7 +98,15 @@ void Animation::addObjectList(Ogre::SceneNode *node, const std::string &model, b
boneiter.getNext()->setManuallyControlled(true);
Ogre::SkeletonInstance *baseinst = mSkelBase->getSkeleton();
if(mSkelBase != objlist.mSkelBase)
if(mSkelBase == objlist.mSkelBase)
{
if(objlist.mTextKeys.size() > 0)
{
mAccumRoot = mInsert;
mNonAccumRoot = baseinst->getBone(objlist.mTextKeys.begin()->first);
}
}
else
{
for(size_t i = 0;i < objlist.mControllers.size();i++)
{
@ -113,15 +121,6 @@ void Animation::addObjectList(Ogre::SceneNode *node, const std::string &model, b
dstval->setNode(bone);
}
}
if(objlist.mTextKeys.size() > 0)
{
if(!mNonAccumRoot)
{
mAccumRoot = mInsert;
mNonAccumRoot = baseinst->getBone(objlist.mTextKeys.begin()->first);
}
}
}
for(size_t i = 0;i < objlist.mControllers.size();i++)
{

Loading…
Cancel
Save