diff --git a/apps/openmw/mwworld/scene.cpp b/apps/openmw/mwworld/scene.cpp index 130644d7f..3658bff35 100644 --- a/apps/openmw/mwworld/scene.cpp +++ b/apps/openmw/mwworld/scene.cpp @@ -457,6 +457,9 @@ namespace MWWorld , mCellLoadingThreshold(1024.f) , mPreloadDistance(Settings::Manager::getInt("preload distance", "Cells")) , mPreloadEnabled(Settings::Manager::getBool("preload enabled", "Cells")) + , mPreloadExteriorGrid(Settings::Manager::getBool("preload exterior grid", "Cells")) + , mPreloadDoors(Settings::Manager::getBool("preload doors", "Cells")) + , mPreloadFastTravel(Settings::Manager::getBool("preload fast travel", "Cells")) { mPreloader.reset(new CellPreloader(rendering.getResourceSystem(), physics->getShapeManager())); mPreloader->setWorkQueue(mRendering.getWorkQueue()); @@ -631,9 +634,12 @@ namespace MWWorld void Scene::preloadCells() { - preloadTeleportDoorDestinations(); - preloadExteriorGrid(); - preloadFastTravelDestinations(); + if (mPreloadDoors) + preloadTeleportDoorDestinations(); + if (mPreloadExteriorGrid) + preloadExteriorGrid(); + if (mPreloadFastTravel) + preloadFastTravelDestinations(); } void Scene::preloadTeleportDoorDestinations() diff --git a/apps/openmw/mwworld/scene.hpp b/apps/openmw/mwworld/scene.hpp index f473f7a3c..5c429f7c7 100644 --- a/apps/openmw/mwworld/scene.hpp +++ b/apps/openmw/mwworld/scene.hpp @@ -64,6 +64,10 @@ namespace MWWorld float mPreloadDistance; bool mPreloadEnabled; + bool mPreloadExteriorGrid; + bool mPreloadDoors; + bool mPreloadFastTravel; + void insertCell (CellStore &cell, bool rescale, Loading::Listener* loadingListener); // Load and unload cells as necessary to create a cell grid with "X" and "Y" in the center diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 4df20e709..4a9a5dd65 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -37,9 +37,18 @@ first person field of view = 55.0 # dramatically affect performance, see documentation for details. exterior cell load distance = 1 -# Preload cells in a background thread +# Preload cells in a background thread. All settings starting with 'preload' have no effect unless this is enabled. preload enabled = true +# Preload adjacent cells when moving close to an exterior cell border. +preload exterior grid = true + +# Preload possible fast travel destinations. +preload fast travel = true + +# Preload the locations that doors lead to. +preload doors = true + # Preloading distance threshold preload distance = 1000