Patches from Cameron Moore to fix setting cloud altitude from
properties or the command line.
This commit is contained in:
parent
a0cabcd2af
commit
1779e8b8bd
2 changed files with 5 additions and 3 deletions
|
@ -1631,7 +1631,9 @@ int mainLoop( int argc, char **argv ) {
|
||||||
if ( fgGetBool("/environment/clouds/status") ) {
|
if ( fgGetBool("/environment/clouds/status") ) {
|
||||||
// thesky->add_cloud_layer( 2000.0, 200.0, 50.0, 40000.0,
|
// thesky->add_cloud_layer( 2000.0, 200.0, 50.0, 40000.0,
|
||||||
// SG_CLOUD_OVERCAST );
|
// 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 );
|
SG_CLOUD_MOSTLY_CLOUDY );
|
||||||
// thesky->add_cloud_layer( 3000.0, 200.0, 50.0, 40000.0,
|
// thesky->add_cloud_layer( 3000.0, 200.0, 50.0, 40000.0,
|
||||||
// SG_CLOUD_MOSTLY_SUNNY );
|
// SG_CLOUD_MOSTLY_SUNNY );
|
||||||
|
|
|
@ -687,10 +687,10 @@ parse_option (const string& arg)
|
||||||
// FIXME: check units
|
// FIXME: check units
|
||||||
if ( fgGetString("/sim/startup/units") == "feet" )
|
if ( fgGetString("/sim/startup/units") == "feet" )
|
||||||
fgSetDouble("/environment/clouds/altitude-ft",
|
fgSetDouble("/environment/clouds/altitude-ft",
|
||||||
atof(arg.substr(13)) * SG_FEET_TO_METER);
|
atof(arg.substr(13)));
|
||||||
else
|
else
|
||||||
fgSetDouble("/environment/clouds/altitude-ft",
|
fgSetDouble("/environment/clouds/altitude-ft",
|
||||||
atof(arg.substr(13)));
|
atof(arg.substr(13)) * SG_METER_TO_FEET);
|
||||||
} else if ( arg.find( "--fov=" ) == 0 ) {
|
} else if ( arg.find( "--fov=" ) == 0 ) {
|
||||||
parse_fov( arg.substr(6) );
|
parse_fov( arg.substr(6) );
|
||||||
} else if ( arg == "--disable-fullscreen" ) {
|
} else if ( arg == "--disable-fullscreen" ) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue