From: frohlich Date: Sun, 12 Apr 2009 09:53:05 +0000 (+0000) Subject: Fix a problem with node traversal masks and paged model loading that X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=58a427fb126d753c626e3c9e828be52a14f1c27a;p=flightgear.git Fix a problem with node traversal masks and paged model loading that shows up as a non solid carrier under some circumstance. Modified Files: AIBase.cxx AIBase.hxx AIShip.cxx --- diff --git a/src/AIModel/AIBase.cxx b/src/AIModel/AIBase.cxx index 476ada122..a57b5505d 100644 --- a/src/AIModel/AIBase.cxx +++ b/src/AIModel/AIBase.cxx @@ -174,7 +174,6 @@ bool FGAIBase::init(bool search_in_AI_path) { model = load3DModel(f, props); if (model.valid() && _initialized == false) { - model->setNodeMask(model->getNodeMask() & ~SG_NODEMASK_TERRAIN_BIT); aip.init( model.get() ); aip.setVisible(true); invisible = false; @@ -192,6 +191,9 @@ bool FGAIBase::init(bool search_in_AI_path) { void FGAIBase::initModel(osg::Node *node) { if (model.valid()) { + // Disable altitude computations for general AI models. + model->setNodeMask(model->getNodeMask() & ~SG_NODEMASK_TERRAIN_BIT); + fgSetString("/ai/models/model-added", props->getPath()); } else if (!model_path.empty()) {