From 585b4a7f70334ac33ba9c07602fc41beb5edfdb2 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Sat, 19 Mar 2016 21:05:28 +0100 Subject: [PATCH] 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. --- src/Main/globals.cxx | 5 +++++ 1 file changed, 5 insertions(+) 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")); -- 2.39.5