]> git.mxchange.org Git - flightgear.git/commitdiff
Modified to use a relative path for aircraft_dir rather than an
authordavid <david>
Fri, 8 Feb 2002 13:21:28 +0000 (13:21 +0000)
committerdavid <david>
Fri, 8 Feb 2002 13:21:28 +0000 (13:21 +0000)
absolute one.  The path should be relative to $FG_ROOT.

src/FDM/UIUCModel/uiuc_wrapper.cpp

index b9efe9a77961d758523af8d409ee3d3c9865dc74..87e1d11c1c4b682788ba3193c03e7305442538d8 100644 (file)
@@ -72,6 +72,7 @@
 **********************************************************************/
 
 #include <simgear/compiler.h>
+#include <simgear/misc/sg_path.hxx>
 #include <Aircraft/aircraft.hxx>
 
 #ifndef FG_OLD_WEATHER
@@ -171,15 +172,12 @@ void uiuc_vel_init ()
 
 void uiuc_init_aeromodel ()
 {
-  string aircraft;
-
-  if (aircraft_dir != (string)"")
-    aircraft = aircraft_dir + "/";
-
-  aircraft += "aircraft.dat";
-  cout << "We are using "<< aircraft << endl;
+  SGPath path(globals->get_fg_root());
+  path.append(aircraft_dir);
+  path.append("aircraft.dat");
+  cout << "We are using "<< path.str() << endl;
   uiuc_initializemaps(); // Initialize the <string,int> maps
-  uiuc_menu(aircraft);   // Read the specified aircraft file 
+  uiuc_menu(path.str());   // Read the specified aircraft file 
 }
 
 void uiuc_force_moment(double dt)