]> git.mxchange.org Git - flightgear.git/commitdiff
Frederic Bouvier:
authorehofman <ehofman>
Sat, 20 Mar 2004 22:42:41 +0000 (22:42 +0000)
committerehofman <ehofman>
Sat, 20 Mar 2004 22:42:41 +0000 (22:42 +0000)
The message 'Alert: catching up on tile delete queue'
comes from the fact that 48 tiles are scheduled and
added to the cache at startup before the plane location
is initialized. My proposed patch is to initialize
SGLocation with an invalid position and detect this
fact before scheduling tiles. I prefer to do that
rather than testing for lon and lat being 0,0 because
it is a valid position and someone could want to fly
near Accra.

src/Scenery/tilemgr.cxx

index 425831c9df45f698c554bc349baa119fdcc86efa..d05947fd492eaf309f7750b404f7875ddd1767f9 100644 (file)
@@ -412,7 +412,7 @@ int FGTileMgr::update( SGLocation *location, double visibility_meters,
         }
     } else if ( state == Start || state == Inited ) {
         SG_LOG( SG_TERRAIN, SG_INFO, "State == Start || Inited" );
-        initialize_queue();
+//        initialize_queue();
         state = Running;
 
         // load the next tile in the load queue (or authorize the next
@@ -437,7 +437,11 @@ void FGTileMgr::refresh_view_timestamps() {
     SG_LOG( SG_TERRAIN, SG_INFO,
             "Refreshing timestamps for " << current_bucket.get_center_lon()
             << " " << current_bucket.get_center_lat() );
-    schedule_needed(fgGetDouble("/environment/visibility-m"), current_bucket);
+    if ( longitude >= -180.0 && longitude <= 180.0 
+         && latitude >= -90.0 && latitude <= 90.0 )
+    {
+        schedule_needed(fgGetDouble("/environment/visibility-m"), current_bucket);
+    }
 }