]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AICarrier.cxx
Overhaul the ground-net / parking code.
[flightgear.git] / src / AIModel / AICarrier.cxx
index dc8cde561419f19aca2f0306b2b0f8bea8ce3438..e9aea5207d1f6337f7899fedbc6f2290d4b5b6e0 100644 (file)
 #include <vector>
 
 #include <simgear/sg_inlines.h>
-#include <simgear/math/SGMath.hxx>
 #include <simgear/math/sg_geodesy.hxx>
 
 #include <math.h>
 #include <Main/util.hxx>
-#include <Main/viewer.hxx>
 
 #include "AICarrier.hxx"
 
@@ -167,7 +165,7 @@ void FGAICarrier::update(double dt) {
     SGVec3d cartPos = SGVec3d::fromGeod(pos);
 
     // The position of the eyepoint - at least near that ...
-    SGVec3d eyePos(globals->get_current_view()->get_view_pos());
+    SGVec3d eyePos(globals->get_view_position_cart());
     // Add the position offset of the AIModel to gain the earth
     // centered position
     SGVec3d eyeWrtCarrier = eyePos - cartPos;