X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FScripting%2FNasalSys.cxx;h=870d6def1455f0831e095243af62223d333bb799;hb=9c28ed02577e6d32e1365567107adbd048f3d743;hp=d999cc8cb2b7ef2913ab76de6c6350a078f75fdc;hpb=d977c07908960acd7d202770589da3bb8d442212;p=flightgear.git diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index d999cc8cb..870d6def1 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -71,7 +71,7 @@ bool FGNasalSys::parseAndRun(const char* sourceCode) if(naIsNil(code)) return false; - naCall(_context, code, naNil(), naNil(), naNil()); + naCall(_context, code, 0, 0, naNil(), naNil()); if(!naGetError(_context)) return true; logError(); @@ -444,7 +444,7 @@ void FGNasalSys::createModule(const char* moduleName, const char* fileName, if(!naHash_get(_globals, modname, &locals)) locals = naNewHash(_context); - naCall(_context, code, naNil(), naNil(), locals); + naCall(_context, code, 0, 0, naNil(), locals); if(naGetError(_context)) { logError(); return; @@ -489,7 +489,7 @@ bool FGNasalSys::handleCommand(const SGPropertyNode* arg) _cmdArg = (SGPropertyNode*)arg; // Call it! - naRef result = naCall(_context, code, naNil(), naNil(), locals); + naRef result = naCall(_context, code, 0, 0, naNil(), locals); if(!naGetError(_context)) return true; logError(); return false; @@ -498,7 +498,7 @@ bool FGNasalSys::handleCommand(const SGPropertyNode* arg) // settimer(func, dt, simtime) extension function. The first argument // is a Nasal function to call, the second is a delta time (from now), // in seconds. The third, if present, is a boolean value indicating -// that "simulator" time (rather than real time) is to be used. +// that "real world" time (rather than simulator time) is to be used. // // Implementation note: the FGTimer objects don't live inside the // garbage collector, so the Nasal handler functions have to be @@ -515,7 +515,7 @@ void FGNasalSys::setTimer(int argc, naRef* args) naRef delta = argc > 1 ? args[1] : naNil(); if(naIsNil(delta)) return; - bool simtime = (argc > 2 && naTrue(args[2])) ? true : false; + bool simtime = (argc > 2 && naTrue(args[2])) ? false : true; // Generate and register a C++ timer handler NasalTimer* t = new NasalTimer; @@ -530,7 +530,7 @@ void FGNasalSys::setTimer(int argc, naRef* args) void FGNasalSys::handleTimer(NasalTimer* t) { - naCall(_context, t->handler, naNil(), naNil(), naNil()); + naCall(_context, t->handler, 0, 0, naNil(), naNil()); if(naGetError(_context)) logError(); gcRelease(t->gcKey);