From c800152ca25c2e6abed79f87f7f158b54b9a6781 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Fri, 22 Sep 2023 01:00:32 +0300 Subject: [PATCH] Diminish error marker prominence Don't render ESM4 actors or SpeedTree objects --- apps/openmw/mwclass/esm4base.hpp | 7 ++----- components/resource/scenemanager.cpp | 5 +++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwclass/esm4base.hpp b/apps/openmw/mwclass/esm4base.hpp index 3d2184e5fe..c59e8e1dc2 100644 --- a/apps/openmw/mwclass/esm4base.hpp +++ b/apps/openmw/mwclass/esm4base.hpp @@ -150,11 +150,8 @@ namespace MWClass std::string getModel(const MWWorld::ConstPtr& ptr) const override { - // TODO: Not clear where to get something renderable: - // ESM4::Npc::mModel is usually an empty string - // ESM4::Race::mModelMale is only a skeleton - // For now show error marker as a dummy model. - return "meshes/marker_error.nif"; + // TODO: Implement actor rendering. This function will typically return the skeleton. + return {}; } }; } diff --git a/components/resource/scenemanager.cpp b/components/resource/scenemanager.cpp index dde39c5d65..66fee5256d 100644 --- a/components/resource/scenemanager.cpp +++ b/components/resource/scenemanager.cpp @@ -726,6 +726,11 @@ namespace Resource auto ext = Misc::getFileExtension(normalizedFilename); if (ext == "nif") return NifOsg::Loader::load(*nifFileManager->get(normalizedFilename), imageManager); + else if (ext == "spt") + { + Log(Debug::Warning) << "Ignoring SpeedTree data file " << normalizedFilename; + return new osg::Node(); + } else return loadNonNif(normalizedFilename, *vfs->get(normalizedFilename), imageManager); }