]> git.mxchange.org Git - flightgear.git/commitdiff
Put the code at the proper place.
authorehofman <ehofman>
Sat, 29 Jan 2005 13:12:34 +0000 (13:12 +0000)
committerehofman <ehofman>
Sat, 29 Jan 2005 13:12:34 +0000 (13:12 +0000)
src/Main/fg_init.cxx

index 66d0a4809d40802b851e4a12d8ab015cadb1ae31..924b1b8cf94c45e22b7b3251e59e16041c8ecc55 100644 (file)
@@ -340,15 +340,15 @@ bool fgInitFGAircraft ( int argc, char **argv ) {
         }
     }
 
+    if ( aircraft.empty() ) {
+        // Check for $fg_root/system.fgfsrc
+        SGPath sysconf( globals->get_fg_root() );
+        sysconf.append( "system.fgfsrc" );
+        aircraft = fgScanForOption( "--aircraft=", sysconf.str() );
+    }
     // if an aircraft was specified, set the property name
     if ( !aircraft.empty() ) {
         SG_LOG(SG_INPUT, SG_INFO, "aircraft = " << aircraft );
-        if ( aircraft.empty() ) {
-            // Check for $fg_root/system.fgfsrc
-            SGPath sysconf( globals->get_fg_root() );
-            sysconf.append( "system.fgfsrc" );
-            aircraft = fgScanForOption( "--aircraft=", sysconf.str() );
-        } 
         fgSetString("/sim/aircraft", aircraft.c_str() );
     } else {
         SG_LOG(SG_INPUT, SG_INFO, "No user specified aircraft, using default" );