]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/cockpit.cxx
Add David Culp's AI model manager code which is derived from David Luff's AI/ATC...
[flightgear.git] / src / Cockpit / cockpit.cxx
index f1bc1faea32ea36421c9cdec9d3afc024a65ffa1..931cb517d61233a04aaf184b444c9b5603b4d0ab 100644 (file)
@@ -29,8 +29,6 @@
 #  include <windows.h>
 #endif
 
-#include <GL/glut.h>
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -38,7 +36,7 @@
 #include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/math/polar3d.hxx>
-#include <simgear/misc/props.hxx>
+#include <simgear/props/props.hxx>
 #include <simgear/timing/sg_time.hxx>
 
 #include <Aircraft/aircraft.hxx>
@@ -52,6 +50,7 @@
 #include <GUI/gui.h>
 
 #include "cockpit.hxx"
+#include "hud.hxx"
 
 
 // This is a structure that contains all data related to
@@ -202,10 +201,10 @@ float get_agl( void )
 
     if ( !strcmp(startup_units_node->getStringValue(), "feet") ) {
         agl = (current_aircraft.fdm_state->get_Altitude()
-               - scenery.get_cur_elev() * SG_METER_TO_FEET);
+               - globals->get_scenery()->get_cur_elev() * SG_METER_TO_FEET);
     } else {
         agl = (current_aircraft.fdm_state->get_Altitude() * SG_FEET_TO_METER
-               - scenery.get_cur_elev());
+               - globals->get_scenery()->get_cur_elev());
     }
 
     return agl;