]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scripting/NasalSys.cxx
Expose position along the flight-path to Nasal.
[flightgear.git] / src / Scripting / NasalSys.cxx
index 9bb1966e78fd6d44059b464cb1ed014f740336e2..aee1dc54d94e4b556f81d4c14fead7fa8a2d0be8 100644 (file)
@@ -225,7 +225,7 @@ static naRef f_getprop(naContext c, naRef me, int argc, naRef* args)
     case props::DOUBLE:
         {
         double dv = p->getDoubleValue();
-        if (osg::isNaN(dv)) {
+        if (SGMisc<double>::isNaN(dv)) {
           SG_LOG(SG_NASAL, SG_ALERT, "Nasal getprop: property " << p->getPath() << " is NaN");
           return naNil();
         }
@@ -280,7 +280,7 @@ static naRef f_setprop(naContext c, naRef me, int argc, naRef* args)
             if(naIsNil(n))
                 naRuntimeError(c, "setprop() value is not string or number");
                 
-            if (osg::isNaN(n.num)) {
+            if (SGMisc<double>::isNaN(n.num)) {
                 naRuntimeError(c, "setprop() passed a NaN");
             }
             
@@ -557,8 +557,8 @@ void FGNasalSys::init()
     hashset(_globals, "__gcsave", _gcHash);
 
     initNasalPositioned(_globals, _context, _gcHash);
-    initNasalCanvas(_globals, _context, _gcHash);
     NasalClipboard::init(this);
+    initNasalCanvas(_globals, _context, _gcHash);
     initNasalCondition(_globals, _context, _gcHash);
   
     // Now load the various source files in the Nasal directory