]> git.mxchange.org Git - flightgear.git/commitdiff
add a sanity check for the overcast property
authorErik Hofman <erik@ehofman.com>
Sun, 5 Jun 2011 08:26:55 +0000 (10:26 +0200)
committerErik Hofman <erik@ehofman.com>
Sun, 5 Jun 2011 08:26:55 +0000 (10:26 +0200)
src/Time/light.cxx

index 19b996153102b9e3159bb392b23b64d74c17d3b1..042919aee4d26bc754d5e88a01d428c2c4c696be 100644 (file)
@@ -237,6 +237,8 @@ void FGLight::update_sky_color () {
     else if (_saturation > 1.0) _saturation = 1.0;
     if (_scattering < 0.0) _scattering = 0.0;
     else if (_scattering > 1.0) _scattering = 1.0;
+    if (_overcast < 0.0) _overcast = 0.0;
+    else if (_overcast > 1.0) _overcast = 1.0;
 
     float ambient = _ambient_tbl->interpolate( deg ) + visibility_inv/10;
     float diffuse = _diffuse_tbl->interpolate( deg );