mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 03:54:40 +00:00
Don't update object root controllers with no time source (Fixes #1564)
This commit is contained in:
parent
6a900e0aad
commit
37c85f0af4
@ -144,12 +144,6 @@ void Animation::setObjectRoot(const std::string &model, bool baseonly)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
mAttachedObjects.clear();
|
mAttachedObjects.clear();
|
||||||
|
|
||||||
for(size_t i = 0;i < mObjectRoot->mControllers.size();i++)
|
|
||||||
{
|
|
||||||
if(mObjectRoot->mControllers[i].getSource().isNull())
|
|
||||||
mObjectRoot->mControllers[i].setSource(mAnimationTimePtr[0]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct AddGlow
|
struct AddGlow
|
||||||
@ -309,6 +303,12 @@ void Animation::addAnimSource(const std::string &model)
|
|||||||
ctrls[i].setSource(mAnimationTimePtr[grp]);
|
ctrls[i].setSource(mAnimationTimePtr[grp]);
|
||||||
grpctrls[grp].push_back(ctrls[i]);
|
grpctrls[grp].push_back(ctrls[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < mObjectRoot->mControllers.size(); ++i)
|
||||||
|
{
|
||||||
|
if (mObjectRoot->mControllers[i].getSource().isNull())
|
||||||
|
mObjectRoot->mControllers[i].setSource(mAnimationTimePtr[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animation::clearAnimSources()
|
void Animation::clearAnimSources()
|
||||||
@ -1039,7 +1039,10 @@ Ogre::Vector3 Animation::runAnimation(float duration)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(size_t i = 0;i < mObjectRoot->mControllers.size();i++)
|
for(size_t i = 0;i < mObjectRoot->mControllers.size();i++)
|
||||||
mObjectRoot->mControllers[i].update();
|
{
|
||||||
|
if(!mObjectRoot->mControllers[i].getSource().isNull())
|
||||||
|
mObjectRoot->mControllers[i].update();
|
||||||
|
}
|
||||||
|
|
||||||
// Apply group controllers
|
// Apply group controllers
|
||||||
for(size_t grp = 0;grp < sNumGroups;grp++)
|
for(size_t grp = 0;grp < sNumGroups;grp++)
|
||||||
|
Loading…
Reference in New Issue
Block a user