+
+ // do a 2nd pass to pick up starting switch value if specified
+ for ( i = 0; i < node->nChildren(); ++i ) {
+ SGPropertyNode *child = node->getChild(i);
+ string cname = child->getName();
+ string cval = child->getStringValue();
+ // cout << " " << cname << " = " << cval << endl;
+ if ( cname == "initial-state" ) {
+ if ( cval == "off" ) {
+ set_switches( false );
+ } else {
+ set_switches( true );
+ }
+ }
+ }