Erik Hofman wrote :

Update of /var/cvs/FlightGear-0.9/FlightGear/src/Main
In directory baron:/tmp/cvs-serv24714

Modified Files:
fg_init.cxx Log Message:
Geoff Air:


RE: --aircraft=ufo in system.fgfsrc is ignored

To change a 'feature', one that has been mentioned here many
times, and again recently, place the following code block
into fgInitFGAircraft.

In its favour, I would argue this means FG can be run without
a command line, provided FG_ROOT has been set in the
environment, and that seems to me, as it should be ... ;=))

Perhaps the only counter, is that system.fgfsrc is read twice,
but so are others, like .fgfsrc, for other (local) options ...
or system.fgfsrc should .nt. be used for 'aircraft' ?





Well, reading this piece of code, I don't see how it could work. see below :

Index: fg_init.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Main/fg_init.cxx,v
retrieving revision 1.115
retrieving revision 1.116
diff -C2 -r1.115 -r1.116
*** fg_init.cxx 27 Dec 2004 17:35:22 -0000 1.115
--- fg_init.cxx 29 Jan 2005 10:22:44 -0000 1.116
***************
*** 344,347 ****
--- 344,353 ----
if ( !aircraft.empty() ) {


Aircraft not empty here, otherwise the test had failed

SG_LOG(SG_INPUT, SG_INFO, "aircraft = " << aircraft );


This shouldn't change the aircraft variable

+ if ( aircraft.empty() ) {


useless test because aircraft is not empty ( see above )

+ // Check for $fg_root/system.fgfsrc
+ SGPath sysconf( globals->get_fg_root() );
+ sysconf.append( "system.fgfsrc" );
+ aircraft = fgScanForOption( "--aircraft=", sysconf.str() );
+ }


So the block above is never executed This is dead code.

fgSetString("/sim/aircraft", aircraft.c_str() );
} else {



-Fred



_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to