From 3aa5e5fcdfab562f7e511d6c73372bbae0b963eb Mon Sep 17 00:00:00 2001
From: curt <curt>
Date: Tue, 26 Nov 2002 16:01:39 +0000
Subject: [PATCH] Don't force ground lighting to have the same limited
 visibility as runway lighting.

---
 src/Main/main.cxx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/Main/main.cxx b/src/Main/main.cxx
index ca3e7f413..19d7c934e 100644
--- a/src/Main/main.cxx
+++ b/src/Main/main.cxx
@@ -222,6 +222,7 @@ static GLfloat fog_exp_density;
 static GLfloat fog_exp2_density;
 static GLfloat rwy_exp2_punch_through;
 static GLfloat taxi_exp2_punch_through;
+static GLfloat ground_exp2_punch_through;
 
 #ifdef FG_NETWORK_OLK
 ssgSelector *fgd_sel = NULL;
@@ -467,6 +468,7 @@ void fgRenderFrame() {
 
         fog_exp_density = m_log01 / actual_visibility;
         fog_exp2_density = sqrt_m_log01 / actual_visibility;
+        ground_exp2_punch_through = sqrt_m_log01 / (actual_visibility * 1.5);
         if ( actual_visibility < 8000 ) {
             rwy_exp2_punch_through = sqrt_m_log01 / (actual_visibility * 2.5);
             taxi_exp2_punch_through = sqrt_m_log01 / (actual_visibility * 1.5);
@@ -801,6 +803,7 @@ void fgRenderFrame() {
 #endif
 
         // draw ground lighting
+	glFogf (GL_FOG_DENSITY, ground_exp2_punch_through);
 	ssgCullAndDraw( globals->get_scenery()->get_gnd_lights_root() );
 
 	if ( fgGetBool("/sim/rendering/skyblend") ) {