1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-31 18:48:25 +00:00

npcanimation.cpp

This commit is contained in:
Bo Svensson 2021-09-05 11:45:53 +00:00 committed by GitHub
parent e91959b444
commit 81bcc41a3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -714,14 +714,14 @@ void NpcAnimation::updateParts()
PartHolderPtr NpcAnimation::insertBoundedPart(const std::string& model, const std::string& bonename, const std::string& bonefilter, bool enchantedGlow, osg::Vec4f* glowColor)
{
osg::ref_ptr<const osg::Node> template = mResourceSystem->getSceneManager()->getTemplate(model);
osg::ref_ptr<const osg::Node> templateNode = mResourceSystem->getSceneManager()->getTemplate(model);
const NodeMap& nodeMap = getNodeMap();
NodeMap::const_iterator found = nodeMap.find(Misc::StringUtils::lowerCase(bonename));
if (found == nodeMap.end())
throw std::runtime_error("Can't find attachment node " + bonename);
osg::ref_ptr<osg::Node> attached = SceneUtil::attach(template, mObjectRoot, bonefilter, found->second);
osg::ref_ptr<osg::Node> attached = SceneUtil::attach(templateNode, mObjectRoot, bonefilter, found->second);
if (enchantedGlow)
mGlowUpdater = SceneUtil::addEnchantedGlow(attached, mResourceSystem, *glowColor);