]> git.mxchange.org Git - flightgear.git/commitdiff
Fix "failed to load file: Models/..."
authorTorsten Dreyer <torsten@t3r.de>
Sat, 19 Mar 2016 20:05:28 +0000 (21:05 +0100)
committerTorsten Dreyer <torsten@t3r.de>
Sat, 19 Mar 2016 20:08:24 +0000 (21:08 +0100)
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.

src/Main/globals.cxx

index a93c23836af221a1cf6642b5cb20f7476d719afb..796b18cd8f66d1ef35085ca9f8b738efd2534056 100644 (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"));