X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fmain.cxx;h=419614ed303a4fff1afd412bb1d99adbe61cdcf4;hb=a4d27fe7bc81a3c5acca18b76d4f10406b74f8a3;hp=0cddd59dc531156b758b561d04e21761d734cf34;hpb=1c000fef961926b99eb15d421474a49ccbd83d94;p=flightgear.git diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 0cddd59dc..419614ed3 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -81,6 +81,7 @@ #include #include +#include #include #ifdef FG_NETWORK_OLK #include @@ -377,7 +378,8 @@ void fgRenderFrame( void ) { cur_fdm_state->get_Psi() * RAD_TO_DEG, wup ); sgVec3 npo; // new pilot offset after rotation - sgXformVec3( po, po, pilot_view->get_UP() ); + sgVec3 *pPO = PilotOffsetGet(); + sgXformVec3( po, *pPO, pilot_view->get_UP() ); sgXformVec3( npo, po, CXFM ); chase_view->set_geod_view_pos( cur_fdm_state->get_Longitude(), @@ -480,7 +482,6 @@ void fgRenderFrame( void ) { #endif thesky->modify_vis( cur_fdm_state->get_Altitude() * FEET_TO_METER, - ( global_multi_loop * fgGetInt("/sim/speed-up") ) / (double)fgGetInt("/sim/model-hz") ); @@ -682,8 +683,10 @@ void fgRenderFrame( void ) { // position tile nodes and update range selectors global_tile_mgr.prep_ssg_nodes(); - // draw the sky backdrop - thesky->preDraw(); + if ( fgGetBool("/sim/rendering/skyblend") ) { + // draw the sky backdrop + thesky->preDraw(); + } // draw the ssg scene glEnable( GL_DEPTH_TEST ); @@ -697,8 +700,10 @@ void fgRenderFrame( void ) { ssgCullAndDraw( lighting ); - // draw the sky cloud layers - thesky->postDraw( cur_fdm_state->get_Altitude() * FEET_TO_METER ); + if ( fgGetBool("/sim/rendering/skyblend") ) { + // draw the sky cloud layers + thesky->postDraw( cur_fdm_state->get_Altitude() * FEET_TO_METER ); + } // display HUD && Panel glDisable( GL_FOG ); @@ -769,12 +774,12 @@ void fgUpdateTimeDepCalcs() { } // cout << "multi_loop = " << multi_loop << endl; - for ( i = 0; i < multi_loop; ++i ) { + for ( i = 0; i < multi_loop * fgGetInt("/sim/speed-up"); ++i ) { // run Autopilot system current_autopilot->run(); - // update autopiot - cur_fdm_state->update( 1 * fgGetInt("/sim/speed-up") ); + // update autopilot + cur_fdm_state->update( 1 ); } FGSteam::update( multi_loop * fgGetInt("/sim/speed-up") ); } else { @@ -1408,6 +1413,9 @@ int main( int argc, char **argv ) { FGViewerLookAt *chase = new FGViewerLookAt; globals->get_viewmgr()->add_view( chase ); + string_list *col = new string_list; + globals->set_channel_options_list( col ); + // set current view to 0 (first) which is our main pilot view globals->set_current_view( globals->get_viewmgr()->get_view( 0 ) );