+ if(atcptr) {
+ if(atcptr->GetType() == APPROACH) {
+ switch(atcDialogCommunicationOptions->getValue()) {
+ case 0:
+ fgSetBool("/sim/atc/opt0",true);
+ break;
+ case 1:
+ fgSetBool("/sim/atc/opt1",true);
+ break;
+ case 2:
+ fgSetBool("/sim/atc/opt2",true);
+ break;
+ case 3:
+ fgSetBool("/sim/atc/opt3",true);
+ break;
+ default:
+ break;
+ }
+ } else if(atcptr->GetType() == TOWER) {
+ //cout << "TOWER " << endl;
+ //cout << "ident is " << atcptr->get_ident() << endl;
+ atcmentry_vec_type atcmlist = (available_dialog[TOWER])[atcptr->get_ident()];
+ if(atcmlist.size()) {
+ //cout << "Doing callback...\n";
+ ATCMenuEntry a = atcmlist[atcDialogCommunicationOptions->getValue()];
+ atcptr->SetFreqInUse();
+ // This is the user's speech getting displayed.
+ globals->get_ATC_display()->RegisterSingleMessage(atcptr->GenText(a.transmission, a.callback_code));
+ _callbackPending = true;
+ _callbackTimer = 0.0;
+ _callbackWait = 5.0;
+ _callbackPtr = atcptr;
+ _callbackCode = a.callback_code;
+ } else {
+ //cout << "No options available...\n";
+ }
+ //cout << "Donded" << endl;
+ }
+ }
+}