mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Merge pull request #2506 from akortunov/refactor
Rename getWeaponPart() function
This commit is contained in:
commit
84b3aaedaa
@ -64,7 +64,7 @@ ActorAnimation::~ActorAnimation()
|
|||||||
mScabbard.reset();
|
mScabbard.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
PartHolderPtr ActorAnimation::getWeaponPart(const std::string& model, const std::string& bonename, bool enchantedGlow, osg::Vec4f* glowColor)
|
PartHolderPtr ActorAnimation::attachMesh(const std::string& model, const std::string& bonename, bool enchantedGlow, osg::Vec4f* glowColor)
|
||||||
{
|
{
|
||||||
osg::Group* parent = getBoneByName(bonename);
|
osg::Group* parent = getBoneByName(bonename);
|
||||||
if (!parent)
|
if (!parent)
|
||||||
@ -160,7 +160,7 @@ void ActorAnimation::updateHolsteredWeapon(bool showHolsteredWeapons)
|
|||||||
if (showHolsteredWeapons)
|
if (showHolsteredWeapons)
|
||||||
{
|
{
|
||||||
osg::Vec4f glowColor = weapon->getClass().getEnchantmentColor(*weapon);
|
osg::Vec4f glowColor = weapon->getClass().getEnchantmentColor(*weapon);
|
||||||
mScabbard = getWeaponPart(mesh, boneName, isEnchanted, &glowColor);
|
mScabbard = attachMesh(mesh, boneName, isEnchanted, &glowColor);
|
||||||
if (mScabbard)
|
if (mScabbard)
|
||||||
resetControllers(mScabbard->getNode());
|
resetControllers(mScabbard->getNode());
|
||||||
}
|
}
|
||||||
@ -168,7 +168,7 @@ void ActorAnimation::updateHolsteredWeapon(bool showHolsteredWeapons)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mScabbard = getWeaponPart(scabbardName, boneName);
|
mScabbard = attachMesh(scabbardName, boneName);
|
||||||
|
|
||||||
osg::Group* weaponNode = getBoneByName("Bip01 Weapon");
|
osg::Group* weaponNode = getBoneByName("Bip01 Weapon");
|
||||||
if (!weaponNode)
|
if (!weaponNode)
|
||||||
|
@ -44,11 +44,11 @@ class ActorAnimation : public Animation, public MWWorld::ContainerStoreListener
|
|||||||
virtual void updateHolsteredWeapon(bool showHolsteredWeapons);
|
virtual void updateHolsteredWeapon(bool showHolsteredWeapons);
|
||||||
virtual void updateQuiver();
|
virtual void updateQuiver();
|
||||||
virtual std::string getHolsteredWeaponBoneName(const MWWorld::ConstPtr& weapon);
|
virtual std::string getHolsteredWeaponBoneName(const MWWorld::ConstPtr& weapon);
|
||||||
virtual PartHolderPtr getWeaponPart(const std::string& model, const std::string& bonename, bool enchantedGlow, osg::Vec4f* glowColor);
|
virtual PartHolderPtr attachMesh(const std::string& model, const std::string& bonename, bool enchantedGlow, osg::Vec4f* glowColor);
|
||||||
virtual PartHolderPtr getWeaponPart(const std::string& model, const std::string& bonename)
|
virtual PartHolderPtr attachMesh(const std::string& model, const std::string& bonename)
|
||||||
{
|
{
|
||||||
osg::Vec4f stubColor = osg::Vec4f(0,0,0,0);
|
osg::Vec4f stubColor = osg::Vec4f(0,0,0,0);
|
||||||
return getWeaponPart(model, bonename, false, &stubColor);
|
return attachMesh(model, bonename, false, &stubColor);
|
||||||
};
|
};
|
||||||
|
|
||||||
PartHolderPtr mScabbard;
|
PartHolderPtr mScabbard;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user