]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/trafficcontrol.cxx
NavDisplay: fix update lag when switching range or centre.
[flightgear.git] / src / ATC / trafficcontrol.cxx
index ee0f06a7fc6be64eb9957d33e534e208e5800595..a0a4d98d802816c610d16569d6923c213a2ddedf 100644 (file)
@@ -48,6 +48,7 @@
 #include <Airports/dynamics.hxx>
 #include <Airports/simple.hxx>
 #include <Radio/radio.hxx>
+#include <signal.h>
 
 using std::sort;
 
@@ -188,12 +189,6 @@ void FGTrafficRecord::setPositionAndIntentions(int pos,
         if ((*i) != pos) {
             SG_LOG(SG_ATC, SG_ALERT,
                    "Error in FGTrafficRecord::setPositionAndIntentions at " << SG_ORIGIN);
-            cerr << "Pos : " << pos << " Curr " << *(intentions.begin())  << endl;
-            for (intVecIterator i = intentions.begin();
-                    i != intentions.end(); i++) {
-                cerr << (*i) << " ";
-            }
-            cerr << endl;
         }
         intentions.erase(i);
     } else {
@@ -201,21 +196,11 @@ void FGTrafficRecord::setPositionAndIntentions(int pos,
         int size = route->getNrOfWayPoints();
         //cerr << "Setting pos" << pos << " ";
         //cerr << "setting intentions ";
-        for (int i = 0; i < size; i++) {
+        for (int i = 2; i < size; i++) {
             int val = route->getRouteIndex(i);
-            //cerr << val<< " ";
-            if ((val) && (val != pos)) {
-                intentions.push_back(val);
-                //cerr << "[set] ";
-            }
+            intentions.push_back(val);
         }
-        //cerr << endl;
-        //while (route->next(&legNr, &routeNr)) {
-        //intentions.push_back(routeNr);
-        //}
-        //route->rewind(currentPos);
     }
-    //exit(1);
 }
 /**
  * Check if another aircraft is ahead of the current one, and on the same
@@ -1341,7 +1326,7 @@ void FGStartupController::render(bool visible)
     if (visible) {
         group = new osg::Group;
         FGScenery * local_scenery = globals->get_scenery();
-        double elevation_meters = 0.0;
+        //double elevation_meters = 0.0;
         double elevation_feet = 0.0;