]> git.mxchange.org Git - flightgear.git/commitdiff
Fix bug #185 - altitude ignored when adding waypoints to the route.
authorJames Turner <zakalawe@mac.com>
Wed, 1 Dec 2010 23:57:01 +0000 (23:57 +0000)
committerJames Turner <zakalawe@mac.com>
Wed, 1 Dec 2010 23:57:01 +0000 (23:57 +0000)
src/Navaids/waypoint.cxx

index 5992774b151538a1517250bc686c9c580fe56f25..12cee774463d6d0b29dc30731c1ac3b19cebc95d 100644 (file)
@@ -39,6 +39,9 @@ BasicWaypt::BasicWaypt(const SGGeod& aPos, const string& aIdent, Route* aOwner)
   _pos(aPos),
   _ident(aIdent)
 {
+  if (aPos.getElevationFt() > -999.0) {
+    setAltitude(aPos.getElevationFt(), RESTRICT_AT);
+  }
 }
 
 BasicWaypt::BasicWaypt(const SGWayPoint& aWP, Route* aOwner) :