1
0
Fork 0

Stuart BUCHANAN:

"fixes the issue reported by Martin where
--prop:/environment/weather-scenario=METAR had no effect"
This commit is contained in:
mfranz 2008-12-17 19:51:18 +00:00
parent 35f973ece1
commit 084ba158b7
2 changed files with 5 additions and 2 deletions

View file

@ -606,6 +606,9 @@ FGMetarEnvironmentCtrl::update_env_config ()
strncat(s, "/span-m", 128); strncat(s, "/span-m", 128);
fgSetDouble(s, 40000.0); fgSetDouble(s, 40000.0);
} }
// Force an update of the 3D clouds
fgSetDouble("/environment/rebuild-layers", 1.0);
} }
fgSetupWind(dir_from, dir_to, speed, gust); fgSetupWind(dir_from, dir_to, speed, gust);

View file

@ -52,12 +52,11 @@ FGClouds::FGClouds(FGEnvironmentCtrl * controller) :
_controller( controller ), _controller( controller ),
snd_lightning(NULL), snd_lightning(NULL),
rebuild_required(true), rebuild_required(true),
last_scenario( "none" ), last_scenario( "unset" ),
last_env_config( new SGPropertyNode() ), last_env_config( new SGPropertyNode() ),
last_env_clouds( new SGPropertyNode() ) last_env_clouds( new SGPropertyNode() )
{ {
update_event = 0; update_event = 0;
fgSetString("/environment/weather-scenario", last_scenario.c_str());
} }
FGClouds::~FGClouds() { FGClouds::~FGClouds() {
} }
@ -506,6 +505,7 @@ void FGClouds::build() {
if( scenario == "METAR" ) { if( scenario == "METAR" ) {
string realMetar = fgGetString("/environment/metar/real-metar", ""); string realMetar = fgGetString("/environment/metar/real-metar", "");
if( realMetar != "" ) { if( realMetar != "" ) {
fgSetString("/environment/metar/last-metar", realMetar.c_str()); fgSetString("/environment/metar/last-metar", realMetar.c_str());
FGMetar *m = new FGMetar( realMetar ); FGMetar *m = new FGMetar( realMetar );