From b2772edbce2b9f420fbd4c9a57e3a9f3af978a97 Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Wed, 25 May 2016 10:30:34 +0200 Subject: [PATCH] Prevent rf2 from becoming inf --- src/Time/light.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Time/light.cxx b/src/Time/light.cxx index 8600372ce..e31e4ad1d 100644 --- a/src/Time/light.cxx +++ b/src/Time/light.cxx @@ -358,8 +358,8 @@ void FGLight::update_adj_fog_color () { float avf = 0.87 - (45000 - av) / 83333.33; float sif = 0.5 - cos(_sun_angle*2)/2; - if (sif < 1e-4) - sif = 1e-4; + if (sif < 1e-3) + sif = 1e-3; // determine horizontal angle between current view direction and sun // since _sun_rotation is relative to South, and heading is in the local frame -- 2.39.5