]> git.mxchange.org Git - flightgear.git/commitdiff
Expose waypoint heading/course to Nasal.
authorJames Turner <zakalawe@mac.com>
Sun, 21 Dec 2014 06:53:32 +0000 (09:53 +0300)
committerJames Turner <zakalawe@mac.com>
Sun, 21 Dec 2014 06:53:32 +0000 (09:53 +0300)
src/Scripting/NasalPositioned.cxx

index 9d1260bd36cb21c85776e828f73eb6889a7540cd..b8e4e62dfca145bac0dd37b36db4790e11bbe05a 100644 (file)
@@ -443,6 +443,8 @@ static const char* waypointCommonGetMember(naContext c, Waypt* wpt, const char*
     } else {
       *out = stringToNasal(c, wpt->flag(WPT_OVERFLIGHT) ? "flyOver" : "flyBy");
     }
+  } else if (!strcmp(fieldName, "heading_course")) {
+      *out = naNum(wpt->headingRadialDeg());
   } else {
     return NULL; // member not found
   }