]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/cockpit.cxx
- Added ultra-light traffic is now a separate traffic class that can have its
[flightgear.git] / src / Cockpit / cockpit.cxx
index 74c1bde9a500d4696932252002f660804f236a2f..26b6b94dd4aa08394d278ca075eb43899296f73b 100644 (file)
 #include "hud.hxx"
 
 
-// This is a structure that contains all data related to
-// cockpit/panel/hud system
-
-static pCockpit ac_cockpit;
 // The following routines obtain information concerntin the aircraft's
 // current state and return it to calling instrument display routines.
 // They should eventually be member functions of the aircraft.
@@ -541,20 +537,11 @@ bool fgCockpitInit( fgAIRCRAFT *cur_aircraft )
     // current aircraft.
 
     fgHUDInit( cur_aircraft );
-    ac_cockpit = new fg_Cockpit();
-
-    SG_LOG( SG_COCKPIT, SG_INFO,
-        "  Code " << ac_cockpit->code() << " Status "
-        << ac_cockpit->status() );
 
     return true;
 }
 
-void fgCockpitUpdate( void ) {
-
-    SG_LOG( SG_COCKPIT, SG_DEBUG,
-            "Cockpit: code " << ac_cockpit->code() << " status "
-            << ac_cockpit->status() );
+void fgCockpitUpdate( osg::State* state ) {
 
     static const SGPropertyNode * xsize_node = fgGetNode("/sim/startup/xsize");
     static const SGPropertyNode * ysize_node = fgGetNode("/sim/startup/ysize");
@@ -568,7 +555,7 @@ void fgCockpitUpdate( void ) {
     if ( hud_visibility_node->getBoolValue() ) {
         // This will check the global hud linked list pointer.
         // If there is anything to draw it will.
-        fgUpdateHUD();
+        fgUpdateHUD( state );
     }
 
     glViewport( 0, 0, iwidth, iheight );