]> git.mxchange.org Git - flightgear.git/commitdiff
Fixes #397: YASim aircraft start at >32000ft instead of runway
authorMathias Froehlich <Mathias.Froehlich@web.de>
Mon, 8 Aug 2011 17:12:14 +0000 (19:12 +0200)
committerMathias Froehlich <Mathias.Froehlich@web.de>
Mon, 8 Aug 2011 17:12:14 +0000 (19:12 +0200)
The usual 'modify code before checkin but past testing' Problem.
Return the elevation of the intersection result instead of the
elevation of the querys start point.

src/Scenery/scenery.cxx

index ebf36ae28c357418a023d0092e872ff0b3e7c7a0..12c3ebb69029e40fa8d99f2dfecddbddbe568b8b 100644 (file)
@@ -285,7 +285,7 @@ FGScenery::get_elevation_m(const SGGeod& geod, double& alt,
       return false;
 
   geodEnd = SGGeod::fromCart(intersectVisitor.getLineSegment().getEnd());
-  alt = geod.getElevationM();
+  alt = geodEnd.getElevationM();
   if (material)
       *material = intersectVisitor.getMaterial();