mirror of
https://github.com/OpenMW/openmw.git
synced 2026-01-24 14:30:54 +00:00
Disable navmesh updater worker threads by default
This commit is contained in:
parent
ea2048e243
commit
3ac33b86e5
2 changed files with 7 additions and 1 deletions
|
|
@ -348,6 +348,10 @@ namespace DetourNavigator
|
|||
|
||||
void AsyncNavMeshUpdater::wait(WaitConditionType waitConditionType, Loading::Listener* listener)
|
||||
{
|
||||
// If there are no worker threads, jobs will never be processed, so don't wait
|
||||
if (mThreads.empty())
|
||||
return;
|
||||
|
||||
switch (waitConditionType)
|
||||
{
|
||||
case WaitConditionType::requiredTilesPresent:
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ namespace DetourNavigator
|
|||
|
||||
result.mMaxTilesNumber = std::min(limits.mMaxTiles, ::Settings::navigator().mMaxTilesNumber.get());
|
||||
result.mWaitUntilMinDistanceToPlayer = ::Settings::navigator().mWaitUntilMinDistanceToPlayer;
|
||||
result.mAsyncNavMeshUpdaterThreads = ::Settings::navigator().mAsyncNavMeshUpdaterThreads;
|
||||
result.mMaxNavMeshTilesCacheSize = ::Settings::navigator().mMaxNavMeshTilesCacheSize;
|
||||
result.mEnableWriteRecastMeshToFile = ::Settings::navigator().mEnableWriteRecastMeshToFile;
|
||||
result.mEnableWriteNavMeshToFile = ::Settings::navigator().mEnableWriteNavMeshToFile;
|
||||
|
|
@ -106,6 +105,9 @@ namespace DetourNavigator
|
|||
result.mEnableNavMeshDiskCache = ::Settings::navigator().mEnableNavMeshDiskCache;
|
||||
result.mWriteToNavMeshDb = ::Settings::navigator().mWriteToNavmeshdb;
|
||||
result.mMaxDbFileSize = ::Settings::navigator().mMaxNavmeshdbFileSize;
|
||||
|
||||
// Force disable navmesh generation worker threads regardless of config file settings
|
||||
result.mAsyncNavMeshUpdaterThreads = 0;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue