]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGFDMExec.cpp
Make yasim accept the launchbar and hook properties. They are not tied to anything...
[flightgear.git] / src / FDM / JSBSim / FGFDMExec.cpp
index 3002ec56bdc2f44175b5eeba46acd7ccbaef58ac..fb7d967677c23835d88596597667c2f44ddcb540 100644 (file)
@@ -384,18 +384,22 @@ vector <string> FGFDMExec::EnumerateFDMs(void)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-bool FGFDMExec::LoadModel(string AircraftPath, string EnginePath, string model)
+bool FGFDMExec::LoadModel(string AircraftPath, string EnginePath, string model,
+                bool addModelToPath)
 {
+
   FGFDMExec::AircraftPath = AircraftPath;
   FGFDMExec::EnginePath = EnginePath;
 
-  return LoadModel(model);
+  return LoadModel(model, addModelToPath);
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-bool FGFDMExec::LoadModel(string model)
+
+bool FGFDMExec::LoadModel(string model, bool addModelToPath)
 {
+  
   bool result = true;
   string token;
   string aircraftCfgFileName;
@@ -406,10 +410,13 @@ bool FGFDMExec::LoadModel(string model)
     return false;
   }
 
+  aircraftCfgFileName = AircraftPath;
 # ifndef macintosh
-  aircraftCfgFileName = AircraftPath + "/"  + model + ".xml";
+  if (addModelToPath) aircraftCfgFileName += "/" + model;
+  aircraftCfgFileName += "/" + model + ".xml";
 # else
-  aircraftCfgFileName = AircraftPath + ";"  + model + ".xml";
+  if (addModelToPath) aircraftCfgFileName += ";"  + model;
+  aircraftCfgFileName += ";"  + model + ".xml";
 # endif
 
   FGConfigFile AC_cfg(aircraftCfgFileName);
@@ -496,7 +503,9 @@ bool FGFDMExec::ReadPrologue(FGConfigFile* AC_cfg)
   }
 
   if (Release == "ALPHA") {
+#ifndef _MSC_VER
     system("banner ALPHA");
+#endif
     cout << endl << endl
          << highint << "This aircraft model is an " << fgred << Release
          << reset << highint << " release!!!" << endl << endl << reset
@@ -505,7 +514,9 @@ bool FGFDMExec::ReadPrologue(FGConfigFile* AC_cfg)
          << fgred << highint << "Use this model for development purposes ONLY!!!"
          << normint << reset << endl << endl;
   } else if (Release == "BETA") {
+#ifndef _MSC_VER
     system("banner BETA");
+#endif
     cout << endl << endl
          << highint << "This aircraft model is a " << fgred << Release
          << reset << highint << " release!!!" << endl << endl << reset