]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scripting/nasal-props.cxx
Expose SGCondition as a ghost to Nasal directly.
[flightgear.git] / src / Scripting / nasal-props.cxx
index 78a2428778aa67fff42d18cda3c621e5b0e784a9..1df4b0d42b93741296eb0229dafb18166b102d1a 100644 (file)
@@ -45,6 +45,15 @@ naRef FGNasalSys::propNodeGhost(SGPropertyNode* handle)
     return propNodeGhostCreate(_context, handle);
 }
 
+SGPropertyNode* ghostToPropNode(naRef ref)
+{
+  if (!naIsGhost(ref) || (naGhost_type(ref) != &PropNodeGhostType))
+    return NULL;
+  
+  SGPropertyNode_ptr* pp = (SGPropertyNode_ptr*) naGhost_ptr(ref);
+  return pp->ptr();
+}
+
 #define NASTR(s) s ? naStr_fromdata(naNewString(c),(char*)(s),strlen(s)) : naNil()
 
 //