+ } else if ( cname == "additive-switch" ) {
+ float additive_value = 0.0f;
+ float increment = 0.0f;
+
+ SGPropertyNode *pos;
+ int k = 0;
+ while ( (pos = child->getChild("position", k++)) != NULL ) {
+ // read the combo position entries from the property tree
+
+ prop = pos->getChild( "row" );
+ if ( prop != NULL ) {
+ row = prop->getIntValue();
+ }
+ prop = pos->getChild( "col" );
+ if ( prop != NULL ) {
+ col = prop->getIntValue();
+ }
+ prop = pos->getChild( "value" );
+ if ( prop != NULL ) {
+ increment = prop->getFloatValue();
+ }
+
+ // Fetch the raw value
+ int raw_value = switch_matrix[board][row][col];
+ // cout << "sm[" << board << "][" << row << "][" << col
+ // << "] = " << raw_value << endl;
+
+ if ( raw_value ) {
+ // set scaled_value to the first combo_value
+ // that matches and jump out of loop.
+ additive_value += increment;
+ }
+ }
+
+ // Cook the value
+ scaled_value = additive_value * factor;