diff --git a/simgear/scene/tgdb/ReaderWriterSTG.cxx b/simgear/scene/tgdb/ReaderWriterSTG.cxx index b9a0cb95..f7be485e 100644 --- a/simgear/scene/tgdb/ReaderWriterSTG.cxx +++ b/simgear/scene/tgdb/ReaderWriterSTG.cxx @@ -53,6 +53,8 @@ #include #include #include +#include + #include @@ -673,6 +675,11 @@ struct ReaderWriterSTG::_ModelBin { << stgObject._token << " '" << stgObject._name << "'"); continue; } + + // Add the OBJECT to the elevation constraints of the terrain so the terrain + // doesn't poke through the airport + simgear::VPBTechnique::addElevationConstraint(node, terrainGroup); + terrainGroup->addChild(node.get()); } } else if (_foundBase) {