vertical_mode( 0 ),
lateral_mode( 0 )
{
+ globals->set_controls( this );
}
void
FGControls::bind ()
{
+ init(); // unfortunately, tie-ing requires init() to have occurred
int index, i;
// flight controls
void
FGControls::update (double dt)
{
+ SG_UNUSED(dt);
}
-
-
\f
////////////////////////////////////////////////////////////////////////
// Setters and adjusters.
////////////////////////////////////////////////////////////////////
// Initialize the controls subsystem.
////////////////////////////////////////////////////////////////////
-
- globals->get_controls()->init();
- globals->get_controls()->bind();
-
+
+ globals->add_subsystem("controls", new FGControls);
////////////////////////////////////////////////////////////////////
// Initialize the input subsystem.
delete ATIS_mgr;
- if (controls)
- {
- controls->unbind();
- delete controls;
- }
-
delete channel_options_list;
delete initial_waypoints;
delete scenery;
#include <simgear/math/SGMath.hxx>
#include <simgear/math/sg_random.h>
-#include <Aircraft/controls.hxx>
#include <Model/panelnode.hxx>
#include <Scenery/scenery.hxx>
#include <Scenery/tilemgr.hxx>
// seed the random number generator
sg_srandom_time();
- FGControls *controls = new FGControls;
- globals->set_controls( controls );
-
string_list *col = new string_list;
globals->set_channel_options_list( col );