]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/AIEntity.cxx
Bugfix. The engine thrust is recalculated based on the current N1 value
[flightgear.git] / src / ATC / AIEntity.cxx
index 67ba889eba031cfb13316277ce6f63aaacec540e..f3b06ff9cf904f5cb9b2f9368dcf2baf5b5c31ee 100644 (file)
@@ -36,8 +36,6 @@
 
 #include "AIEntity.hxx"
 
-extern ssgRoot* scene; // The global Flightgear scene graph
-
 FGAIEntity::~FGAIEntity() {
 }
 
@@ -48,14 +46,14 @@ void FGAIEntity::Update() {
 void FGAIEntity::Transform() {
 
     // Translate moving object w.r.t eye
-    Point3D sc = scenery.get_center();
+    Point3D sc = globals->get_scenery()->get_center();
     //cout << "sc0 = " << sc.x() << " sc1 = " << sc.y() << " sc2 = " << sc.z() << '\n';
     //cout << "op0 = " << obj_pos.x() << " op1 = " << obj_pos.y() << " op2 = " << obj_pos.z() << '\n';
 
     sgCoord shippos;
     FastWorldCoordinate(&shippos, sc);
     position->setTransform( &shippos );
-    scene->addKid(position);
+    globals->get_scenery()->get_scene_graph()->addKid(position);
     //cout << "Transform called\n";
 }