|
|
|
@ -770,12 +770,14 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
osg::Node* node = mObjectParts[type]->getNode();
|
|
|
|
|
if (node->getNumChildrenRequiringUpdateTraversal() > 0)
|
|
|
|
|
{
|
|
|
|
|
boost::shared_ptr<SceneUtil::ControllerSource> src;
|
|
|
|
|
if (type == ESM::PRT_Head)
|
|
|
|
|
{
|
|
|
|
|
src = mHeadAnimationTime;
|
|
|
|
|
|
|
|
|
|
osg::Node* node = mObjectParts[type]->getNode();
|
|
|
|
|
if (node->getUserDataContainer())
|
|
|
|
|
{
|
|
|
|
|
for (unsigned int i=0; i<node->getUserDataContainer()->getNumUserObjects(); ++i)
|
|
|
|
@ -806,7 +808,8 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g
|
|
|
|
|
src.reset(new NullAnimationTime);
|
|
|
|
|
|
|
|
|
|
SceneUtil::AssignControllerSourcesVisitor assignVisitor(src);
|
|
|
|
|
mObjectParts[type]->getNode()->accept(assignVisitor);
|
|
|
|
|
node->accept(assignVisitor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|