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)
, 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,8 +634,11 @@ namespace MWWorld
void Scene::preloadCells()
{
if (mPreloadDoors)
preloadTeleportDoorDestinations();
if (mPreloadExteriorGrid)
preloadExteriorGrid();
if (mPreloadFastTravel)
preloadFastTravelDestinations();
}

@ -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

@ -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

Loading…
Cancel
Save