1
0
Fork 0

Tweak taxi light rendering so they don't look completely bogus at dusk.

This commit is contained in:
curt 2002-12-12 01:24:48 +00:00
parent f29b5d98a1
commit 5c8e6a5841
2 changed files with 10 additions and 5 deletions

View file

@ -935,14 +935,16 @@ static void fgSetDistOrAltFromGlideSlope() {
alt = fabs(od*tan(gs)) + apt_elev;
fgSetDouble("/sim/presets/altitude-ft", alt);
fgSetBool("/sim/presets/onground", false);
SG_LOG(SG_GENERAL,SG_INFO, "Calculated altitude as: " << alt << " ft");
SG_LOG( SG_GENERAL, SG_INFO, "Calculated altitude as: "
<< alt << " ft" );
} else if( fabs(gs) > 0.01 && alt > 0 && fabs(od) < 0.1) {
// set offset-distance from glideslope and altitude
od = (alt - apt_elev) / tan(gs);
od *= -1*SG_FEET_TO_METER * SG_METER_TO_NM;
fgSetDouble("/sim/presets/offset-distance", od);
SG_LOG(SG_GENERAL, SG_INFO, "Calculated offset distance as: "
<< od << " nm");
fgSetBool("/sim/presets/onground", false);
SG_LOG( SG_GENERAL, SG_INFO, "Calculated offset distance as: "
<< od << " nm" );
} else if( fabs(gs) > 0.01 ) {
SG_LOG( SG_GENERAL, SG_ALERT,
"Glideslope given but not altitude or offset-distance." );

View file

@ -767,7 +767,10 @@ void fgRenderFrame() {
ssgCullAndDraw( globals->get_scenery()->get_rwy_lights_root() );
// change punch through and then draw taxi lighting
glFogf (GL_FOG_DENSITY, taxi_exp2_punch_through);
glFogf ( GL_FOG_DENSITY, fog_exp2_density );
// sgVec3 taxi_fog;
// sgSetVec3( taxi_fog, 0.0, 0.0, 0.0 );
// glFogfv ( GL_FOG_COLOR, taxi_fog );
ssgCullAndDraw( globals->get_scenery()->get_taxi_lights_root() );
// clean up lighting
@ -1548,7 +1551,7 @@ static bool fgMainInit( int argc, char **argv ) {
cerr << endl << "Base package check failed ... " \
<< "Found version " << base_version << " at: " \
<< globals->get_fg_root() << endl;
cerr << "Please upgrade to version" << required_version << endl;
cerr << "Please upgrade to version: " << required_version << endl;
exit(-1);
}