mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:53:53 +00:00
Reject models that don't have grass\ prefix from groundcover cache
This commit is contained in:
parent
28c97c22b9
commit
a5d8286cf2
2 changed files with 12 additions and 4 deletions
|
@ -113,6 +113,7 @@
|
||||||
Bug #6631: Fix ffmpeg avio API usage causing hangs in ffmpeg version 5
|
Bug #6631: Fix ffmpeg avio API usage causing hangs in ffmpeg version 5
|
||||||
Bug #6667: Pressing the Esc key while resting or waiting causes black screen.
|
Bug #6667: Pressing the Esc key while resting or waiting causes black screen.
|
||||||
Bug #6670: Dialogue order is incorrect
|
Bug #6670: Dialogue order is incorrect
|
||||||
|
Bug #6672: Garbage object refs in groundcover plugins like Vurt's grass plugins
|
||||||
Bug #6680: object.cpp handles nodetree unsafely, memory access with dangling pointer
|
Bug #6680: object.cpp handles nodetree unsafely, memory access with dangling pointer
|
||||||
Bug #6682: HitOnMe doesn't fire as intended
|
Bug #6682: HitOnMe doesn't fire as intended
|
||||||
Bug #6697: Shaders vertex lighting incorrectly clamped
|
Bug #6697: Shaders vertex lighting incorrectly clamped
|
||||||
|
|
|
@ -18,18 +18,25 @@ namespace MWWorld
|
||||||
ESM::ReadersCache readers;
|
ESM::ReadersCache readers;
|
||||||
const ::EsmLoader::EsmData content = ::EsmLoader::loadEsmData(query, groundcoverFiles, fileCollections, readers, encoder);
|
const ::EsmLoader::EsmData content = ::EsmLoader::loadEsmData(query, groundcoverFiles, fileCollections, readers, encoder);
|
||||||
|
|
||||||
|
static constexpr std::string_view prefix = "grass\\";
|
||||||
for (const ESM::Static& stat : statics)
|
for (const ESM::Static& stat : statics)
|
||||||
{
|
{
|
||||||
std::string id = Misc::StringUtils::lowerCase(stat.mId);
|
std::string id = Misc::StringUtils::lowerCase(stat.mId);
|
||||||
mMeshCache[id] = Misc::StringUtils::lowerCase(
|
std::string model = Misc::StringUtils::lowerCase(stat.mModel);
|
||||||
MWBase::Environment::get().getWindowManager()->correctMeshPath(stat.mModel));
|
std::replace(model.begin(), model.end(), '/', '\\');
|
||||||
|
if (model.compare(0, prefix.size(), prefix) != 0)
|
||||||
|
continue;
|
||||||
|
mMeshCache[id] = MWBase::Environment::get().getWindowManager()->correctMeshPath(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const ESM::Static& stat : content.mStatics)
|
for (const ESM::Static& stat : content.mStatics)
|
||||||
{
|
{
|
||||||
std::string id = Misc::StringUtils::lowerCase(stat.mId);
|
std::string id = Misc::StringUtils::lowerCase(stat.mId);
|
||||||
mMeshCache[id] = Misc::StringUtils::lowerCase(
|
std::string model = Misc::StringUtils::lowerCase(stat.mModel);
|
||||||
MWBase::Environment::get().getWindowManager()->correctMeshPath(stat.mModel));
|
std::replace(model.begin(), model.end(), '/', '\\');
|
||||||
|
if (model.compare(0, prefix.size(), prefix) != 0)
|
||||||
|
continue;
|
||||||
|
mMeshCache[id] = MWBase::Environment::get().getWindowManager()->correctMeshPath(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const ESM::Cell& cell : content.mCells)
|
for (const ESM::Cell& cell : content.mCells)
|
||||||
|
|
Loading…
Reference in a new issue