mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 21:35:24 +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(),
|
addOption("fallback", bpo::value<FallbackMap>()->default_value(FallbackMap(), "")->multitoken()->composing(),
|
||||||
"fallback values");
|
"fallback values");
|
||||||
;
|
|
||||||
Files::ConfigurationManager::addCommonOptions(result);
|
Files::ConfigurationManager::addCommonOptions(result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -132,10 +132,9 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
Files::ConfigurationManager config;
|
Files::ConfigurationManager config;
|
||||||
|
|
||||||
bpo::variables_map composingVariables = Files::separateComposingVariables(variables, desc);
|
|
||||||
config.readConfiguration(variables, desc);
|
config.readConfiguration(variables, desc);
|
||||||
Files::mergeComposingVariables(variables, composingVariables, desc);
|
|
||||||
|
setupLogging(config.getLogPath(), applicationName);
|
||||||
|
|
||||||
const std::string encoding(variables["encoding"].as<std::string>());
|
const std::string encoding(variables["encoding"].as<std::string>());
|
||||||
Log(Debug::Info) << ToUTF8::encodingUsingMessage(encoding);
|
Log(Debug::Info) << ToUTF8::encodingUsingMessage(encoding);
|
||||||
@ -166,8 +165,6 @@ namespace
|
|||||||
|
|
||||||
Settings::Manager::load(config);
|
Settings::Manager::load(config);
|
||||||
|
|
||||||
setupLogging(config.getLogPath(), applicationName);
|
|
||||||
|
|
||||||
ESM::ReadersCache readers;
|
ESM::ReadersCache readers;
|
||||||
EsmLoader::Query query;
|
EsmLoader::Query query;
|
||||||
query.mLoadActivators = true;
|
query.mLoadActivators = true;
|
||||||
|
@ -151,10 +151,9 @@ namespace NavMeshTool
|
|||||||
}
|
}
|
||||||
|
|
||||||
Files::ConfigurationManager config;
|
Files::ConfigurationManager config;
|
||||||
|
|
||||||
bpo::variables_map composingVariables = Files::separateComposingVariables(variables, desc);
|
|
||||||
config.readConfiguration(variables, desc);
|
config.readConfiguration(variables, desc);
|
||||||
Files::mergeComposingVariables(variables, composingVariables, desc);
|
|
||||||
|
setupLogging(config.getLogPath(), applicationName);
|
||||||
|
|
||||||
const std::string encoding(variables["encoding"].as<std::string>());
|
const std::string encoding(variables["encoding"].as<std::string>());
|
||||||
Log(Debug::Info) << ToUTF8::encodingUsingMessage(encoding);
|
Log(Debug::Info) << ToUTF8::encodingUsingMessage(encoding);
|
||||||
@ -201,8 +200,6 @@ namespace NavMeshTool
|
|||||||
|
|
||||||
Settings::Manager::load(config);
|
Settings::Manager::load(config);
|
||||||
|
|
||||||
setupLogging(config.getLogPath(), applicationName);
|
|
||||||
|
|
||||||
const auto agentCollisionShape = DetourNavigator::toCollisionShapeType(
|
const auto agentCollisionShape = DetourNavigator::toCollisionShapeType(
|
||||||
Settings::Manager::getInt("actor collision shape type", "Game"));
|
Settings::Manager::getInt("actor collision shape type", "Game"));
|
||||||
const osg::Vec3f agentHalfExtents
|
const osg::Vec3f agentHalfExtents
|
||||||
@ -211,6 +208,8 @@ namespace NavMeshTool
|
|||||||
const std::uint64_t maxDbFileSize = Settings::Manager::getUInt64("max navmeshdb file size", "Navigator");
|
const std::uint64_t maxDbFileSize = Settings::Manager::getUInt64("max navmeshdb file size", "Navigator");
|
||||||
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;
|
||||||
|
|
||||||
DetourNavigator::NavMeshDb db(dbPath, maxDbFileSize);
|
DetourNavigator::NavMeshDb db(dbPath, maxDbFileSize);
|
||||||
|
|
||||||
ESM::ReadersCache readers;
|
ESM::ReadersCache readers;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user