1
0
Fork 0

schedule tiles in Inited state if we get a valid bucket

This commit is contained in:
timoore 2007-12-14 22:52:31 +00:00
parent 17b321c44f
commit 7cb5fd170a

View file

@ -338,7 +338,7 @@ int FGTileMgr::update( SGLocation *location, double visibility_meters )
// Note that we need keep track of both viewer buckets and fdm buckets. // Note that we need keep track of both viewer buckets and fdm buckets.
if ( state == Running ) { if ( state == Running ) {
SG_LOG( SG_TERRAIN, SG_DEBUG, "State == Running" ); SG_LOG( SG_TERRAIN, SG_DEBUG, "State == Running" );
if (!(current_bucket == previous_bucket )) { if (current_bucket != previous_bucket) {
// We've moved to a new bucket, we need to schedule any // We've moved to a new bucket, we need to schedule any
// needed tiles for loading. // needed tiles for loading.
SG_LOG( SG_TERRAIN, SG_INFO, "FGTileMgr::update()" ); SG_LOG( SG_TERRAIN, SG_INFO, "FGTileMgr::update()" );
@ -348,6 +348,11 @@ int FGTileMgr::update( SGLocation *location, double visibility_meters )
SG_LOG( SG_TERRAIN, SG_INFO, "State == Start || Inited" ); SG_LOG( SG_TERRAIN, SG_INFO, "State == Start || Inited" );
// initialize_queue(); // initialize_queue();
state = Running; state = Running;
if (current_bucket != previous_bucket
&& current_bucket.get_chunk_lon() != -1000) {
SG_LOG( SG_TERRAIN, SG_INFO, "FGTileMgr::update()" );
schedule_needed(visibility_meters, current_bucket);
}
} }
update_queues(); update_queues();