std::string name = component->get_name();
for( unsigned i = 0; get_subsystem( name.c_str() ) != NULL; i++ ) {
ostringstream buf;
- buf << name << "_" << i;
+ buf << component->get_name() << "_" << i;
name = buf.str();
}
if( name != component->get_name() )
};
for( unsigned i = 0; i < sizeof(nodeNames)/sizeof(nodeNames[0]); i++ )
initFrom( fgGetNode( "/sim/systems" ), nodeNames[i] );
+
+ SGSubsystemGroup::bind();
+ SGSubsystemGroup::init();
}
void FGXMLAutopilotGroupImplementation::initFrom( SGPropertyNode_ptr rootNode, const char * childName )
string name = apName;
for( unsigned i = 0; get_subsystem( apName.c_str() ) != NULL; i++ ) {
ostringstream buf;
- buf << apName << "_" << i;
+ buf << name << "_" << i;
apName = buf.str();
}
if( apName != name )
continue;
}
}
-
- SGSubsystemGroup::bind();
- SGSubsystemGroup::init();
}
FGXMLAutopilotGroup * FGXMLAutopilotGroup::createInstance()