]> git.mxchange.org Git - flightgear.git/commitdiff
Turn the runway lights on during the day when visibility is less than
authordavid <david>
Fri, 4 Oct 2002 00:23:40 +0000 (00:23 +0000)
committerdavid <david>
Fri, 4 Oct 2002 00:23:40 +0000 (00:23 +0000)
5000m (about 3SM).

src/Objects/obj.cxx

index 0ecf55d759661254a0ad7b9669cd2698bf46bfea..8abd10ce02b5092fb378113b669105876c808b72 100644 (file)
@@ -78,7 +78,8 @@ runway_lights_predraw (ssgEntity * e)
 {
                                 // Turn on lights only at night
     float sun_angle = cur_light_params.sun_angle * SGD_RADIANS_TO_DEGREES;
-    return int(sun_angle > 90.0);
+    return int((sun_angle > 90.0) ||
+               (fgGetDouble("/environment/visibility-m") < 5000.0));
 }