_controlled = false;
_invisible = false;
+
+ ground = NULL;
+ tower = NULL;
+ ourGate = NULL;
+ nextTaxiNode = NULL;
+ holdShortNode = NULL;
}
FGAILocalTraffic::~FGAILocalTraffic() {
if(code == 1) {
ground->RequestDeparture(plane, this);
} else if(code == 2) {
- tower->ContactAtHoldShort(plane, this, CIRCUIT);
+ if (_controlled) tower->ContactAtHoldShort(plane, this, CIRCUIT);
} else if(code == 3) {
- tower->ReportRunwayVacated(plane.callsign);
+ if (_controlled) tower->ReportRunwayVacated(plane.callsign);
} else if(code == 11) {
- tower->ReportDownwind(plane.callsign);
+ if (_controlled) tower->ReportDownwind(plane.callsign);
} else if(code == 13) {
- tower->ReportFinal(plane.callsign);
+ if (_controlled) tower->ReportFinal(plane.callsign);
} else if(code == 99) { // Flag this instance for deletion
responseCounter = 0;
_removeSelf = true;
void FGATCMgr::ZapOtherService(const string ncunit, const string svc_name){
for (atc_list_iterator svc = atc_list->begin(); svc != atc_list->end(); svc++) {
- //cout << "Zapping " << navcomm
- // << "[" << unit << "]" << " otherthan: " << svc_name << endl;
+
if (svc->first != svc_name) {
MSI &actv = svc->second->active_on;
// OK, we have found some OTHER service;
//cout << "Eradicating service: '" << svc->first << "'" << endl;
svc->second->SetNoDisplay();
svc->second->Update(0); // one last update
- delete svc->second;
+ SG_LOG(SG_GENERAL, SG_INFO, "would have erased ATC service:" << svc->second->get_name()<< "/"
+ << svc->second->get_ident());
+ // delete svc->second;
atc_list->erase(svc);
// ALL pointers into the ATC list are now invalid,
// so let's reset them: