1
0
Fork 0

Fix "failed to load file: Models/..."

After removing /Models from FGData loading of shared models from
within a scenery model failed because the ResourceManager did not know
about additional scenery paths.
This commit is contained in:
Torsten Dreyer 2016-03-19 21:05:28 +01:00
parent 74f17d2882
commit 585b4a7f70

View file

@ -353,6 +353,11 @@ void FGGlobals::append_fg_scenery (const std::string &paths, bool secure)
continue;
}
// tell the ResouceManager about the scenery path
// needed to load Models from this scenery path
simgear::ResourceManager::instance()->addBasePath(abspath.str(),
simgear::ResourceManager::PRIORITY_DEFAULT);
simgear::Dir dir(abspath);
SGPath terrainDir(dir.file("Terrain"));
SGPath objectsDir(dir.file("Objects"));