From: Erik Hofman Date: Sun, 5 Jun 2011 08:26:55 +0000 (+0200) Subject: add a sanity check for the overcast property X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=afca14c3724811972fc888d8b7f3acba618ff8e1;p=flightgear.git add a sanity check for the overcast property --- diff --git a/src/Time/light.cxx b/src/Time/light.cxx index 19b996153..042919aee 100644 --- a/src/Time/light.cxx +++ b/src/Time/light.cxx @@ -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 );