]> git.mxchange.org Git - flightgear.git/commitdiff
Patches from Cameron Moore to fix setting cloud altitude from
authordavid <david>
Wed, 16 Jan 2002 16:56:49 +0000 (16:56 +0000)
committerdavid <david>
Wed, 16 Jan 2002 16:56:49 +0000 (16:56 +0000)
properties or the command line.

src/Main/main.cxx
src/Main/options.cxx

index 9584e8c95dfdf48eba16f09a7aa3230c196c2740..4f613cd0648f6968ab179a618afbffa6c23a5435 100644 (file)
@@ -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 );
index 9d7da0769f50d9d294572fa930e30db2649002e0..ff7660b1db8da71a3482560e2fe063bb655fdff1 100644 (file)
@@ -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" ) {