if (_time_before_search_sec < 0) {
_time_before_search_sec = 1.0;
- _navrecord = globals->get_dmelist()->findByFreq( frequency_mhz,
- globals->get_aircraft_position());
+ if( fgGetBool( "/sim/realism/dme-fallback-to-loc", true ) ) {
+ if( NULL == (_navrecord = globals->get_loclist()->findByFreq( frequency_mhz,
+ globals->get_aircraft_position())) ) {
+
+ _navrecord = globals->get_dmelist()->findByFreq( frequency_mhz,
+ globals->get_aircraft_position());
+ }
+ } else {
+ _navrecord = globals->get_dmelist()->findByFreq( frequency_mhz,
+ globals->get_aircraft_position());
+ }
}
// If it's off, don't bother.