]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/newcache.cxx
Major viewer-code overhaul from Jim Wilson:
[flightgear.git] / src / Scenery / newcache.cxx
index aca6fe0a042621d419a992b11f9b2ad59daf318c..4968b08e0fed26da8cf2370edb0bbc8404f85d80 100644 (file)
@@ -133,7 +133,7 @@ bool FGNewCache::make_space() {
            if ( e->is_loaded() && (e->get_pending_models() == 0) ) {
                // calculate approximate distance from view point
                sgdCopyVec3( abs_view_pos,
-                            globals->get_current_view()->get_abs_view_pos() );
+                            globals->get_current_view()->get_absolute_view_pos() );
 
                SG_LOG( SG_TERRAIN, SG_DEBUG, "DIST Abs view pos = " 
                        << abs_view_pos[0] << ","
@@ -183,7 +183,7 @@ bool FGNewCache::make_space() {
 // Clear all completely loaded tiles (ignores partially loaded tiles)
 void FGNewCache::clear_cache() {
     // This is a hack that should really get cleaned up at some point
-    extern ssgBranch *terrain;
+    extern ssgBranch *terrain_branch;
 
     tile_map_iterator current = tile_cache.begin();
     tile_map_iterator end = tile_cache.end();
@@ -199,7 +199,7 @@ void FGNewCache::clear_cache() {
     }
 
     // and ... just in case we missed something ... 
-    terrain->removeAllKids();
+    terrain_branch->removeAllKids();
 }
 
 
@@ -220,3 +220,4 @@ bool FGNewCache::insert_tile( FGTileEntry *e ) {
         return false;
     }
 }
+