]> git.mxchange.org Git - simgear.git/commitdiff
Fix terrasync airport synchronization sequence
authorThorstenB <brehmt@gmail.com>
Sat, 29 Oct 2011 19:13:12 +0000 (21:13 +0200)
committerThorstenB <brehmt@gmail.com>
Sat, 29 Oct 2011 19:13:12 +0000 (21:13 +0200)
Airport A-J were skipped. Thanks to James for spotting this.
Also corrects actual sync order.

simgear/scene/tsync/terrasync.cxx

index 0f99d4e508c739aaeafa5f64362539a21c7d274e..ec2e5ca03175da63cde10391e466bde656e3eb56 100644 (file)
@@ -802,10 +802,11 @@ void SGTerraSync::setTileCache(TileCache* tile_cache)
 
 void SGTerraSync::syncAirportsModels()
 {
-    static const char bounds[] = "KZAJ";
-    for( unsigned i = 0; i < sizeof(bounds)/sizeof(bounds[0])/2; i+= 2 ) 
+    static const char* bounds = "MZAJKL"; // airport sync order: K-L, A-J, M-Z
+    // note "request" method uses LIFO order, i.e. processes most recent request first
+    for( unsigned i = 0; i < strlen(bounds)/2; i++ )
     {
-        for ( char synced_other = bounds[i]; synced_other <= bounds[i+1]; synced_other++ )
+        for ( char synced_other = bounds[2*i]; synced_other <= bounds[2*i+1]; synced_other++ )
         {
             ostringstream dir;
             dir << "Airports/" << synced_other;