From 1779e8b8bda59583486cbe26874c4a4600c12daf Mon Sep 17 00:00:00 2001 From: david Date: Wed, 16 Jan 2002 16:56:49 +0000 Subject: [PATCH] Patches from Cameron Moore to fix setting cloud altitude from properties or the command line. --- src/Main/main.cxx | 4 +++- src/Main/options.cxx | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 9584e8c95..4f613cd06 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -1631,7 +1631,9 @@ int mainLoop( int argc, char **argv ) { if ( fgGetBool("/environment/clouds/status") ) { // thesky->add_cloud_layer( 2000.0, 200.0, 50.0, 40000.0, // SG_CLOUD_OVERCAST ); - thesky->add_cloud_layer( 2600.0, 200.0, 50.0, 40000.0, + thesky->add_cloud_layer( fgGetDouble("/environment/clouds/altitude-ft") * + SG_FEET_TO_METER, + 200.0, 50.0, 40000.0, SG_CLOUD_MOSTLY_CLOUDY ); // thesky->add_cloud_layer( 3000.0, 200.0, 50.0, 40000.0, // SG_CLOUD_MOSTLY_SUNNY ); diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 9d7da0769..ff7660b1d 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -687,10 +687,10 @@ parse_option (const string& arg) // FIXME: check units if ( fgGetString("/sim/startup/units") == "feet" ) fgSetDouble("/environment/clouds/altitude-ft", - atof(arg.substr(13)) * SG_FEET_TO_METER); + atof(arg.substr(13))); else fgSetDouble("/environment/clouds/altitude-ft", - atof(arg.substr(13))); + atof(arg.substr(13)) * SG_METER_TO_FEET); } else if ( arg.find( "--fov=" ) == 0 ) { parse_fov( arg.substr(6) ); } else if ( arg == "--disable-fullscreen" ) {