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:
parent
74f17d2882
commit
585b4a7f70
1 changed files with 5 additions and 0 deletions
|
@ -353,6 +353,11 @@ void FGGlobals::append_fg_scenery (const std::string &paths, bool secure)
|
||||||
continue;
|
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);
|
simgear::Dir dir(abspath);
|
||||||
SGPath terrainDir(dir.file("Terrain"));
|
SGPath terrainDir(dir.file("Terrain"));
|
||||||
SGPath objectsDir(dir.file("Objects"));
|
SGPath objectsDir(dir.file("Objects"));
|
||||||
|
|
Loading…
Add table
Reference in a new issue