Add settings for disabling the individual preloading types

coverity_scan
scrawl 9 years ago
parent 10a3e270a3
commit 6806741d9b

@ -457,6 +457,9 @@ namespace MWWorld
, mCellLoadingThreshold(1024.f) , mCellLoadingThreshold(1024.f)
, mPreloadDistance(Settings::Manager::getInt("preload distance", "Cells")) , mPreloadDistance(Settings::Manager::getInt("preload distance", "Cells"))
, mPreloadEnabled(Settings::Manager::getBool("preload enabled", "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.reset(new CellPreloader(rendering.getResourceSystem(), physics->getShapeManager()));
mPreloader->setWorkQueue(mRendering.getWorkQueue()); mPreloader->setWorkQueue(mRendering.getWorkQueue());
@ -631,9 +634,12 @@ namespace MWWorld
void Scene::preloadCells() void Scene::preloadCells()
{ {
preloadTeleportDoorDestinations(); if (mPreloadDoors)
preloadExteriorGrid(); preloadTeleportDoorDestinations();
preloadFastTravelDestinations(); if (mPreloadExteriorGrid)
preloadExteriorGrid();
if (mPreloadFastTravel)
preloadFastTravelDestinations();
} }
void Scene::preloadTeleportDoorDestinations() void Scene::preloadTeleportDoorDestinations()

@ -64,6 +64,10 @@ namespace MWWorld
float mPreloadDistance; float mPreloadDistance;
bool mPreloadEnabled; bool mPreloadEnabled;
bool mPreloadExteriorGrid;
bool mPreloadDoors;
bool mPreloadFastTravel;
void insertCell (CellStore &cell, bool rescale, Loading::Listener* loadingListener); 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 // Load and unload cells as necessary to create a cell grid with "X" and "Y" in the center

@ -37,9 +37,18 @@ first person field of view = 55.0
# dramatically affect performance, see documentation for details. # dramatically affect performance, see documentation for details.
exterior cell load distance = 1 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 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 # Preloading distance threshold
preload distance = 1000 preload distance = 1000

Loading…
Cancel
Save