]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/options.cxx
In the process of changing, adding and removing files the last few years
[flightgear.git] / src / Main / options.cxx
index 11b5e7c0bd8f1cbe77eecc1c8b7f1b19fc31df0a..24bac915245900cfa6bd4e3b4c34a8f2a053ee6d 100644 (file)
@@ -47,7 +47,6 @@
 // #include <Airports/simple.hxx>
 // #include <Cockpit/cockpit.hxx>
 // #include <FDM/flight.hxx>
-// #include <FDM/UIUCModel/uiuc_aircraftdir.h>
 
 #include <Autopilot/route_mgr.hxx>
 #include <GUI/gui.h>
@@ -1152,6 +1151,15 @@ fgOptDME( const char *arg )
     return FG_OPTIONS_OK;
 }
 
+static int
+fgOptLivery( const char *arg )
+{
+    string opt = arg;
+    string livery_path = "livery/" + opt;
+    fgSetString("/sim/model/texture-path", livery_path.c_str() );
+    return FG_OPTIONS_OK;
+}
+
 static map<string,size_t> fgOptionMap;
 
 /*
@@ -1352,6 +1360,7 @@ struct OptionDesc {
     {"adf",                          true,  OPTION_FUNC,   "", false, "", fgOptADF },
     {"dme",                          true,  OPTION_FUNC,   "", false, "", fgOptDME },
     {"min-status",                   true,  OPTION_STRING,  "/sim/aircraft-min-status", false, "all", 0 },
+    {"livery",                       true,  OPTION_FUNC,   "", false, "", fgOptLivery },
     {0}
 };