更新 'src/Scenery/tilemgr.cxx'

This commit is contained in:
zhongjin 2022-11-14 13:50:12 +08:00
parent 0b5d3cff9d
commit 44ef3fa6b4

View File

@ -215,6 +215,7 @@ void FGTileMgr::reinit()
_options->setPluginStringData("SimGear::PAGED_LOD_EXPIRY", std::to_string(tile_min_expiry)); _options->setPluginStringData("SimGear::PAGED_LOD_EXPIRY", std::to_string(tile_min_expiry));
string_list scenerySuffixes; string_list scenerySuffixes;
for (auto node : fgGetNode("/sim/rendering/", true)->getChildren("scenery-path-suffix")) { for (auto node : fgGetNode("/sim/rendering/", true)->getChildren("scenery-path-suffix")) {
if (node->getBoolValue("enabled", true)) { if (node->getBoolValue("enabled", true)) {
scenerySuffixes.push_back(node->getStringValue("name")); scenerySuffixes.push_back(node->getStringValue("name"));
@ -226,6 +227,12 @@ void FGTileMgr::reinit()
scenerySuffixes = {"Objects", "Terrain"}; // defaut values scenerySuffixes = {"Objects", "Terrain"}; // defaut values
} }
//zhongjin 自动下载卫星图像
if ( fgGetNode("/sim/rendering/scenery-path-suffix",false)) {
scenerySuffixes.push_back("Orthophotos");
}
if (terraSync) { if (terraSync) {
terraSync->setSceneryPathSuffixes(scenerySuffixes); terraSync->setSceneryPathSuffixes(scenerySuffixes);
} }