]> git.mxchange.org Git - flightgear.git/commitdiff
Set up cloud layers when thesky is allocated, to ensure that they are
authordavid <david>
Wed, 5 Jun 2002 17:44:39 +0000 (17:44 +0000)
committerdavid <david>
Wed, 5 Jun 2002 17:44:39 +0000 (17:44 +0000)
created only once.

src/Main/main.cxx

index fc94b74d1f503bea267169a4d1c8b20d52f5548d..68c1237b4502de8d4289edc50e525836049cbd9f 100644 (file)
@@ -1548,7 +1548,16 @@ int mainLoop( int argc, char **argv ) {
                   0.0 );
     globals->set_ephem( ephem );
 
+                               // TODO: move to environment mgr
     thesky = new SGSky;
+    SGPath texture_path(globals->get_fg_root());
+    texture_path.append("Textures");
+    texture_path.append("Sky");
+    for (int i = 0; i < FGEnvironmentMgr::MAX_CLOUD_LAYERS; i++) {
+      SGCloudLayer * layer = new SGCloudLayer(texture_path.str());
+      thesky->add_cloud_layer(layer);
+    }
+
 
     SGPath sky_tex_path( globals->get_fg_root() );
     sky_tex_path.append( "Textures" );