mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 17:11:33 +00:00
Use settings values for Navigator settings
This commit is contained in:
parent
b3c8a15af1
commit
68de5690ef
3 changed files with 5 additions and 8 deletions
|
@ -199,7 +199,7 @@ namespace NavMeshTool
|
||||||
Settings::game().mActorCollisionShapeType,
|
Settings::game().mActorCollisionShapeType,
|
||||||
Settings::game().mDefaultActorPathfindHalfExtents,
|
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");
|
const auto dbPath = Files::pathToUnicodeString(config.getUserDataPath() / "navmesh.db");
|
||||||
|
|
||||||
Log(Debug::Info) << "Using navmeshdb at " << dbPath;
|
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.
|
// It is unnecessary to stop/start the viewer as no frames are being rendered yet.
|
||||||
mResourceSystem->getSceneManager()->getShaderManager().setGlobalDefines(globalDefines);
|
mResourceSystem->getSceneManager()->getShaderManager().setGlobalDefines(globalDefines);
|
||||||
|
|
||||||
mNavMesh = std::make_unique<NavMesh>(mRootNode, mWorkQueue,
|
mNavMesh = std::make_unique<NavMesh>(mRootNode, mWorkQueue, Settings::navigator().mEnableNavMeshRender,
|
||||||
Settings::Manager::getBool("enable nav mesh render", "Navigator"),
|
|
||||||
Settings::navigator().mNavMeshRenderMode);
|
Settings::navigator().mNavMeshRenderMode);
|
||||||
mActorsPaths = std::make_unique<ActorsPaths>(
|
mActorsPaths = std::make_unique<ActorsPaths>(mRootNode, Settings::navigator().mEnableAgentsPathsRender);
|
||||||
mRootNode, Settings::Manager::getBool("enable agents paths render", "Navigator"));
|
mRecastMesh = std::make_unique<RecastMesh>(mRootNode, Settings::navigator().mEnableRecastMeshRender);
|
||||||
mRecastMesh = std::make_unique<RecastMesh>(
|
|
||||||
mRootNode, Settings::Manager::getBool("enable recast mesh render", "Navigator"));
|
|
||||||
mPathgrid = std::make_unique<Pathgrid>(mRootNode);
|
mPathgrid = std::make_unique<Pathgrid>(mRootNode);
|
||||||
|
|
||||||
mObjects = std::make_unique<Objects>(mResourceSystem, sceneRoot, unrefQueue);
|
mObjects = std::make_unique<Objects>(mResourceSystem, sceneRoot, unrefQueue);
|
||||||
|
|
|
@ -294,7 +294,7 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
mPhysics = std::make_unique<MWPhysics::PhysicsSystem>(mResourceSystem, rootNode);
|
mPhysics = std::make_unique<MWPhysics::PhysicsSystem>(mResourceSystem, rootNode);
|
||||||
|
|
||||||
if (Settings::Manager::getBool("enable", "Navigator"))
|
if (Settings::navigator().mEnable)
|
||||||
{
|
{
|
||||||
auto navigatorSettings = DetourNavigator::makeSettingsFromSettingsManager();
|
auto navigatorSettings = DetourNavigator::makeSettingsFromSettingsManager();
|
||||||
navigatorSettings.mRecast.mSwimHeightScale = mSwimHeightScale;
|
navigatorSettings.mRecast.mSwimHeightScale = mSwimHeightScale;
|
||||||
|
|
Loading…
Reference in a new issue