Properly support portable configuration for bulletobjectool and navmeshtool

macos_ci
elsid 2 years ago
parent 8976a1594f
commit 97fed756c8
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -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…
Cancel
Save