Minor cleanup

This commit is contained in:
scrawl 2015-05-20 03:54:04 +02:00
parent 7882c3d7f0
commit cfe57199d7
2 changed files with 3 additions and 5 deletions

View file

@ -586,15 +586,13 @@ void NpcAnimation::addFirstPersonOffset(const Ogre::Vector3 &offset)
mFirstPersonOffset += offset;
}*/
Animation::PartHolderPtr NpcAnimation::insertBoundedPart(const std::string& model, int group, const std::string& bonename, const std::string& bonefilter, bool enchantedGlow, osg::Vec4f* glowColor)
Animation::PartHolderPtr NpcAnimation::insertBoundedPart(const std::string& model, const std::string& bonename, const std::string& bonefilter, bool enchantedGlow, osg::Vec4f* glowColor)
{
osg::ref_ptr<osg::Node> instance = mResourceSystem->getSceneManager()->createInstance(model);
osg::ref_ptr<osg::Node> attached = SceneUtil::attach(instance, mObjectRoot, bonefilter, bonename);
if (enchantedGlow)
addGlow(attached, *glowColor);
// TODO: set group userdata for inventory picking
return PartHolderPtr(new PartHolder(attached));
}
@ -679,7 +677,7 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g
const std::string& bonename = sPartList.at(type);
// PRT_Hair seems to be the only type that breaks consistency and uses a filter that's different from the attachment bone
const std::string bonefilter = (type == ESM::PRT_Hair) ? "hair" : bonename;
mObjectParts[type] = insertBoundedPart(mesh, group, bonename, bonefilter, enchantedGlow, glowColor);
mObjectParts[type] = insertBoundedPart(mesh, bonename, bonefilter, enchantedGlow, glowColor);
}
catch (std::exception& e)
{

View file

@ -105,7 +105,7 @@ private:
void updateNpcBase();
PartHolderPtr insertBoundedPart(const std::string &model, int group, const std::string &bonename,
PartHolderPtr insertBoundedPart(const std::string &model, const std::string &bonename,
const std::string &bonefilter, bool enchantedGlow, osg::Vec4f* glowColor=NULL);
void removeIndividualPart(ESM::PartReferenceType type);