Showing 1 changed files with 14 additions and 2 deletions
+14 -2
flightgear/fgfs_function
... ...
@@ -641,11 +641,23 @@ EOH
641 641
                         echo "can't find requested addon in $addon_path or $FGADDON/$addon_path !"
642 642
                     fi
643 643
                     ;;
644
-                --ws3)
645
-                    echo 80 utilise World Scenery 3.0 > /dev/null
644
+                --ws3|--ws3=.*)
645
+                    echo 80 "utilise World Scenery 3.0 (chemin par défaut $FGADDON/WS3.0)" > /dev/null
646
+                    fgfs_args=("${(@)fgfs_args:#--terrasync-dir=$HOME/.fgfs/TerraSync}")
647
+                    fgfs_args=("${(@)fgfs_args:#--enable-terrasync}")
648
+
649
+                    if test "${fgfs_arg#*=}" = "$fgfs_arg"; then
650
+                        fgfs_args+=("--fg-scenery=$FGADDON/WS3.0")
651
+                    elif test -d "${fgfs_arg#*=}/vpb"; then
652
+                        fgfs_args+=("--fg-scenery='${fgfs_arg#*=}'")
653
+                    else
654
+                        echo "${fgfs_arg#*=} isn't a valid WS3 directory"
655
+                        return 1
656
+                    fi
646 657
                     fgfs_args+=("--prop:bool:/scenery/use-vpb=true")
647 658
                     fgfs_args+=("--prop:int:/sim/rendering/max-paged-lod=300")
648 659
                     fgfs_args+=("--prop:double:/sim/rendering/plod-minimum-expiry-time-secs=30")
660
+                    fgfs_args+=("--prop:int:/sim/rendering/database-pager/threads=8")
649 661
                     ;;
650 662
                 --ortho)
651 663
                     echo 81 utilise Orthoscenery > /dev/null