X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATC%2FAIEntity.cxx;h=f3b06ff9cf904f5cb9b2f9368dcf2baf5b5c31ee;hb=a682823adaf0fded092a7c6cfc5d099c27525ba8;hp=67ba889eba031cfb13316277ce6f63aaacec540e;hpb=7543409e472bbd58fd24f8f005e0d41c8f7d10ea;p=flightgear.git diff --git a/src/ATC/AIEntity.cxx b/src/ATC/AIEntity.cxx index 67ba889eb..f3b06ff9c 100644 --- a/src/ATC/AIEntity.cxx +++ b/src/ATC/AIEntity.cxx @@ -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"; }