1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 12:32:36 +00:00

Use dynamic cast to check for bone

This commit is contained in:
Sam Hellawell 2024-04-07 21:02:54 +01:00
parent 36cccef606
commit d23c10622d

View File

@ -273,7 +273,7 @@ namespace Resource
{
// If an osgAnimation bone/transform, ensure underscores in name are replaced with spaces
// this is for compatibility reasons
if (node.libraryName() == std::string_view("osgAnimation") && node.className() == std::string_view("Bone"))
if (dynamic_cast<osgAnimation::Bone*>(&node))
node.setName(Misc::StringUtils::underscoresToSpaces(node.getName()));
if (osg::StateSet* stateset = node.getStateSet())