From: Torsten Dreyer Date: Sat, 19 Mar 2016 20:05:28 +0000 (+0100) Subject: Fix "failed to load file: Models/..." X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=585b4a7f70334ac33ba9c07602fc41beb5edfdb2;p=flightgear.git 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. --- diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx index a93c23836..796b18cd8 100644 --- a/src/Main/globals.cxx +++ b/src/Main/globals.cxx @@ -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"));