1
0
Fork 0

Set up cloud layers when thesky is allocated, to ensure that they are

created only once.
This commit is contained in:
david 2002-06-05 17:44:39 +00:00
parent 0387b3a4ec
commit 5bec60a602

View 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" );