diff --git a/CHANGELOG.md b/CHANGELOG.md index e470c086e..e7513b553 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ Bug #4828: Potion looping effects VFX are not shown for NPCs Bug #4837: CTD when a mesh with NiLODNode root node with particles is loaded Bug #4841: Russian localization ignores implicit keywords + Bug #4844: Data race in savegame loading / GlobalMap render Bug #4847: Idle animation reset oddities Bug #4851: No shadows since switch to OSG Bug #4860: Actors outside of processing range visible for one frame after spawning diff --git a/apps/openmw/mwworld/store.cpp b/apps/openmw/mwworld/store.cpp index 2a0c39466..444650217 100644 --- a/apps/openmw/mwworld/store.cpp +++ b/apps/openmw/mwworld/store.cpp @@ -500,7 +500,12 @@ namespace MWWorld } void Store::setUp() { + // The land is static for given game session, there is no need to refresh it every load. + if (mBuilt) + return; + std::sort(mStatic.begin(), mStatic.end(), Compare()); + mBuilt = true; } diff --git a/apps/openmw/mwworld/store.hpp b/apps/openmw/mwworld/store.hpp index 2ed81af48..c6ef401ed 100644 --- a/apps/openmw/mwworld/store.hpp +++ b/apps/openmw/mwworld/store.hpp @@ -247,6 +247,8 @@ namespace MWWorld RecordId load(ESM::ESMReader &esm); void setUp(); + private: + bool mBuilt = false; }; template <>