]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/tgdb/TileCache.cxx
Make sure the boundingvolumes for the btg files are as high as possible
[simgear.git] / simgear / scene / tgdb / TileCache.cxx
index 9004f706353982465db8178769792ea1b38cb34a..106dd054bf7ea36126c2fcf12d5153789c6ed17e 100644 (file)
 //
 // $Id$
 
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
+
 #include <simgear/bucket/newbucket.hxx>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include "TileEntry.hxx"
 #include "TileCache.hxx"
 
-SG_USING_NAMESPACE(std);
-
 using simgear::TileEntry;
 using simgear::TileCache;
 
 TileCache::TileCache( void ) :
-    max_cache_size(100)
+    max_cache_size(100), current_time(0.0)
 {
     tile_cache.clear();
 }
@@ -165,6 +167,7 @@ bool TileCache::insert_tile( TileEntry *e ) {
     // register tile in the cache
     long tile_index = e->get_tile_bucket().gen_index();
     tile_cache[tile_index] = e;
+    e->set_timestamp(current_time);
 
     return true;
 }