else if(!strcmp(a, "trace-read")) attr = SGPropertyNode::TRACE_READ;
else if(!strcmp(a, "trace-write")) attr = SGPropertyNode::TRACE_WRITE;
else if(!strcmp(a, "userarchive")) attr = SGPropertyNode::USERARCHIVE;
+ else if(!strcmp(a, "preserve")) attr = SGPropertyNode::PRESERVE;
else {
naRuntimeError(c, "props.getAttribute() with invalid attribute");
return naNil();
else if(!strcmp(a, "trace-read")) attr = SGPropertyNode::TRACE_READ;
else if(!strcmp(a, "trace-write")) attr = SGPropertyNode::TRACE_WRITE;
else if(!strcmp(a, "userarchive")) attr = SGPropertyNode::USERARCHIVE;
+ else if(!strcmp(a, "preserve")) attr = SGPropertyNode::PRESERVE;
else {
naRuntimeError(c, "props.setAttribute() with invalid attribute");
return naNil();
double dv = (*node)->getDoubleValue();
if (osg::isNaN(dv)) {
SG_LOG(SG_GENERAL, SG_ALERT, "Nasal getValue: property " << (*node)->getPath() << " is NaN");
- naRuntimeError(c, "props.getValue() would have read NaN");
+ return naNil();
}
return naNum(dv);