]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/tower.cxx
try to fix yet another crash bug (don't worry, there's one for anybody!)
[flightgear.git] / src / ATC / tower.cxx
index cdeb185482f1b02d0610ae906cf23e2454bac0bf..b9982546120ff8aa0f28a6c7c2eebdfd3b5fc560 100644 (file)
@@ -34,7 +34,6 @@
 #include <simgear/debug/logstream.hxx>
 
 #include "tower.hxx"
-#include "ATCdisplay.hxx"
 #include "ATCmgr.hxx"
 #include "ATCutils.hxx"
 #include "ATCDialog.hxx"
@@ -191,7 +190,10 @@ FGTower::RemoveAllUserDialogOptions() really ought to be replaced by an ATCDialo
 At the moment planes in the lists are not guaranteed to always have a sensible ETA - it should be set as part of AddList functions, and lists should only be accessed this way. (FAIRLY MAJOR). 
 *******************************************/
 
-FGTower::FGTower() {
+FGTower::FGTower() :
+       separateGround(true),
+       ground(0)
+{
        ATCmgr = globals->get_ATC_mgr();
        
        _type = TOWER;
@@ -507,7 +509,6 @@ void FGTower::Respond() {
                        }
                        trns += ConvertRwyNumToSpokenString(activeRwy);
                        if(_display) {
-                               //globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
                                pending_transmission = trns;
                                Transmit();
                        } else {
@@ -545,7 +546,6 @@ void FGTower::Respond() {
                                string trns = t->plane.callsign;
                                trns += " hold position";
                                if(_display) {
-                                       //globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
                                        pending_transmission = trns;
                                        Transmit();
                                }
@@ -585,7 +585,6 @@ void FGTower::Respond() {
                                t->clearedToLand = false;
                        }
                        if(_display && disp) {
-                               //globals->get_ATC_display()->RegisterSingleMessage(trns);
                                pending_transmission = trns;
                                Transmit();
                        }
@@ -682,7 +681,6 @@ void FGTower::ProcessDownwindReport(TowerPlaneRec* t) {
                }
        }
        if(_display) {
-               //globals->get_ATC_display()->RegisterSingleMessage(trns);
                pending_transmission = trns;
                Transmit();
        }
@@ -716,7 +714,6 @@ void FGTower::ProcessRunwayVacatedReport(TowerPlaneRec* t) {
        }
        //cout << "trns = " << trns << '\n';
        if(_display) {
-               //globals->get_ATC_display()->RegisterSingleMessage(trns);
                pending_transmission = trns;
                Transmit();
        }
@@ -829,7 +826,6 @@ void FGTower::ClearHoldingPlane(TowerPlaneRec* t) {
                timeSinceLastDeparture = 0.0;
        }
        if(_display) {
-               //globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
                pending_transmission = trns;
                Transmit();
        }
@@ -2438,7 +2434,7 @@ string FGTower::GenText(const string& m, int c) {
                        //break;
                //}
        //}
-       if ( mes != "" ) return mes;
+       if ( mes[0] ) return mes;
        else return "No transmission found";
 }