mirror of
https://github.com/OpenMW/openmw.git
synced 2026-01-31 18:48:25 +00:00
npcanimation.cpp
This commit is contained in:
parent
e91959b444
commit
81bcc41a3f
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue