let Nasal's fgcommand() return C++ return value (0 -> failure, 1 -> success)
This commit is contained in:
parent
747b1e11cc
commit
b1fad7d98e
1 changed files with 1 additions and 3 deletions
|
@ -260,9 +260,7 @@ static naRef f_fgcommand(naContext c, naRef me, int argc, naRef* args)
|
||||||
naRuntimeError(c, "bad arguments to fgcommand()");
|
naRuntimeError(c, "bad arguments to fgcommand()");
|
||||||
naRef cmd = args[0], props = args[1];
|
naRef cmd = args[0], props = args[1];
|
||||||
SGPropertyNode_ptr* node = (SGPropertyNode_ptr*)naGhost_ptr(props);
|
SGPropertyNode_ptr* node = (SGPropertyNode_ptr*)naGhost_ptr(props);
|
||||||
globals->get_commands()->execute(naStr_data(cmd), *node);
|
return naNum(globals->get_commands()->execute(naStr_data(cmd), *node));
|
||||||
return naNil();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// settimer(func, dt, simtime) extension function. Falls through to
|
// settimer(func, dt, simtime) extension function. Falls through to
|
||||||
|
|
Loading…
Reference in a new issue