]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/renderer.cxx
Merge commit 'refs/merge-requests/7' of git://gitorious.org/fg/flightgear into topics...
[flightgear.git] / src / Main / renderer.cxx
index 05c1032a1da439663846001232433777ae0057f0..0cb00c5ab63d8228368f513d0f60cf3d62011812 100644 (file)
@@ -57,7 +57,6 @@
 #include <osgDB/WriteFile>
 
 #include <simgear/math/SGMath.hxx>
-#include <simgear/screen/extensions.hxx>
 #include <simgear/scene/material/matlib.hxx>
 #include <simgear/scene/model/animation.hxx>
 #include <simgear/scene/model/placement.hxx>
@@ -94,7 +93,6 @@
 #include <Instrumentation/HUD/HUD.hxx>
 #include <Environment/precipitation_mgr.hxx>
 
-#include <Include/general.hxx>
 #include "splash.hxx"
 #include "renderer.hxx"
 #include "main.hxx"
@@ -564,16 +562,12 @@ FGRenderer::init( void )
 // Update all Visuals (redraws anything graphics related)
 void
 FGRenderer::update( bool refresh_camera_settings ) {
-    bool scenery_loaded = fgGetBool("sim/sceneryloaded")
+    bool scenery_loaded = fgGetBool("sim/sceneryloaded", false)
                           || fgGetBool("sim/sceneryloaded-override");
     osgViewer::Viewer* viewer = globals->get_renderer()->getViewer();
-    if ( idle_state < 1000 || !scenery_loaded ) {
-        fgSetDouble("/sim/startup/splash-alpha", 1.0);
-
-        // Keep resetting sim time while the sim is initializing
-        // the splash screen is now in the scenegraph
-        globals->set_sim_time_sec( 0.0 );
-        return;
+    if (!scenery_loaded) {
+      fgSetDouble("/sim/startup/splash-alpha", 1.0);
+      return;
     }
 
     // Fade out the splash screen over the first three seconds.
@@ -630,9 +624,7 @@ FGRenderer::update( bool refresh_camera_settings ) {
     thesky->set_visibility(visibility_meters);
 
     double altitude_m = fgGetDouble("/position/altitude-ft") * SG_FEET_TO_METER;
-    thesky->modify_vis( altitude_m,
-                        ( global_multi_loop * fgGetInt("/sim/speed-up") )
-                        / (double)fgGetInt("/sim/model-hz") );
+    thesky->modify_vis( altitude_m, 0.0 /* time factor, now unused */);
 
     // update the sky dome
     if ( skyblend ) {
@@ -674,7 +666,8 @@ FGRenderer::update( bool refresh_camera_settings ) {
         scolor.cloud_color = SGVec3f(l->cloud_color().data());
         scolor.sun_angle   = l->get_sun_angle();
         scolor.moon_angle  = l->get_moon_angle();
-
+  
+        double delta_time_sec = fgGetDouble("/sim/time/delta-sec");
         thesky->reposition( sstate, *globals->get_ephem(), delta_time_sec );
         thesky->repaint( scolor, *globals->get_ephem() );