1
0
Fork 0

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.
This commit is contained in:
ehofman 2004-03-20 22:42:41 +00:00
parent 52cb1190d0
commit cf96deac29

View 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);
}
}