]> git.mxchange.org Git - flightgear.git/commitdiff
Added --aircraft= option back in, but now it refers to a top level aircraft
authorcurt <curt>
Fri, 7 Dec 2001 17:37:15 +0000 (17:37 +0000)
committercurt <curt>
Fri, 7 Dec 2001 17:37:15 +0000 (17:37 +0000)
config file that pulls in the proper fdm, aero model, panel, 3d model, etc.
for the aircraft.

src/Main/options.cxx

index cb144687542bf444ff4c3a7d53be858aa2e69494..64e08624a6e56bf37324dba328cc45252139133e 100644 (file)
@@ -902,6 +902,19 @@ parse_option (const string& arg)
          SG_LOG(SG_INPUT, SG_ALERT, message);
          exit(2);
        }
+    } else if ( arg.find( "--aircraft=" ) == 0 ) {
+        SGPath apath(globals->get_fg_root());
+       apath.append("Aircraft");
+       apath.append(arg.substr(11));
+       apath.concat("-set.xml");
+       try {
+            readProperties(apath.str(), globals->get_props());
+       } catch (const sg_exception &e) {
+            string message = "Error loading aircraft file: ";
+            message += e.getFormattedMessage();
+            SG_LOG(SG_INPUT, SG_ALERT, message);
+            exit(2);
+       }
     } else {
        SG_LOG( SG_GENERAL, SG_ALERT, "Unknown option '" << arg << "'" );
        return FG_OPTIONS_ERROR;