mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
Use settings values for Navigator settings
This commit is contained in:
parent
b3c8a15af1
commit
68de5690ef
@ -199,7 +199,7 @@ namespace NavMeshTool
|
||||
Settings::game().mActorCollisionShapeType,
|
||||
Settings::game().mDefaultActorPathfindHalfExtents,
|
||||
};
|
||||
const std::uint64_t maxDbFileSize = Settings::Manager::getUInt64("max navmeshdb file size", "Navigator");
|
||||
const std::uint64_t maxDbFileSize = Settings::navigator().mMaxNavmeshdbFileSize;
|
||||
const auto dbPath = Files::pathToUnicodeString(config.getUserDataPath() / "navmesh.db");
|
||||
|
||||
Log(Debug::Info) << "Using navmeshdb at " << dbPath;
|
||||
|
@ -425,13 +425,10 @@ namespace MWRender
|
||||
// It is unnecessary to stop/start the viewer as no frames are being rendered yet.
|
||||
mResourceSystem->getSceneManager()->getShaderManager().setGlobalDefines(globalDefines);
|
||||
|
||||
mNavMesh = std::make_unique<NavMesh>(mRootNode, mWorkQueue,
|
||||
Settings::Manager::getBool("enable nav mesh render", "Navigator"),
|
||||
mNavMesh = std::make_unique<NavMesh>(mRootNode, mWorkQueue, Settings::navigator().mEnableNavMeshRender,
|
||||
Settings::navigator().mNavMeshRenderMode);
|
||||
mActorsPaths = std::make_unique<ActorsPaths>(
|
||||
mRootNode, Settings::Manager::getBool("enable agents paths render", "Navigator"));
|
||||
mRecastMesh = std::make_unique<RecastMesh>(
|
||||
mRootNode, Settings::Manager::getBool("enable recast mesh render", "Navigator"));
|
||||
mActorsPaths = std::make_unique<ActorsPaths>(mRootNode, Settings::navigator().mEnableAgentsPathsRender);
|
||||
mRecastMesh = std::make_unique<RecastMesh>(mRootNode, Settings::navigator().mEnableRecastMeshRender);
|
||||
mPathgrid = std::make_unique<Pathgrid>(mRootNode);
|
||||
|
||||
mObjects = std::make_unique<Objects>(mResourceSystem, sceneRoot, unrefQueue);
|
||||
|
@ -294,7 +294,7 @@ namespace MWWorld
|
||||
{
|
||||
mPhysics = std::make_unique<MWPhysics::PhysicsSystem>(mResourceSystem, rootNode);
|
||||
|
||||
if (Settings::Manager::getBool("enable", "Navigator"))
|
||||
if (Settings::navigator().mEnable)
|
||||
{
|
||||
auto navigatorSettings = DetourNavigator::makeSettingsFromSettingsManager();
|
||||
navigatorSettings.mRecast.mSwimHeightScale = mSwimHeightScale;
|
||||
|
Loading…
Reference in New Issue
Block a user