From 58a427fb126d753c626e3c9e828be52a14f1c27a Mon Sep 17 00:00:00 2001 From: frohlich Date: Sun, 12 Apr 2009 09:53:05 +0000 Subject: [PATCH] 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 --- src/AIModel/AIBase.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()) { -- 2.39.5