X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FSystems%2Fsystem_mgr.cxx;h=0ca9efb7a1b0eca305ab0b23372ddb56762231d9;hb=4c7fb6c91bbf17119407748d4d49d627748ad037;hp=9d945a5849f3adeaed68acea0f3cfedcc25dbc86;hpb=a6db6d89ff41a619569e6433409e8bf62ff98499;p=flightgear.git diff --git a/src/Systems/system_mgr.cxx b/src/Systems/system_mgr.cxx index 9d945a584..0ca9efb7a 100644 --- a/src/Systems/system_mgr.cxx +++ b/src/Systems/system_mgr.cxx @@ -29,20 +29,19 @@ FGSystemMgr::FGSystemMgr () { - config_props = new SGPropertyNode; + SGPropertyNode_ptr config_props = new SGPropertyNode; SGPropertyNode *path_n = fgGetNode("/sim/systems/path"); if (path_n) { - SGPath config( globals->get_fg_root() ); - config.append( path_n->getStringValue() ); + SGPath config = globals->resolve_aircraft_path(path_n->getStringValue()); SG_LOG( SG_ALL, SG_INFO, "Reading systems from " << config.str() ); try { readProperties( config.str(), config_props ); - if ( build() ) { + if ( build(config_props) ) { enabled = true; } else { SG_LOG( SG_ALL, SG_ALERT, @@ -63,14 +62,13 @@ FGSystemMgr::FGSystemMgr () "No systems model specified for this model!"); } - delete config_props; } FGSystemMgr::~FGSystemMgr () { } -bool FGSystemMgr::build () +bool FGSystemMgr::build (SGPropertyNode* config_props) { SGPropertyNode *node; int i;