]> 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 44053f27915334a60b1250420e181198956631b2..aee1dc54d94e4b556f81d4c14fead7fa8a2d0be8 100644 (file)
@@ -558,17 +558,13 @@ void FGNasalSys::init()
 
     initNasalPositioned(_globals, _context, _gcHash);
     NasalClipboard::init(this);
+    initNasalCanvas(_globals, _context, _gcHash);
     initNasalCondition(_globals, _context, _gcHash);
   
     // Now load the various source files in the Nasal directory
     simgear::Dir nasalDir(SGPath(globals->get_fg_root(), "Nasal"));
     loadScriptDirectory(nasalDir);
 
-    // NasalCanvas needs to be initialized after the props module from props.nas
-    // (located in $FG_ROOT/Nasal/)  has been loaded but before loading the
-    // canvas module or any script creating a canvas.
-    initNasalCanvas(_globals, _context, _gcHash);
-
     // Add modules in Nasal subdirectories to property tree
     simgear::PathList directories = nasalDir.children(simgear::Dir::TYPE_DIR+
             simgear::Dir::NO_DOT_OR_DOTDOT, "");