}
last_time = now;
- play_count = ++play_count % NUM_IDENT_SLOTS;
+ play_count++;
+ play_count %= NUM_IDENT_SLOTS;
// Previous ident is out of time; if still playing, cut it off:
_sgr->stop( nav_fx_name );
_navaid = nav;
string identBuffer(4, ' ');
if (nav) {
- _dme = globals->get_dmelist()->findByFreq(freq, pos);
+ // use ILS signals as DME, otherwise search by frequency
+ if (nav->type()==FGPositioned::ILS)
+ _dme = nav;
+ else
+ _dme = globals->get_dmelist()->findByFreq(freq, pos);
nav_id_node->setStringValue(nav->get_ident());
identBuffer = simgear::strutils::rpad( nav->ident(), 4, ' ' );