X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fmain.cxx;h=07c10598aa11bb8488658390feca43de41212c85;hb=93c6d15e194370c67b4d91ef58492002b78049b5;hp=4ffb1cd031c4326e7da69fb01f3d3c582af23e1f;hpb=85be9be1e05c76a2d5fde5086a4122f79529e015;p=flightgear.git diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 4ffb1cd03..07c10598a 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -342,19 +342,26 @@ static void fgMainLoop( void ) { // implementation is an AI model and depends on that globals->get_multiplayer_mgr()->Update(); +#if ENABLE_ATCDCL // Run ATC subsystem if (fgGetBool("/sim/atc/enabled")) globals->get_ATC_mgr()->update(delta_time_sec); + // Run the AI subsystem - // FIXME: run that also if we have multiplaying enabled since the - // multiplayer information is interpreted by an AI model + // NOTE: the AI_mgr has nothing to do with the AIModels subsystem. + // There was previously a comment here stating that the + // AI_mgr code should be run then multiplayer is enabled. + // Multiplayer relies on AIModels, and not on the old and + // depricated AI_mgr system. So, we can safely skip the following + // two lines at compile time when compiling with --disable-atcdcl if (fgGetBool("/sim/ai-traffic/enabled")) globals->get_AI_mgr()->update(delta_time_sec); - - globals->get_aircraft_model()->update(delta_time_sec); +#endif + globals->get_subsystem_mgr()->update(delta_time_sec); - + globals->get_aircraft_model()->update(delta_time_sec); + // // Tile Manager updates - see if we need to load any new scenery tiles. // this code ties together the fdm, viewer and scenery classes... @@ -420,7 +427,7 @@ static void fgMainLoop( void ) { // END Tile Manager udpates if (!scenery_loaded && globals->get_tile_mgr()->isSceneryLoaded() - && fgGetBool("sim/signals/fdm-initialized")) { + && fgGetBool("sim/fdm-initialized")) { fgSetBool("sim/sceneryloaded",true); if (fgGetBool("/sim/sound/working")) { globals->get_soundmgr()->activate(); @@ -528,8 +535,7 @@ static void fgIdleFunction ( void ) { } else if ( idle_state == 2 ) { idle_state++; - // Read the list of available aircraft - fgReadAircraft(); + fgSplashProgress("reading airport & navigation data"); @@ -617,6 +623,7 @@ static void fgIdleFunction ( void ) { Ephemeris* eph = new Ephemeris; globals->add_subsystem("ephmeris", eph); eph->init(); // FIXME - remove this once SGSky code below is also a subsystem + eph->bind(); // TODO: move to environment mgr thesky = new SGSky; @@ -717,7 +724,6 @@ static void fgIdleFunction ( void ) { // setup OpenGL view parameters globals->get_renderer()->init(); - SG_LOG( SG_GENERAL, SG_INFO, "Panel visible = " << fgPanelVisible() ); globals->get_renderer()->resize( fgGetInt("/sim/startup/xsize"), fgGetInt("/sim/startup/ysize") ); @@ -828,18 +834,11 @@ bool fgMainInit( int argc, char **argv ) { fgRegisterIdleHandler( &fgIdleFunction ); fgRegisterDrawHandler( &FGRenderer::update ); -#ifdef FG_ENABLE_MULTIPASS_CLOUDS - bool get_stencil_buffer = true; -#else - bool get_stencil_buffer = false; -#endif - // Initialize plib net interface netInit( &argc, argv ); // Clouds3D requires an alpha channel - // clouds may require stencil buffer - fgOSOpenWindow(get_stencil_buffer); + fgOSOpenWindow(true /* request stencil buffer */); // Initialize the splash screen right away fntInit();