void FGTower::ProcessRunwayVacatedReport(TowerPlaneRec* t) {
//cout << "Processing rwy vacated...\n";
- current_atcdialog->remove_entry(ident, USER_REPORT_GOING_AROUND, TOWER);
+ if(t->isUser) current_atcdialog->remove_entry(ident, USER_REPORT_GOING_AROUND, TOWER);
string trns = t->plane.callsign;
if(separateGround) {
trns += " Contact ground on ";
if(_display) {
globals->get_ATC_display()->RegisterSingleMessage(trns);
}
+ RemoveFromRwyList(t->plane.callsign);
+ AddToVacatedList(t);
// Maybe we should check that the plane really *has* vacated the runway!
}
//cout << "Size of rwylist was " << rwyList.size() << '\n';
//cout << "Size of vacatedList was " << vacatedList.size() << '\n';
RemoveFromRwyList(t->plane.callsign);
- vacatedList.push_back(t);
+ AddToVacatedList(t);
//cout << "Size of rwylist is " << rwyList.size() << '\n';
//cout << "Size of vacatedList is " << vacatedList.size() << '\n';
// At the moment we wait until Runway Vacated is reported by the plane before telling to contact ground etc.
return(conflict);
}
+// Add to vacated list only if not already present
+void FGTower::AddToVacatedList(TowerPlaneRec* t) {
+ tower_plane_rec_list_iterator twrItr;
+ bool found = false;
+ for(twrItr = vacatedList.begin(); twrItr != vacatedList.end(); twrItr++) {
+ if((*twrItr)->plane.callsign == t->plane.callsign) {
+ found = true;
+ }
+ }
+ if(found) return;
+ vacatedList.push_back(t);
+}
+
// Calculate the eta of a plane to the threshold.
// For ground traffic this is the fastest they can get there.
bool AddToTrafficList(TowerPlaneRec* t, bool holding = false);
bool AddToCircuitList(TowerPlaneRec* t);
+
+ // Add to vacated list only if not already present
+ void AddToVacatedList(TowerPlaneRec* t);
// Ground can be separate or handled by tower in real life.
// In the program we will always use a separate FGGround class, but we need to know