]> git.mxchange.org Git - flightgear.git/commitdiff
Add support for loading aircraft which have the configuration file inside it's own...
authorehofman <ehofman>
Mon, 15 Sep 2003 14:21:16 +0000 (14:21 +0000)
committerehofman <ehofman>
Mon, 15 Sep 2003 14:21:16 +0000 (14:21 +0000)
src/Main/fg_init.cxx

index 605036cce1b0699699d7bae0ad17a3416f30fe1e..e5da97091158a404f5887c51175b1c3b00669d4a 100644 (file)
@@ -532,6 +532,14 @@ bool fgInitConfig ( int argc, char **argv ) {
         aircraft_path.append("Aircraft");
         aircraft_path.append(aircraft);
         aircraft_path.concat("-set.xml");
+
+        if ( !ulFileExists(aircraft_path.c_str()) ) {
+            aircraft_path = globals->get_fg_root();
+            aircraft_path.append("Aircraft");
+            aircraft_path.append(aircraft);
+            aircraft_path.append(aircraft);
+            aircraft_path.concat("-set.xml");
+        }
         SG_LOG(SG_INPUT, SG_INFO, "Reading default aircraft: " << aircraft
                << " from " << aircraft_path.str());
         try {