Revised patch, eliminating distance component.
Best,
Jim
Index: src/Scenery/tileentry.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Scenery/tileentry.cxx,v
retrieving revision 1.10
diff -u -r1.10 tileentry.cxx
--- src/Scenery/tileentry.cxx 29 Oct 2002 19:44:04 -0000 1.10
+++ src/Scenery/tileentry.cxx 30 Oct 2002 21:59:14 -0000
@@ -892,7 +892,8 @@
agl = globals->get_current_view()->getAltitudeASL_ft()
* SG_FEET_TO_METER - globals->get_scenery()->get_cur_elev()
- 30.0;
- if ( agl < 30.0 ) {
+ // make sure we're at or above 0 so we don't burry the lights
+ if ( agl < 0 ) {
agl = 0.0;
}
@@ -901,18 +902,21 @@
// is what we want to calculate the distance of
sgVec3 to;
sgCopyVec3( to, sgTrans );
- double dist = sgLengthVec3( to );
-
- if ( general.get_glDepthBits() > 16 ) {
- sgScaleVec3( lift_vec, 0.0 + agl / 500.0 + dist / 10000 );
- } else {
- sgScaleVec3( lift_vec, 1.0 + agl / 20.0 + dist / 5000 );
- }
sgVec3 lt_trans;
sgCopyVec3( lt_trans, sgTrans );
- sgAddVec3( lt_trans, lift_vec );
+ // skip this step if both the agl is < 1
+ // see above where the values are fudged down to allow correct display
+ // when aircraft is "at" the airport.
+ if ( agl > 1) {
+ if ( general.get_glDepthBits() > 16 ) {
+ sgScaleVec3( lift_vec, 0.0 + agl / 500.0 );
+ } else {
+ sgScaleVec3( lift_vec, 1.0 + agl / 20.0 );
+ }
+ sgAddVec3( lt_trans, lift_vec );
+ }
rwy_lights_transform->setTransform( lt_trans );
// select which set of lights based on sun angle
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel