]> git.mxchange.org Git - flightgear.git/commitdiff
Another step towards making aircraft more self contained. YASim aircraft
authorcurt <curt>
Sat, 20 Sep 2003 03:33:06 +0000 (03:33 +0000)
committercurt <curt>
Sat, 20 Sep 2003 03:33:06 +0000 (03:33 +0000)
now read the config file out of the individual aircraft directory rather
than the collective Aircraft-yasim/ directory (which is now obsolete.)
This requires a corresponding update of the base package cvs.

src/FDM/YASim/YASim.cxx
src/Main/fg_init.cxx

index b2906f152e60bf66c01c2b2d333bc43a0908db9f..294ddfe35ae817a86ad09f082c432ba70808feb4 100644 (file)
@@ -146,8 +146,7 @@ void YASim::init()
     }
 
     // Build a filename and parse it
-    SGPath f(globals->get_fg_root());
-    f.append("Aircraft-yasim");
+    SGPath f(fgGetString("/sim/aircraft-dir"));
     f.append(fgGetString("/sim/aero"));
     f.concat(".xml");
     readXML(f.str(), *_fdm);
index cae81a4d4b39307ce47be157cd5accc32f9d80c1..80a9f868d71a14e8425a26390036c82c1474cf5f 100644 (file)
@@ -568,6 +568,7 @@ bool fgInitConfig ( int argc, char **argv ) {
 
         string result = fgFindAircraftPath( aircraft_search, aircraft_set );
         if ( !result.empty() ) {
+            fgSetString( "/sim/aircraft-dir", result.c_str() );
             SGPath full_name( result );
             full_name.append( aircraft_set );