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
This commit is contained in:
parent
30ae6e0564
commit
58a427fb12
1 changed files with 3 additions and 1 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue