]> git.mxchange.org Git - flightgear.git/commitdiff
Pass the install dir to Terrasync.
authorJames Turner <zakalawe@mac.com>
Thu, 18 Aug 2016 15:23:39 +0000 (16:23 +0100)
committerRoland Haeder <roland@mxchange.org>
Thu, 22 Sep 2016 21:27:49 +0000 (23:27 +0200)
With Simgear commit d7d59b08a2f1a77a4247ec1a89d6ff48ed73f5c7, this
allows terrasync to be initialised from files in the install data,
which avoids downloading them again.

src/Main/main.cxx

index b001a2d6400012546782d2011379db6bac5e85db..9e658617d3d5e79608d5378628324598d9b901f6 100644 (file)
@@ -147,7 +147,11 @@ static void initTerrasync()
     }
     
     fgSetString("/sim/terrasync/cache-path", tsyncCache.utf8Str());
-    
+
+    // make fg-root dir available so existing Scenery data can be copied, and
+    // hence not downloaded again.
+    fgSetString("/sim/terrasync/installation-dir", (globals->get_fg_root() / "Scenery").utf8Str());
+
     simgear::SGTerraSync* terra_sync = new simgear::SGTerraSync();
     terra_sync->setRoot(globals->get_props());
     globals->add_subsystem("terrasync", terra_sync);