From 32cb0df98e470bf83efaa16670fb3b706c2e7053 Mon Sep 17 00:00:00 2001 From: ehofman Date: Tue, 19 Aug 2003 13:06:51 +0000 Subject: [PATCH] Add support for moving cloud layers --- src/Environment/environment_mgr.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Environment/environment_mgr.cxx b/src/Environment/environment_mgr.cxx index b57fec113..48690bafe 100644 --- a/src/Environment/environment_mgr.cxx +++ b/src/Environment/environment_mgr.cxx @@ -247,8 +247,17 @@ FGEnvironmentMgr::get_cloud_layer_elevation_ft (int index) const void FGEnvironmentMgr::set_cloud_layer_elevation_ft (int index, double elevation_ft) { + FGEnvironment env = *_environment; + env.set_elevation_ft(elevation_ft); + thesky->get_cloud_layer(index) ->setElevation_m(elevation_ft * SG_FEET_TO_METER); + + thesky->get_cloud_layer(index) + ->setSpeed(env.get_wind_speed_kt() * 0.5151); // 1 kt = 0.5151 m/s + + thesky->get_cloud_layer(index) + ->setDirection(env.get_wind_from_heading_deg()); } double