X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Foptions.cxx;h=11951ed088f5ec29153ece6df74af1a90af15734;hb=8f3aa1bebd7c60b1ad328d10beae841daab4e292;hp=1cbd37325ccb65257dc56ce31a3ffb03048baf72;hpb=485230b443de22c97d5c4ddfda98598fb52ce98a;p=flightgear.git diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 1cbd37325..11951ed08 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -38,13 +38,14 @@ bool global_fullscreen = true; #include STL_STRING -#include -#include #include +#include +#include #include #include #include +#include #ifdef FG_NETWORK_OLK # include #endif @@ -82,6 +83,7 @@ atoi( const string& str ) #endif } + // Defined the shared options class here fgOPTIONS current_options; @@ -189,8 +191,12 @@ fgOPTIONS::fgOPTIONS() : tris_or_culled(0), // Time options - time_offset(0) + time_offset(0), + + network_olk(false) { + aircraft_dir=""; // Initialize the Aircraft directory to "" (UIUC) + // set initial values/defaults time_offset_type=FG_TIME_SYS_OFFSET; char* envp = ::getenv( "FG_ROOT" ); @@ -655,6 +661,8 @@ int fgOPTIONS::parse_option( const string& arg ) { flight_model = parse_fdm( arg.substr(6) ); } else if ( arg.find( "--aircraft=" ) != string::npos ) { aircraft = arg.substr(11); + } else if ( arg.find( "--aircraft-dir=" ) != string::npos ) { + aircraft_dir = arg.substr(15); // (UIUC) } else if ( arg.find( "--model-hz=" ) != string::npos ) { model_hz = atoi( arg.substr(11) ); } else if ( arg.find( "--speed=" ) != string::npos ) { @@ -762,6 +770,10 @@ int fgOPTIONS::parse_option( const string& arg ) { } else if ( arg.find( "--rul=" ) != string::npos ) { parse_channel( "rul", arg.substr(6) ); #ifdef FG_NETWORK_OLK + } else if ( arg == "--disable-network-olk" ) { + network_olk = false; + } else if ( arg== "--enable-network-olk") { + network_olk = true; } else if ( arg == "--net-hud" ) { net_hud_display = 1; } else if ( arg.find( "--net-id=") != string::npos ) { @@ -879,6 +891,10 @@ void fgOPTIONS::usage ( void ) { << endl; cout << "\t--speed=n: run the FDM this much faster than real time" << endl; cout << endl; + //(UIUC) + cout <<"Aircraft model directory" << endl; + cout <<"\t--aircraft-dir= path is relative to the path of the executable" << endl; + cout << endl; cout << "Initial Position and Orientation:" << endl; cout << "\t--airport-id=ABCD: specify starting postion by airport id"