]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_commands.cxx
Erik Hofman:
[flightgear.git] / src / Main / fg_commands.cxx
index d8677b50febaf2526cca367e1e9bb3bb93fa2f7d..e86f7f849873674e86313d0dfc9699eecf3c8c24 100644 (file)
@@ -275,6 +275,7 @@ do_view_cycle (const SGPropertyNode * arg, SGCommandState ** state)
           globals->get_props()->setBoolValue( "/sim/hud/visibility", false );
       }
   }
+  global_tile_mgr.refresh_view_timestamps();
 //   fgReshape(fgGetInt("/sim/startup/xsize"), fgGetInt("/sim/startup/ysize"));
   return true;
 }
@@ -307,8 +308,10 @@ do_tile_cache_reload (const SGPropertyNode * arg, SGCommandState ** state)
     // BusyCursor(0);
     if ( global_tile_mgr.init() ) {
        // Load the local scenery data
+        double visibility_meters = fgGetDouble("/environment/visibility-m");
        global_tile_mgr.update(fgGetDouble("/position/longitude-deg"),
-                              fgGetDouble("/position/latitude-deg"));
+                              fgGetDouble("/position/latitude-deg"),
+                              visibility_meters);
     } else {
        SG_LOG( SG_GENERAL, SG_ALERT, 
                "Error in Tile Manager initialization!" );
@@ -423,7 +426,7 @@ do_property_adjust (const SGPropertyNode * arg, SGCommandState ** state)
     if (hasStep)
       value = step->getBoolValue();
     else
-      value = amount;
+      value = (0.0 != amount);
     if (value)
       return prop->setBoolValue(!prop->getBoolValue());
     else
@@ -664,5 +667,4 @@ fgInitCommands ()
   }
 }
 
-// end of fg_commands.hxx
-
+// end of fg_commands.cxx