mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Merge branch 'fix_read_config' into 'master'
Properly support portable configuration for bulletobjectool and navmeshtool See merge request OpenMW/openmw!3082
This commit is contained in:
commit
ac49356bab
@ -95,7 +95,7 @@ namespace
|
||||
|
||||
addOption("fallback", bpo::value<FallbackMap>()->default_value(FallbackMap(), "")->multitoken()->composing(),
|
||||
"fallback values");
|
||||
;
|
||||
|
||||
Files::ConfigurationManager::addCommonOptions(result);
|
||||
|
||||
return result;
|
||||
@ -132,10 +132,9 @@ namespace
|
||||
}
|
||||
|
||||
Files::ConfigurationManager config;
|
||||
|
||||
bpo::variables_map composingVariables = Files::separateComposingVariables(variables, desc);
|
||||
config.readConfiguration(variables, desc);
|
||||
Files::mergeComposingVariables(variables, composingVariables, desc);
|
||||
|
||||
setupLogging(config.getLogPath(), applicationName);
|
||||
|
||||
const std::string encoding(variables["encoding"].as<std::string>());
|
||||
Log(Debug::Info) << ToUTF8::encodingUsingMessage(encoding);
|
||||
@ -166,8 +165,6 @@ namespace
|
||||
|
||||
Settings::Manager::load(config);
|
||||
|
||||
setupLogging(config.getLogPath(), applicationName);
|
||||
|
||||
ESM::ReadersCache readers;
|
||||
EsmLoader::Query query;
|
||||
query.mLoadActivators = true;
|
||||
|
@ -151,10 +151,9 @@ namespace NavMeshTool
|
||||
}
|
||||
|
||||
Files::ConfigurationManager config;
|
||||
|
||||
bpo::variables_map composingVariables = Files::separateComposingVariables(variables, desc);
|
||||
config.readConfiguration(variables, desc);
|
||||
Files::mergeComposingVariables(variables, composingVariables, desc);
|
||||
|
||||
setupLogging(config.getLogPath(), applicationName);
|
||||
|
||||
const std::string encoding(variables["encoding"].as<std::string>());
|
||||
Log(Debug::Info) << ToUTF8::encodingUsingMessage(encoding);
|
||||
@ -201,8 +200,6 @@ namespace NavMeshTool
|
||||
|
||||
Settings::Manager::load(config);
|
||||
|
||||
setupLogging(config.getLogPath(), applicationName);
|
||||
|
||||
const auto agentCollisionShape = DetourNavigator::toCollisionShapeType(
|
||||
Settings::Manager::getInt("actor collision shape type", "Game"));
|
||||
const osg::Vec3f agentHalfExtents
|
||||
@ -211,6 +208,8 @@ namespace NavMeshTool
|
||||
const std::uint64_t maxDbFileSize = Settings::Manager::getUInt64("max navmeshdb file size", "Navigator");
|
||||
const auto dbPath = Files::pathToUnicodeString(config.getUserDataPath() / "navmesh.db");
|
||||
|
||||
Log(Debug::Info) << "Using navmeshdb at " << dbPath;
|
||||
|
||||
DetourNavigator::NavMeshDb db(dbPath, maxDbFileSize);
|
||||
|
||||
ESM::ReadersCache readers;
|
||||
|
Loading…
x
Reference in New Issue
Block a user