]> git.mxchange.org Git - flightgear.git/commitdiff
Stuart BUCHANAN:
authormfranz <mfranz>
Wed, 17 Dec 2008 19:51:18 +0000 (19:51 +0000)
committermfranz <mfranz>
Wed, 17 Dec 2008 19:51:18 +0000 (19:51 +0000)
"fixes the issue reported by Martin where
--prop:/environment/weather-scenario=METAR had no effect"

src/Environment/environment_ctrl.cxx
src/Environment/fgclouds.cxx

index bbc3887641cf64d72ececdc36bdd67339ce4a343..d3533e60e48f173954744c79c9f1aa4655bc3bc9 100644 (file)
@@ -606,6 +606,9 @@ FGMetarEnvironmentCtrl::update_env_config ()
             strncat(s, "/span-m", 128);
             fgSetDouble(s, 40000.0);
         }
+
+        // Force an update of the 3D clouds
+        fgSetDouble("/environment/rebuild-layers", 1.0);
     }
 
     fgSetupWind(dir_from, dir_to, speed, gust);
index 9928b27514d63553287ed6029af4a60c08b7b979..5d172348d64dbc1a083d2b0da60c2152a2e7b013 100644 (file)
@@ -52,12 +52,11 @@ FGClouds::FGClouds(FGEnvironmentCtrl * controller) :
        _controller( controller ),
        snd_lightning(NULL),
         rebuild_required(true),
-    last_scenario( "none" ),
+    last_scenario( "unset" ),
     last_env_config( new SGPropertyNode() ),
     last_env_clouds( new SGPropertyNode() )
 {
        update_event = 0;
-       fgSetString("/environment/weather-scenario", last_scenario.c_str());
 }
 FGClouds::~FGClouds() {
 }
@@ -506,6 +505,7 @@ void FGClouds::build() {
                 
         if( scenario == "METAR" ) {
             string realMetar = fgGetString("/environment/metar/real-metar", "");
+
             if( realMetar != "" ) {
                 fgSetString("/environment/metar/last-metar", realMetar.c_str());
                 FGMetar *m = new FGMetar( realMetar );