mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
Don't use ESM4 mHeadFeamleParts; switch from manually adding "meshes\\" to correctMeshPath
This commit is contained in:
parent
1acac873cf
commit
b4552d47f6
@ -8,6 +8,8 @@
|
|||||||
#include <components/esm4/loadotft.hpp>
|
#include <components/esm4/loadotft.hpp>
|
||||||
#include <components/esm4/loadrace.hpp>
|
#include <components/esm4/loadrace.hpp>
|
||||||
|
|
||||||
|
#include <components/misc/resourcehelpers.hpp>
|
||||||
|
|
||||||
#include "../mwworld/customdata.hpp"
|
#include "../mwworld/customdata.hpp"
|
||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
|
||||||
@ -146,12 +148,13 @@ namespace MWClass
|
|||||||
if (!ptr.getRefData().getCustomData())
|
if (!ptr.getRefData().getCustomData())
|
||||||
return "";
|
return "";
|
||||||
const ESM4NpcCustomData& data = ptr.getRefData().getCustomData()->asESM4NpcCustomData();
|
const ESM4NpcCustomData& data = ptr.getRefData().getCustomData()->asESM4NpcCustomData();
|
||||||
|
const VFS::Manager* vfs = MWBase::Environment::get().getResourceSystem()->getVFS();
|
||||||
if (data.mTraits->mIsTES4)
|
if (data.mTraits->mIsTES4)
|
||||||
return "meshes\\" + data.mTraits->mModel;
|
return Misc::ResourceHelpers::correctMeshPath(data.mTraits->mModel, vfs);
|
||||||
if (data.mIsFemale)
|
if (data.mIsFemale)
|
||||||
return "meshes\\" + data.mRace->mModelFemale;
|
return Misc::ResourceHelpers::correctMeshPath(data.mRace->mModelFemale, vfs);
|
||||||
else
|
else
|
||||||
return "meshes\\" + data.mRace->mModelMale;
|
return Misc::ResourceHelpers::correctMeshPath(data.mRace->mModelMale, vfs);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string_view ESM4Npc::getName(const MWWorld::ConstPtr& ptr) const
|
std::string_view ESM4Npc::getName(const MWWorld::ConstPtr& ptr) const
|
||||||
|
@ -22,9 +22,7 @@ namespace MWRender
|
|||||||
const MWWorld::Ptr& ptr, osg::ref_ptr<osg::Group> parentNode, Resource::ResourceSystem* resourceSystem)
|
const MWWorld::Ptr& ptr, osg::ref_ptr<osg::Group> parentNode, Resource::ResourceSystem* resourceSystem)
|
||||||
: Animation(ptr, std::move(parentNode), resourceSystem)
|
: Animation(ptr, std::move(parentNode), resourceSystem)
|
||||||
{
|
{
|
||||||
std::string smodel
|
setObjectRoot(mPtr.getClass().getModel(mPtr), true, true, false);
|
||||||
= Misc::ResourceHelpers::correctMeshPath(mPtr.getClass().getModel(mPtr), mResourceSystem->getVFS());
|
|
||||||
setObjectRoot(smodel, true, true, false);
|
|
||||||
updateParts();
|
updateParts();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +69,7 @@ namespace MWRender
|
|||||||
|
|
||||||
for (const ESM4::Race::BodyPart& bodyPart : (isFemale ? race->mBodyPartsFemale : race->mBodyPartsMale))
|
for (const ESM4::Race::BodyPart& bodyPart : (isFemale ? race->mBodyPartsFemale : race->mBodyPartsMale))
|
||||||
insertPart(bodyPart.mesh);
|
insertPart(bodyPart.mesh);
|
||||||
for (const ESM4::Race::BodyPart& bodyPart : (isFemale ? race->mHeadPartsFemale : race->mHeadParts))
|
for (const ESM4::Race::BodyPart& bodyPart : race->mHeadParts)
|
||||||
insertPart(bodyPart.mesh);
|
insertPart(bodyPart.mesh);
|
||||||
if (!traits->mHair.isZeroOrUnset())
|
if (!traits->mHair.isZeroOrUnset())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user