]> git.mxchange.org Git - flightgear.git/commitdiff
A small amount of additional massaging of tile manager update() interface.
authorcurt <curt>
Sat, 30 Nov 2002 14:22:00 +0000 (14:22 +0000)
committercurt <curt>
Sat, 30 Nov 2002 14:22:00 +0000 (14:22 +0000)
src/Main/main.cxx
src/Scenery/tilemgr.cxx

index 478baf576e6fe0448ee57f845645d8247905b3c0..5a68ab140527721c6a752d8e4d56f609b21db904 100644 (file)
@@ -1213,7 +1213,7 @@ static void fgMainLoop( void ) {
                                 acmodel_location->get_absolute_view_pos(),
                                 acmodel_location->get_current_bucket(),
                                 acmodel_location->get_previous_bucket(),
-                                acmodel_location->get_tile_center()
+                                globals->get_scenery()->get_center()
                                 );
         // save results of update in FGLocation for fdm...
         if ( globals->get_scenery()->get_cur_elev() > -9990 ) {
@@ -1236,7 +1236,7 @@ static void fgMainLoop( void ) {
                             current_view->get_absolute_view_pos(),
                             current_view->getFGLocation()->get_current_bucket(),
                             current_view->getFGLocation()->get_previous_bucket(),
-                            current_view->getFGLocation()->get_tile_center()
+                            globals->get_scenery()->get_center()
                             );
     // save results of update in FGLocation for fdm...
     if ( globals->get_scenery()->get_cur_elev() > -9990 ) {
index 1babc517446dd059ed20e5e8805f2338c70aa2e4..c1e760609e65879c26e3f97b256ceb87c775973c 100644 (file)
@@ -267,20 +267,6 @@ void FGTileMgr::initialize_queue()
 }
 
 
-// given the current lon/lat (in degrees), fill in the array of local
-// chunks.  If the chunk isn't already in the cache, then read it from
-// disk.
-int FGTileMgr::update( double visibility_meters ) {
-    FGLocation *location = globals->get_current_view()->getFGLocation();
-    sgdVec3 abs_pos_vector;
-    sgdCopyVec3( abs_pos_vector,
-                 globals->get_current_view()->get_absolute_view_pos() );
-    return update( location, visibility_meters, abs_pos_vector,
-                   current_bucket, previous_bucket,
-                   globals->get_scenery()->get_center() );
-}
-
-
 /**
  * Update the various queues maintained by the tilemagr (private
  * internal function, do not call directly.)
@@ -369,9 +355,25 @@ void FGTileMgr::update_queues()
 }
 
 
+// given the current lon/lat (in degrees), fill in the array of local
+// chunks.  If the chunk isn't already in the cache, then read it from
+// disk.
+int FGTileMgr::update( double visibility_meters )
+{
+    FGLocation *location = globals->get_current_view()->getFGLocation();
+    sgdVec3 abs_pos_vector;
+    sgdCopyVec3( abs_pos_vector,
+                 globals->get_current_view()->get_absolute_view_pos() );
+    return update( location, visibility_meters, abs_pos_vector,
+                   current_bucket, previous_bucket,
+                   globals->get_scenery()->get_center() );
+}
+
+
 int FGTileMgr::update( FGLocation *location, double visibility_meters,
                        sgdVec3 abs_pos_vector, SGBucket p_current,
-                       SGBucket p_previous, Point3D center ) {
+                       SGBucket p_previous, Point3D center )
+{
     // SG_LOG( SG_TERRAIN, SG_DEBUG, "FGTileMgr::update() for "
     //         << lon << " " << lat );
 
@@ -414,12 +416,7 @@ int FGTileMgr::update( FGLocation *location, double visibility_meters,
     // no reason to update this if we haven't moved...
     if ( longitude != last_longitude || latitude != last_latitude ) {
         // update current elevation... 
-        if ( updateCurrentElevAtPos( abs_pos_vector, center )
-             )
-            /*if ( updateCurrentElevAtPos( abs_pos_vector,
-                                     globals->get_scenery()->get_next_center() )
-                                     )*/
-        {
+        if ( updateCurrentElevAtPos( abs_pos_vector, center ) ) {
             last_longitude = longitude;
             last_latitude = latitude;
         }