mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Add a setting to wait for all navmesh jobs on exit
This commit is contained in:
parent
50f4471750
commit
910c88325a
4 changed files with 20 additions and 0 deletions
|
@ -591,6 +591,12 @@ namespace MWWorld
|
||||||
// Must be cleared before mRendering is destroyed
|
// Must be cleared before mRendering is destroyed
|
||||||
if (mProjectileManager)
|
if (mProjectileManager)
|
||||||
mProjectileManager->clear();
|
mProjectileManager->clear();
|
||||||
|
|
||||||
|
if (Settings::navigator().mWaitForAllJobsOnExit)
|
||||||
|
{
|
||||||
|
Log(Debug::Verbose) << "Waiting for all navmesh jobs to be done...";
|
||||||
|
mNavigator->wait(DetourNavigator::WaitConditionType::allJobsDone, nullptr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::setRandomSeed(uint32_t seed)
|
void World::setRandomSeed(uint32_t seed)
|
||||||
|
|
|
@ -63,6 +63,7 @@ namespace Settings
|
||||||
SettingValue<bool> mEnableNavMeshDiskCache{ mIndex, "Navigator", "enable nav mesh disk cache" };
|
SettingValue<bool> mEnableNavMeshDiskCache{ mIndex, "Navigator", "enable nav mesh disk cache" };
|
||||||
SettingValue<bool> mWriteToNavmeshdb{ mIndex, "Navigator", "write to navmeshdb" };
|
SettingValue<bool> mWriteToNavmeshdb{ mIndex, "Navigator", "write to navmeshdb" };
|
||||||
SettingValue<std::uint64_t> mMaxNavmeshdbFileSize{ mIndex, "Navigator", "max navmeshdb file size" };
|
SettingValue<std::uint64_t> mMaxNavmeshdbFileSize{ mIndex, "Navigator", "max navmeshdb file size" };
|
||||||
|
SettingValue<bool> mWaitForAllJobsOnExit{ mIndex, "Navigator", "wait for all jobs on exit" };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -245,6 +245,16 @@ Absent pieces usually mean a bug in recast mesh tiles building.
|
||||||
Allows to do in-game debug.
|
Allows to do in-game debug.
|
||||||
Potentially decreases performance.
|
Potentially decreases performance.
|
||||||
|
|
||||||
|
wait for all jobs on exit
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
:Type: boolean
|
||||||
|
:Range: True/False
|
||||||
|
:Default: False
|
||||||
|
|
||||||
|
Wait until all queued async navmesh jobs are processed before exiting the engine.
|
||||||
|
Useful when a benchmark generates jobs to write into navmeshdb faster than they are processed.
|
||||||
|
|
||||||
Expert settings
|
Expert settings
|
||||||
***************
|
***************
|
||||||
|
|
||||||
|
|
|
@ -999,6 +999,9 @@ write to navmeshdb = true
|
||||||
# Approximate maximum file size of navigation mesh cache stored on disk in bytes (value > 0)
|
# Approximate maximum file size of navigation mesh cache stored on disk in bytes (value > 0)
|
||||||
max navmeshdb file size = 2147483648
|
max navmeshdb file size = 2147483648
|
||||||
|
|
||||||
|
# Wait until all queued async navmesh jobs are processed before exiting the engine (true, false)
|
||||||
|
wait for all jobs on exit = false
|
||||||
|
|
||||||
[Shadows]
|
[Shadows]
|
||||||
|
|
||||||
# Enable or disable shadows. Bear in mind that this will force OpenMW to use shaders as if "[Shaders]/force shaders" was set to true.
|
# Enable or disable shadows. Bear in mind that this will force OpenMW to use shaders as if "[Shaders]/force shaders" was set to true.
|
||||||
|
|
Loading…
Reference in a new issue