X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FScripting%2FNasalModelData.cxx;h=20df177ad590e39d97bd7e808606be37ddfe3944;hb=36f7ef93aa4a08a2bb37d04cb1fac0424105e895;hp=15bbf37ee723d4f2dfec1abb89b675407dab39d3;hpb=4c9ab24b6629c979692b33b5459428c5fc2f88b3;p=flightgear.git diff --git a/src/Scripting/NasalModelData.cxx b/src/Scripting/NasalModelData.cxx index 15bbf37ee..20df177ad 100644 --- a/src/Scripting/NasalModelData.cxx +++ b/src/Scripting/NasalModelData.cxx @@ -1,6 +1,7 @@ #include "NasalModelData.hxx" #include "NasalSys.hxx" +#include
#include
#include @@ -121,12 +122,8 @@ void FGNasalModelData::load() nasal::Hash module = nasalSys->getGlobals().createHash(_module); module.set("_module_id", _module_id); - if( !NasalNode::isInit() ) - { - NasalNode::init("osg.Node") + NasalNode::init("osg.Node") .method("getPose", &f_node_getPose); - } - module.set("_model", _branch); naRef arg[2]; @@ -197,6 +194,9 @@ void FGNasalModelDataProxy::modelLoaded( const std::string& path, SGPropertyNode *prop, osg::Node *branch ) { + if( fgGetBool("/sim/disable-embedded-nasal") ) + return; + if(!prop) return;