]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/AIEntity.cxx
any wind < 1kt is "calm", not just 0.0
[flightgear.git] / src / ATC / AIEntity.cxx
index c8aeab1e3cef815d5d2fb23260e0f3775725a712..41baf4a05eebb9c597cdb9222e161e5ec9974fea 100644 (file)
@@ -16,7 +16,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 /*****************************************************************
 *
@@ -46,20 +46,16 @@ FGAIEntity::FGAIEntity() {
 FGAIEntity::~FGAIEntity() {
        //cout << "FGAIEntity dtor called..." << endl;
        //cout << "Removing model from scene graph..." << endl;
-       globals->get_scenery()->get_scene_graph()->removeKid(_aip.getSceneGraph());
-        // Unregister that one at the scenery manager
-        globals->get_scenery()->unregister_placement_transform(_aip.getTransform());
+       globals->get_scenery()->get_scene_graph()->removeChild(_aip.getSceneGraph());
 
        //cout << "Done!" << endl;
 }
 
-void FGAIEntity::SetModel(ssgBranch* model) {
+void FGAIEntity::SetModel(osg::Node* model) {
        _model = model;
-       _aip.init(_model);
+       _aip.init(_model.get());
        _aip.setVisible(false);
-       globals->get_scenery()->get_scene_graph()->addKid(_aip.getSceneGraph());
-        // Register that one at the scenery manager
-        globals->get_scenery()->register_placement_transform(_aip.getTransform());
+       globals->get_scenery()->get_scene_graph()->addChild(_aip.getSceneGraph());
 
 }