#include <simgear/structure/event_mgr.hxx>
#include <simgear/misc/sg_path.hxx>
#include <simgear/misc/sg_dir.hxx>
+#include <simgear/misc/sgstream.hxx>
+
#include <simgear/misc/interpolator.hxx>
#include <simgear/scene/material/matlib.hxx>
#include <simgear/scene/model/particles.hxx>
#include <simgear/sound/soundmgr_openal.hxx>
-#include <simgear/timing/sg_time.hxx>
-#include <simgear/timing/lowleveltime.h>
#include <Aircraft/controls.hxx>
#include <Aircraft/replay.hxx>
#include <AIModel/AIManager.hxx>
-#if ENABLE_ATCDCL
-# include <ATCDCL/ATCmgr.hxx>
-# include <ATCDCL/AIMgr.hxx>
-# include "ATCDCL/commlist.hxx"
-#else
-# include "ATC/atcutils.hxx"
-#endif
+#include <ATCDCL/ATCmgr.hxx>
+#include <ATCDCL/commlist.hxx>
+#include <ATC/atis.hxx>
#include <Autopilot/route_mgr.hxx>
#include <Autopilot/autopilotgroup.hxx>
-#include <Cockpit/cockpit.hxx>
#include <Cockpit/panel.hxx>
#include <Cockpit/panel_io.hxx>
#include <GUI/new_gui.hxx>
-#include <Include/general.hxx>
#include <Input/input.hxx>
#include <Instrumentation/instrument_mgr.hxx>
#include <Model/acmodel.hxx>
+#include <Model/modelmgr.hxx>
#include <AIModel/submodel.hxx>
#include <AIModel/AIManager.hxx>
#include <Navaids/navdb.hxx>
#include <Navaids/navlist.hxx>
#include <Navaids/fix.hxx>
#include <Navaids/fixlist.hxx>
+#include <Navaids/airways.hxx>
#include <Scenery/scenery.hxx>
#include <Scenery/tilemgr.hxx>
#include <Scripting/NasalSys.hxx>
#include <Sound/voice.hxx>
#include <Systems/system_mgr.hxx>
#include <Time/light.hxx>
-#include <Time/sunsolver.hxx>
-#include <Time/tmp.hxx>
#include <Traffic/TrafficMgr.hxx>
#include <MultiPlayer/multiplaymgr.hxx>
#include <FDM/fdm_shell.hxx>
#include <Environment/environment_mgr.hxx>
-#include <Environment/ridge_lift.hxx>
#include "fg_init.hxx"
#include "fg_io.hxx"
if (hostname == NULL)
{
char _hostname[256];
- gethostname(_hostname, 256);
- hostname = strdup(_hostname);
- free_hostname = true;
+ if( gethostname(_hostname, 256) >= 0 ) {
+ hostname = strdup(_hostname);
+ free_hostname = true;
+ }
}
SG_LOG(SG_GENERAL, SG_INFO, "Scanning command line for: " << option );
static string fgScanForOption( const string& option ) {
string arg("");
-#if defined( unix ) || defined( __CYGWIN__ )
+#if defined( unix ) || defined( __CYGWIN__ ) || defined(_MSC_VER)
// Next check home directory for .fgfsrc.hostname file
if ( arg.empty() ) {
- if ( homedir != NULL ) {
+ if ( homedir != NULL && hostname != NULL && strlen(hostname) > 0) {
SGPath config( homedir );
config.append( ".fgfsrc" );
config.concat( "." );
config.append( "system.fgfsrc" );
fgParseOptions(config.str());
-#if defined( unix ) || defined( __CYGWIN__ )
- config.concat( "." );
- config.concat( hostname );
- fgParseOptions(config.str());
+#if defined( unix ) || defined( __CYGWIN__ ) || defined(_MSC_VER)
+ if( hostname != NULL && strlen(hostname) > 0 ) {
+ config.concat( "." );
+ config.concat( hostname );
+ fgParseOptions(config.str());
+ }
#endif
// Check for ~/.fgfsrc
fgParseOptions(config.str());
}
-#if defined( unix ) || defined( __CYGWIN__ )
- // Check for ~/.fgfsrc.hostname
- config.concat( "." );
- config.concat( hostname );
- fgParseOptions(config.str());
+#if defined( unix ) || defined( __CYGWIN__ ) || defined(_MSC_VER)
+ if( hostname != NULL && strlen(hostname) > 0 ) {
+ // Check for ~/.fgfsrc.hostname
+ config.concat( "." );
+ config.concat( hostname );
+ fgParseOptions(config.str());
+ }
#endif
// Parse remaining command line options
bool loadAircraft()
{
- std::string aircraft = fgGetString( "/sim/aircraft", "");
+ std::string aircraft = fgGetString( "/sim/aircraft", "");
if (aircraft.empty()) {
SG_LOG(SG_GENERAL, SG_ALERT, "no aircraft specified");
return false;
SGPropertyNode *n = _cache->getNode("fg-root", true);
n->setStringValue(globals->get_fg_root().c_str());
n->setAttribute(SGPropertyNode::USERARCHIVE, true);
+ n = _cache->getNode("fg-aircraft", true);
+ n->setStringValue(getAircraftPaths().c_str());
+ n->setAttribute(SGPropertyNode::USERARCHIVE, true);
_cache->removeChildren("aircraft");
fgFindAircraft(this, &FindAndCacheAircraft::checkAircraft);
}
private:
+ SGPath getAircraftPaths() {
+ string_list pathList = globals->get_aircraft_paths();
+ SGPath aircraftPaths;
+ string_list::const_iterator it = pathList.begin();
+ if (it != pathList.end()) {
+ aircraftPaths.set(*it);
+ it++;
+ }
+ for (; it != pathList.end(); ++it) {
+ aircraftPaths.add(*it);
+ }
+ return aircraftPaths;
+ }
+
bool checkCache()
{
if (globals->get_fg_root() != _cache->getStringValue("fg-root", "")) {
return false; // cache mismatch
}
+
+ if (getAircraftPaths().str() != _cache->getStringValue("fg-aircraft", "")) {
+ return false; // cache mismatch
+ }
vector<SGPropertyNode_ptr> cache = _cache->getChildren("aircraft");
for (unsigned int i = 0; i < cache.size(); i++) {
}
// Set current_options lon/lat given an airport id and heading (degrees)
-static bool fgSetPosFromAirportIDandHdg( const string& id, double tgt_hdg ) {
+bool fgSetPosFromAirportIDandHdg( const string& id, double tgt_hdg ) {
if ( id.empty() )
return false;
fixlist.init( p_fix ); // adds fixes to the DB in positioned.cxx
SG_LOG(SG_GENERAL, SG_INFO, " Airways");
- SGPath p_awy( globals->get_fg_root() );
- p_awy.append( "Navaids/awy.dat" );
- FGAirwayNetwork *awyNet = new FGAirwayNetwork;
- //cerr << "Loading Airways" << endl;
- awyNet->load (p_awy );
- awyNet->init();
- //cerr << "initializing airways" << endl;
- globals->set_airwaynet( awyNet );
-
+ flightgear::Airway::load();
+
return true;
}
curr->setStringValue(cwd ? cwd : "");
curr->setAttribute(SGPropertyNode::WRITE, false);
- fgSetBool("/sim/startup/stdout-to-terminal", isatty(1));
- fgSetBool("/sim/startup/stderr-to-terminal", isatty(2));
+ fgSetBool("/sim/startup/stdout-to-terminal", isatty(1) != 0 );
+ fgSetBool("/sim/startup/stderr-to-terminal", isatty(2) != 0 );
return true;
}
-// Initialize view parameters
-void fgInitView() {
- // force update of model so that viewer can get some data...
- globals->get_aircraft_model()->update(0);
- // run update for current view so that data is current...
- globals->get_viewmgr()->update(0);
-}
-
-
-SGTime *fgInitTime() {
- // Initialize time
- static const SGPropertyNode *longitude
- = fgGetNode("/position/longitude-deg");
- static const SGPropertyNode *latitude
- = fgGetNode("/position/latitude-deg");
- static const SGPropertyNode *cur_time_override
- = fgGetNode("/sim/time/cur-time-override", true);
-
- SGPath zone( globals->get_fg_root() );
- zone.append( "Timezone" );
- SGTime *t = new SGTime( longitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- latitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- zone.str(),
- cur_time_override->getLongValue() );
-
- globals->set_warp_delta( 0 );
-
- t->update( 0.0, 0.0,
- cur_time_override->getLongValue(),
- globals->get_warp() );
-
- return t;
-}
-
-
-// set up a time offset (aka warp) if one is specified
-void fgInitTimeOffset() {
- static const SGPropertyNode *longitude
- = fgGetNode("/position/longitude-deg");
- static const SGPropertyNode *latitude
- = fgGetNode("/position/latitude-deg");
- static const SGPropertyNode *cur_time_override
- = fgGetNode("/sim/time/cur-time-override", true);
-
- // Handle potential user specified time offsets
- int orig_warp = globals->get_warp();
- SGTime *t = globals->get_time_params();
- time_t cur_time = t->get_cur_time();
- time_t currGMT = sgTimeGetGMT( gmtime(&cur_time) );
- time_t systemLocalTime = sgTimeGetGMT( localtime(&cur_time) );
- time_t aircraftLocalTime =
- sgTimeGetGMT( fgLocaltime(&cur_time, t->get_zonename() ) );
-
- // Okay, we now have several possible scenarios
- int offset = fgGetInt("/sim/startup/time-offset");
- string offset_type = fgGetString("/sim/startup/time-offset-type");
-
- int warp = 0;
- if ( offset_type == "real" ) {
- warp = 0;
- } else if ( offset_type == "dawn" ) {
- warp = fgTimeSecondsUntilSunAngle( cur_time,
- longitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- latitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- 90.0, true );
- } else if ( offset_type == "morning" ) {
- warp = fgTimeSecondsUntilSunAngle( cur_time,
- longitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- latitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- 75.0, true );
- } else if ( offset_type == "noon" ) {
- warp = fgTimeSecondsUntilSunAngle( cur_time,
- longitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- latitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- 0.0, true );
- } else if ( offset_type == "afternoon" ) {
- warp = fgTimeSecondsUntilSunAngle( cur_time,
- longitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- latitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- 60.0, false );
- } else if ( offset_type == "dusk" ) {
- warp = fgTimeSecondsUntilSunAngle( cur_time,
- longitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- latitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- 90.0, false );
- } else if ( offset_type == "evening" ) {
- warp = fgTimeSecondsUntilSunAngle( cur_time,
- longitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- latitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- 100.0, false );
- } else if ( offset_type == "midnight" ) {
- warp = fgTimeSecondsUntilSunAngle( cur_time,
- longitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- latitude->getDoubleValue()
- * SGD_DEGREES_TO_RADIANS,
- 180.0, false );
- } else if ( offset_type == "system-offset" ) {
- warp = offset;
- orig_warp = 0;
- } else if ( offset_type == "gmt-offset" ) {
- warp = offset - (currGMT - systemLocalTime);
- orig_warp = 0;
- } else if ( offset_type == "latitude-offset" ) {
- warp = offset - (aircraftLocalTime - systemLocalTime);
- orig_warp = 0;
- } else if ( offset_type == "system" ) {
- warp = offset - (systemLocalTime - currGMT) - cur_time;
- } else if ( offset_type == "gmt" ) {
- warp = offset - cur_time;
- } else if ( offset_type == "latitude" ) {
- warp = offset - (aircraftLocalTime - currGMT)- cur_time;
- } else {
- SG_LOG( SG_GENERAL, SG_ALERT,
- "FG_TIME::Unsupported offset type " << offset_type );
- exit( -1 );
- }
- globals->set_warp( orig_warp + warp );
- t->update( longitude->getDoubleValue() * SGD_DEGREES_TO_RADIANS,
- latitude->getDoubleValue() * SGD_DEGREES_TO_RADIANS,
- cur_time_override->getLongValue(),
- globals->get_warp() );
-
- SG_LOG( SG_GENERAL, SG_INFO, "After fgInitTimeOffset(): warp = "
- << globals->get_warp() );
-}
-
-
// This is the top level init routine which calls all the other
// initialization routines. If you are adding a subsystem to flight
// gear, its initialization call should located in this routine.
// Initialize the scenery management subsystem.
////////////////////////////////////////////////////////////////////
- if ( globals->get_tile_mgr()->init() ) {
- // Load the local scenery data
- double visibility_meters = fgGetDouble("/environment/visibility-m");
- globals->get_tile_mgr()->update( visibility_meters );
- } else {
- SG_LOG( SG_GENERAL, SG_ALERT, "Error in Tile Manager initialization!" );
- exit(-1);
- }
-
globals->get_scenery()->get_scene_graph()
->addChild(simgear::Particles::getCommonRoot());
simgear::GlobalParticleCallback::setSwitch(fgGetNode("/sim/rendering/particles", true));
// Initialize the weather modeling subsystem
globals->add_subsystem("environment", new FGEnvironmentMgr);
- ////////////////////////////////////////////////////////////////////
- // Initialize the ridge lift simulation.
- ////////////////////////////////////////////////////////////////////
-
- // Initialize the ridgelift subsystem
- globals->add_subsystem("ridgelift", new FGRidgeLift);
-
////////////////////////////////////////////////////////////////////
// Initialize the aircraft systems and instrumentation (before the
// autopilot.)
// Initialize the XML Autopilot subsystem.
////////////////////////////////////////////////////////////////////
- globals->add_subsystem( "xml-autopilot", new FGXMLAutopilotGroup, SGSubsystemMgr::FDM );
+ globals->add_subsystem( "xml-autopilot", FGXMLAutopilotGroup::createInstance(), SGSubsystemMgr::FDM );
globals->add_subsystem( "route-manager", new FGRouteMgr );
-
- ////////////////////////////////////////////////////////////////////
- // Initialize the view manager subsystem.
- ////////////////////////////////////////////////////////////////////
-
- fgInitView();
////////////////////////////////////////////////////////////////////
// Initialize the Input-Output subsystem
globals->add_subsystem("gui", new NewGUI, SGSubsystemMgr::INIT);
-
- ////////////////////////////////////////////////////////////////////
- // Initialize the local time subsystem.
- ////////////////////////////////////////////////////////////////////
-
- // update the current timezone each 30 minutes
- globals->get_event_mgr()->addTask( "fgUpdateLocalTime()",
- &fgUpdateLocalTime, 30*60 );
- fgInitTimeOffset(); // the environment subsystem needs this
-
-
- ////////////////////////////////////////////////////////////////////
- // Initialize the lighting subsystem.
- ////////////////////////////////////////////////////////////////////
-
- globals->add_subsystem("lighting", new FGLight, SGSubsystemMgr::DISPLAY);
-
//////////////////////////////////////////////////////////////////////
// Initialize the 2D cloud subsystem.
////////////////////////////////////////////////////////////////////
fgGetBool("/sim/rendering/bump-mapping", false);
-#ifdef ENABLE_AUDIO_SUPPORT
- ////////////////////////////////////////////////////////////////////
- // Initialize the sound-effects subsystem.
- ////////////////////////////////////////////////////////////////////
- globals->add_subsystem("voice", new FGVoiceMgr, SGSubsystemMgr::DISPLAY);
-#endif
+
////////////////////////////////////////////////////////////////////
- // Initialise the ATC Manager
+ // Initialise the ATC Manager
////////////////////////////////////////////////////////////////////
-#if ENABLE_ATCDCL
SG_LOG(SG_GENERAL, SG_INFO, " ATC Manager");
globals->set_ATC_mgr(new FGATCMgr);
globals->get_ATC_mgr()->init();
////////////////////////////////////////////////////////////////////
- // Initialise the AI Manager
+ // Initialise the ATIS Manager
////////////////////////////////////////////////////////////////////
+ globals->add_subsystem("atis", new FGAtisManager, SGSubsystemMgr::POST_FDM);
+
+
+ ////////////////////////////////////////////////////////////////////
+ // Initialize multiplayer subsystem
+ ////////////////////////////////////////////////////////////////////
+
+ globals->add_subsystem("mp", new FGMultiplayMgr, SGSubsystemMgr::POST_FDM);
- SG_LOG(SG_GENERAL, SG_INFO, " AI Manager");
- globals->set_AI_mgr(new FGAIMgr);
- globals->get_AI_mgr()->init();
-#endif
////////////////////////////////////////////////////////////////////
// Initialise the AI Model Manager
////////////////////////////////////////////////////////////////////
// AI Traffic manager
globals->add_subsystem("Traffic Manager", new FGTrafficManager, SGSubsystemMgr::POST_FDM);
-
- if( fgCockpitInit()) {
- // Cockpit initialized ok.
- } else {
- SG_LOG( SG_GENERAL, SG_ALERT, "Error in Cockpit initialization!" );
- exit(-1);
- }
-
-
////////////////////////////////////////////////////////////////////
// Add a new 2D panel.
////////////////////////////////////////////////////////////////////
- string panel_path = fgGetString("/sim/panel/path",
- "Panels/Default/default.xml");
-
- globals->set_current_panel( fgReadPanel(panel_path) );
- if (globals->get_current_panel() == 0) {
+ string panel_path(fgGetString("/sim/panel/path"));
+ if (!panel_path.empty()) {
+ FGPanel* p = fgReadPanel(panel_path);
+ if (p) {
+ globals->set_current_panel(p);
+ p->init();
+ p->bind();
+ SG_LOG( SG_INPUT, SG_INFO, "Loaded new panel from " << panel_path );
+ } else {
SG_LOG( SG_INPUT, SG_ALERT,
"Error reading new panel from " << panel_path );
- } else {
- SG_LOG( SG_INPUT, SG_INFO, "Loaded new panel from " << panel_path );
- globals->get_current_panel()->init();
- globals->get_current_panel()->bind();
+ }
}
-
////////////////////////////////////////////////////////////////////
// Initialize the controls subsystem.
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
globals->add_subsystem("replay", new FGReplay);
+#ifdef ENABLE_AUDIO_SUPPORT
+ ////////////////////////////////////////////////////////////////////
+ // Initialize the sound-effects subsystem.
+ ////////////////////////////////////////////////////////////////////
+ globals->add_subsystem("voice", new FGVoiceMgr, SGSubsystemMgr::DISPLAY);
+#endif
////////////////////////////////////////////////////////////////////
- // Bind and initialize subsystems.
+ // Initialize the lighting subsystem.
////////////////////////////////////////////////////////////////////
- globals->get_subsystem_mgr()->bind();
- globals->get_subsystem_mgr()->init();
+ globals->add_subsystem("lighting", new FGLight, SGSubsystemMgr::DISPLAY);
+
+ // ordering here is important : Nasal (via events), then models, then views
+ globals->add_subsystem("events", globals->get_event_mgr(), SGSubsystemMgr::DISPLAY);
+
+ FGAircraftModel* acm = new FGAircraftModel;
+ globals->set_aircraft_model(acm);
+ globals->add_subsystem("aircraft-model", acm, SGSubsystemMgr::DISPLAY);
+ FGModelMgr* mm = new FGModelMgr;
+ globals->set_model_mgr(mm);
+ globals->add_subsystem("model-manager", mm, SGSubsystemMgr::DISPLAY);
+
+ FGViewMgr *viewmgr = new FGViewMgr;
+ globals->set_viewmgr( viewmgr );
+ globals->add_subsystem("view-manager", viewmgr, SGSubsystemMgr::DISPLAY);
+
+ globals->add_subsystem("tile-manager", globals->get_tile_mgr(),
+ SGSubsystemMgr::DISPLAY);
+
////////////////////////////////////////////////////////////////////
- // Initialize multiplayer subsystem
+ // Bind and initialize subsystems.
////////////////////////////////////////////////////////////////////
- globals->set_multiplayer_mgr(new FGMultiplayMgr);
- globals->get_multiplayer_mgr()->init();
+ globals->get_subsystem_mgr()->bind();
+ globals->get_subsystem_mgr()->init();
////////////////////////////////////////////////////////////////////////
// Initialize the Nasal interpreter.
// End of subsystem initialization.
////////////////////////////////////////////////////////////////////
+ fgSetBool("/sim/initialized", true);
+
SG_LOG( SG_GENERAL, SG_INFO, endl);
// Save the initial state for future
void fgReInitSubsystems()
{
- // static const SGPropertyNode *longitude
- // = fgGetNode("/sim/presets/longitude-deg");
- // static const SGPropertyNode *latitude
- // = fgGetNode("/sim/presets/latitude-deg");
- static const SGPropertyNode *altitude
- = fgGetNode("/sim/presets/altitude-ft");
static const SGPropertyNode *master_freeze
= fgGetNode("/sim/freeze/master");
- SG_LOG( SG_GENERAL, SG_INFO,
- "fgReInitSubsystems(): /position/altitude = "
- << altitude->getDoubleValue() );
+ SG_LOG( SG_GENERAL, SG_INFO, "fgReInitSubsystems()");
+// setup state to begin re-init
bool freeze = master_freeze->getBoolValue();
if ( !freeze ) {
fgSetBool("/sim/freeze/master", true);
}
+
+ fgSetBool("/sim/signals/reinit", true);
fgSetBool("/sim/crashed", false);
+// do actual re-init steps
+ globals->get_subsystem("flight")->unbind();
+
+ // reset control state, before restoring initial state; -set or config files
+ // may specify values for flaps, trim tabs, magnetos, etc
+ globals->get_controls()->reset_all();
+
+ globals->restoreInitialState();
+
+ // update our position based on current presets
+ fgInitPosition();
+
// Force reupdating the positions of the ai 3d models. They are used for
// initializing ground level for the FDM.
globals->get_subsystem("ai_model")->reinit();
// reload offsets from config defaults
globals->get_viewmgr()->reinit();
- fgInitView();
-
- globals->get_controls()->reset_all();
-
- fgUpdateLocalTime();
-
- // re-init to proper time of day setting
- fgInitTimeOffset();
-
+ globals->get_subsystem("time")->reinit();
+ globals->get_subsystem("tile-manager")->reinit();
+
+// setup state to end re-init
+ fgSetBool("/sim/signals/reinit", false);
if ( !freeze ) {
fgSetBool("/sim/freeze/master", false);
}
void doSimulatorReset(void) // from gui_local.cxx -- TODO merge with fgReInitSubsystems()
{
- static SGPropertyNode_ptr master_freeze = fgGetNode("/sim/freeze/master", true);
-
- bool freeze = master_freeze->getBoolValue();
- if (!freeze)
- master_freeze->setBoolValue(true);
-
- fgSetBool("/sim/signals/reinit", true);
-
- globals->get_subsystem("flight")->unbind();
-
- // in case user has changed window size as
- // restoreInitialState() overwrites these
- int xsize = fgGetInt("/sim/startup/xsize");
- int ysize = fgGetInt("/sim/startup/ysize");
-
- // viewports also needs to be saved/restored as
- // restoreInitialState() overwrites these
- SGPropertyNode *guiNode = new SGPropertyNode;
- SGPropertyNode *cameraNode = new SGPropertyNode;
- SGPropertyNode *cameraGroupNode = fgGetNode("/sim/rendering/camera-group");
- copyProperties(cameraGroupNode->getChild("camera"), cameraNode);
- copyProperties(cameraGroupNode->getChild("gui"), guiNode);
-
- globals->restoreInitialState();
-
- // update our position based on current presets
- fgInitPosition();
-
- // We don't know how to resize the window, so keep the last values
- // for xsize and ysize, and don't use the one set initially
- fgSetInt("/sim/startup/xsize", xsize);
- fgSetInt("/sim/startup/ysize", ysize);
-
- copyProperties(cameraNode, cameraGroupNode->getChild("camera"));
- copyProperties(guiNode, cameraGroupNode->getChild("gui"));
-
- delete guiNode;
- delete cameraNode;
-
- SGTime *t = globals->get_time_params();
- delete t;
- t = fgInitTime();
- globals->set_time_params(t);
+
fgReInitSubsystems();
-
- globals->get_tile_mgr()->update(fgGetDouble("/environment/visibility-m"));
- globals->get_renderer()->resize(xsize, ysize);
- fgSetBool("/sim/signals/reinit", false);
-
- if (!freeze)
- master_freeze->setBoolValue(false);
}
///////////////////////////////////////////////////////////////////////////////
SGPropertyNode root;
try {
readProperties(path.str(), &root);
- } catch (sg_exception& e) {
+ } catch (sg_exception& ) {
return false;
}