]> git.mxchange.org Git - flightgear.git/commitdiff
Jim Wilson:
authorcurt <curt>
Fri, 19 Apr 2002 00:25:25 +0000 (00:25 +0000)
committercurt <curt>
Fri, 19 Apr 2002 00:25:25 +0000 (00:25 +0000)
Minor patch for flicker glitch when crossing from one tile to another.

src/Main/location.cxx
src/Main/main.cxx

index 290ec52808bc21441b3b8368ab15b9ff6a402fe2..f8c776b2d2d86b253bb9ff8ca95748374f263194 100644 (file)
@@ -244,7 +244,7 @@ FGLocation::recalcPosition (double lon_deg, double lat_deg, double alt_ft) const
   Point3D p = Point3D(lon_deg * SG_DEGREES_TO_RADIANS,
                      lat_geoc_rad,
                      sea_level_radius_m);
-  Point3D tmp = sgPolarToCart3d(p) - scenery.get_center();
+  Point3D tmp = sgPolarToCart3d(p) - scenery.get_next_center();
   sgSetVec3(_zero_elev_view_pos, tmp[0], tmp[1], tmp[2]);
 
                                // Calculate the absolute view position
@@ -259,9 +259,9 @@ FGLocation::recalcPosition (double lon_deg, double lat_deg, double alt_ft) const
                                 // aka Relative View Position
   sgdVec3 scenery_center;
   sgdSetVec3(scenery_center,
-            scenery.get_center().x(),
-            scenery.get_center().y(),
-            scenery.get_center().z());
+            scenery.get_next_center().x(),
+            scenery.get_next_center().y(),
+            scenery.get_next_center().z());
   sgdVec3 view_pos;
   sgdSubVec3(view_pos, _absolute_view_pos, scenery_center);
   sgSetVec3(_relative_view_pos, view_pos);
@@ -272,8 +272,3 @@ void
 FGLocation::update (int dt)
 {
 }
-
-
-
-
-
index 2dcc30f77d15907646df228a308cf3d48a80fb50..94909df9c1f64abf97f84c69bc7f52f6965879b8 100644 (file)
@@ -1076,11 +1076,6 @@ static void fgMainLoop( void ) {
     fgIOProcess();
 #endif
 
-    // see if we need to load any new scenery tiles
-    double visibility_meters = fgGetDouble("/environment/visibility-m");
-    global_tile_mgr.update( longitude->getDoubleValue(),
-                           latitude->getDoubleValue(), visibility_meters );
-
     // see if we need to load any deferred-load textures
     material_lib.load_next_deferred();
 
@@ -1096,6 +1091,11 @@ static void fgMainLoop( void ) {
     // redraw display
     fgRenderFrame();
 
+    // see if we need to load any new scenery tiles
+    double visibility_meters = fgGetDouble("/environment/visibility-m");
+    global_tile_mgr.update( longitude->getDoubleValue(),
+                           latitude->getDoubleValue(), visibility_meters );
+
     SG_LOG( SG_ALL, SG_DEBUG, "" );
 }