mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-16 08:42:23 +00:00
Use normalized path in ObjectPaging::createChunk
This commit is contained in:
parent
7e453d491a
commit
2ef5a8486d
@ -20,6 +20,7 @@
|
|||||||
#include <components/esm3/loaddoor.hpp>
|
#include <components/esm3/loaddoor.hpp>
|
||||||
#include <components/esm3/loadstat.hpp>
|
#include <components/esm3/loadstat.hpp>
|
||||||
#include <components/esm3/readerscache.hpp>
|
#include <components/esm3/readerscache.hpp>
|
||||||
|
#include <components/misc/pathhelpers.hpp>
|
||||||
#include <components/misc/resourcehelpers.hpp>
|
#include <components/misc/resourcehelpers.hpp>
|
||||||
#include <components/misc/rng.hpp>
|
#include <components/misc/rng.hpp>
|
||||||
#include <components/resource/scenemanager.hpp>
|
#include <components/resource/scenemanager.hpp>
|
||||||
@ -639,7 +640,7 @@ namespace MWRender
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
const int type = store.findStatic(ref.mRefId);
|
const int type = store.findStatic(ref.mRefId);
|
||||||
std::string model = getModel(type, ref.mRefId, store);
|
VFS::Path::Normalized model = getModel(type, ref.mRefId, store);
|
||||||
if (model.empty())
|
if (model.empty())
|
||||||
continue;
|
continue;
|
||||||
model = Misc::ResourceHelpers::correctMeshPath(model);
|
model = Misc::ResourceHelpers::correctMeshPath(model);
|
||||||
@ -647,10 +648,10 @@ namespace MWRender
|
|||||||
if (activeGrid && type != ESM::REC_STAT)
|
if (activeGrid && type != ESM::REC_STAT)
|
||||||
{
|
{
|
||||||
model = Misc::ResourceHelpers::correctActorModelPath(model, mSceneManager->getVFS());
|
model = Misc::ResourceHelpers::correctActorModelPath(model, mSceneManager->getVFS());
|
||||||
std::string kfname = Misc::StringUtils::lowerCase(model);
|
if (Misc::getFileExtension(model) == "nif")
|
||||||
if (kfname.size() > 4 && kfname.ends_with(".nif"))
|
|
||||||
{
|
{
|
||||||
kfname.replace(kfname.size() - 4, 4, ".kf");
|
VFS::Path::Normalized kfname = model;
|
||||||
|
kfname.changeExtension("kf");
|
||||||
if (mSceneManager->getVFS()->exists(kfname))
|
if (mSceneManager->getVFS()->exists(kfname))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -671,7 +672,7 @@ namespace MWRender
|
|||||||
->second;
|
->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::ref_ptr<const osg::Node> cnode = mSceneManager->getTemplate(VFS::Path::toNormalized(model), false);
|
osg::ref_ptr<const osg::Node> cnode = mSceneManager->getTemplate(model, false);
|
||||||
|
|
||||||
if (activeGrid)
|
if (activeGrid)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user