From cf96deac296de0f5557b0f6dcee40f87d8689c84 Mon Sep 17 00:00:00 2001 From: ehofman Date: Sat, 20 Mar 2004 22:42:41 +0000 Subject: [PATCH] Frederic Bouvier: 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Scenery/tilemgr.cxx b/src/Scenery/tilemgr.cxx index 425831c9d..d05947fd4 100644 --- a/src/Scenery/tilemgr.cxx +++ b/src/Scenery/tilemgr.cxx @@ -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); + } } -- 2.39.5