From 5fb87df1fbca82817a74c74db840ca60c305ee3a Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 14 Jun 2005 17:54:19 +0000 Subject: [PATCH] Turn the electrical system into a non-hardcoded system like all the other systems. --- src/Systems/system_mgr.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Systems/system_mgr.cxx b/src/Systems/system_mgr.cxx index 1a93aa718..cc1844d1a 100644 --- a/src/Systems/system_mgr.cxx +++ b/src/Systems/system_mgr.cxx @@ -24,8 +24,6 @@ FGSystemMgr::FGSystemMgr () { - set_subsystem( "electrical", new FGElectricalSystem ); - config_props = new SGPropertyNode; SGPropertyNode *path_n = fgGetNode("/sim/systems/path"); @@ -78,7 +76,10 @@ bool FGSystemMgr::build () string name = node->getName(); std::ostringstream temp; temp << i; - if ( name == "pitot" ) { + if ( name == "electrical" ) { + set_subsystem( "electrical" + temp.str(), + new FGElectricalSystem( node ) ); + } else if ( name == "pitot" ) { set_subsystem( "system" + temp.str(), new PitotSystem( node ) ); } else if ( name == "static" ) { -- 2.39.5