mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +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/loadrace.hpp>
|
||||
|
||||
#include <components/misc/resourcehelpers.hpp>
|
||||
|
||||
#include "../mwworld/customdata.hpp"
|
||||
#include "../mwworld/esmstore.hpp"
|
||||
|
||||
@ -146,12 +148,13 @@ namespace MWClass
|
||||
if (!ptr.getRefData().getCustomData())
|
||||
return "";
|
||||
const ESM4NpcCustomData& data = ptr.getRefData().getCustomData()->asESM4NpcCustomData();
|
||||
const VFS::Manager* vfs = MWBase::Environment::get().getResourceSystem()->getVFS();
|
||||
if (data.mTraits->mIsTES4)
|
||||
return "meshes\\" + data.mTraits->mModel;
|
||||
return Misc::ResourceHelpers::correctMeshPath(data.mTraits->mModel, vfs);
|
||||
if (data.mIsFemale)
|
||||
return "meshes\\" + data.mRace->mModelFemale;
|
||||
return Misc::ResourceHelpers::correctMeshPath(data.mRace->mModelFemale, vfs);
|
||||
else
|
||||
return "meshes\\" + data.mRace->mModelMale;
|
||||
return Misc::ResourceHelpers::correctMeshPath(data.mRace->mModelMale, vfs);
|
||||
}
|
||||
|
||||
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)
|
||||
: Animation(ptr, std::move(parentNode), resourceSystem)
|
||||
{
|
||||
std::string smodel
|
||||
= Misc::ResourceHelpers::correctMeshPath(mPtr.getClass().getModel(mPtr), mResourceSystem->getVFS());
|
||||
setObjectRoot(smodel, true, true, false);
|
||||
setObjectRoot(mPtr.getClass().getModel(mPtr), true, true, false);
|
||||
updateParts();
|
||||
}
|
||||
|
||||
@ -71,7 +69,7 @@ namespace MWRender
|
||||
|
||||
for (const ESM4::Race::BodyPart& bodyPart : (isFemale ? race->mBodyPartsFemale : race->mBodyPartsMale))
|
||||
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);
|
||||
if (!traits->mHair.isZeroOrUnset())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user