1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-29 07:45:33 +00:00

make ActorAnimation::getBoneByName take a searchRoot param

This commit is contained in:
Sebastian Fieber 2024-12-31 18:50:02 +00:00 committed by psi29a
parent 63b8e636f3
commit e77db9f2ba

View file

@ -365,10 +365,17 @@ namespace MWRender
}
mScabbard = attachMesh(scabbardName, boneName);
if (mScabbard && weaponClass == ESM::WeaponType::Ranged)
if (!mScabbard || !mScabbard->getNode())
return;
if (weaponClass == ESM::WeaponType::Ranged)
resetControllers(mScabbard->getNode());
osg::Group* weaponNode = getBoneByName("Bip01 Weapon");
SceneUtil::FindByNameVisitor findVisitor("Bip01 Weapon");
mScabbard->getNode()->accept(findVisitor);
osg::Group* weaponNode = findVisitor.mFoundNode;
if (!weaponNode)
return;