mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-22 07:21:26 +00:00
Use normalized path in ActorAnimation::attach
This commit is contained in:
parent
a78f5182e4
commit
f1533c215d
@ -88,10 +88,9 @@ namespace MWRender
|
||||
}
|
||||
|
||||
osg::ref_ptr<osg::Node> 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<const osg::Node> templateNode
|
||||
= mResourceSystem->getSceneManager()->getTemplate(VFS::Path::toNormalized(model));
|
||||
osg::ref_ptr<const osg::Node> templateNode = mResourceSystem->getSceneManager()->getTemplate(model);
|
||||
|
||||
const NodeMap& nodeMap = getNodeMap();
|
||||
auto found = nodeMap.find(bonename);
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include <osg/ref_ptr>
|
||||
|
||||
#include <components/vfs/pathutil.hpp>
|
||||
|
||||
#include "../mwworld/containerstore.hpp"
|
||||
|
||||
#include "animation.hpp"
|
||||
@ -59,7 +61,7 @@ namespace MWRender
|
||||
return attachMesh(model, bonename, false, &stubColor);
|
||||
}
|
||||
osg::ref_ptr<osg::Node> 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;
|
||||
|
@ -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)
|
||||
|
@ -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<osg::Node> attached = attach(model, bonename, bonefilter, isLight);
|
||||
osg::ref_ptr<osg::Node> attached = attach(VFS::Path::toNormalized(model), bonename, bonefilter, isLight);
|
||||
if (enchantedGlow)
|
||||
mGlowUpdater = SceneUtil::addEnchantedGlow(attached, mResourceSystem, *glowColor);
|
||||
|
||||
return std::make_unique<PartHolder>(attached);
|
||||
return std::make_unique<PartHolder>(std::move(attached));
|
||||
}
|
||||
|
||||
osg::Vec3f NpcAnimation::runAnimation(float timepassed)
|
||||
|
Loading…
x
Reference in New Issue
Block a user