- if ((pitch.max = kids[i]->getFloatValue("max")) <= pitch.min) {
- SG_LOG( SG_GENERAL, SG_ALERT,
- "Pitch maximum value below minimum value. Forced above minimum.");
- pitch.max = pitch.min + 5.0;
- }
+ if ((pitch.min = kids[i]->getDoubleValue("min", 0.0)) < 0.0)
+ SG_LOG(SG_GENERAL,SG_WARN,
+ " Pitch minimum value below 0. Forced to 0.");
+
+ pitch.max = kids[i]->getDoubleValue("max", 0.0);
+ if (pitch.max && (pitch.max < pitch.min) )
+ SG_LOG(SG_GENERAL,SG_ALERT,
+ " Pitch maximum below minimum. Neglected");