diff --git a/src/Instrumentation/dme.cxx b/src/Instrumentation/dme.cxx index d8d14a5a2..bcea965d8 100644 --- a/src/Instrumentation/dme.cxx +++ b/src/Instrumentation/dme.cxx @@ -119,8 +119,17 @@ DME::update (double delta_time_sec) 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.