diff --git a/apps/openmw/mwrender/actoranimation.cpp b/apps/openmw/mwrender/actoranimation.cpp index 35ff81a9ca..df712b43b0 100644 --- a/apps/openmw/mwrender/actoranimation.cpp +++ b/apps/openmw/mwrender/actoranimation.cpp @@ -88,10 +88,9 @@ namespace MWRender } osg::ref_ptr ActorAnimation::attach( - const std::string& model, std::string_view bonename, std::string_view bonefilter, bool isLight) + VFS::Path::NormalizedView model, std::string_view bonename, std::string_view bonefilter, bool isLight) { - osg::ref_ptr templateNode - = mResourceSystem->getSceneManager()->getTemplate(VFS::Path::toNormalized(model)); + osg::ref_ptr templateNode = mResourceSystem->getSceneManager()->getTemplate(model); const NodeMap& nodeMap = getNodeMap(); auto found = nodeMap.find(bonename); diff --git a/apps/openmw/mwrender/actoranimation.hpp b/apps/openmw/mwrender/actoranimation.hpp index b6586d4eab..5a28c41b6c 100644 --- a/apps/openmw/mwrender/actoranimation.hpp +++ b/apps/openmw/mwrender/actoranimation.hpp @@ -5,6 +5,8 @@ #include +#include + #include "../mwworld/containerstore.hpp" #include "animation.hpp" @@ -59,7 +61,7 @@ namespace MWRender return attachMesh(model, bonename, false, &stubColor); } osg::ref_ptr attach( - const std::string& model, std::string_view bonename, std::string_view bonefilter, bool isLight); + VFS::Path::NormalizedView model, std::string_view bonename, std::string_view bonefilter, bool isLight); PartHolderPtr mScabbard; PartHolderPtr mHolsteredShield; diff --git a/apps/openmw/mwrender/creatureanimation.cpp b/apps/openmw/mwrender/creatureanimation.cpp index b6cc823d28..f84e58e4bc 100644 --- a/apps/openmw/mwrender/creatureanimation.cpp +++ b/apps/openmw/mwrender/creatureanimation.cpp @@ -111,7 +111,7 @@ namespace MWRender MWWorld::ConstPtr item = *it; std::string_view bonename; - std::string itemModel = item.getClass().getCorrectedModel(item); + VFS::Path::Normalized itemModel = item.getClass().getCorrectedModel(item); if (slot == MWWorld::InventoryStore::Slot_CarriedRight) { if (item.getType() == ESM::Weapon::sRecordId) diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 08dfcb667c..c8fc36e18a 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -681,11 +681,11 @@ namespace MWRender PartHolderPtr NpcAnimation::insertBoundedPart(const std::string& model, std::string_view bonename, std::string_view bonefilter, bool enchantedGlow, osg::Vec4f* glowColor, bool isLight) { - osg::ref_ptr attached = attach(model, bonename, bonefilter, isLight); + osg::ref_ptr attached = attach(VFS::Path::toNormalized(model), bonename, bonefilter, isLight); if (enchantedGlow) mGlowUpdater = SceneUtil::addEnchantedGlow(attached, mResourceSystem, *glowColor); - return std::make_unique(attached); + return std::make_unique(std::move(attached)); } osg::Vec3f NpcAnimation::runAnimation(float timepassed)