]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/atis.cxx
Roy Vegard Ovesen:
[flightgear.git] / src / ATC / atis.cxx
index 4c56b23a44234ca177e7bb5189c10fe89675907f..ff0da5767891b196127945c178c05e77cad32625 100644 (file)
@@ -54,8 +54,6 @@ SG_USING_STD(cout);
 #include "ATCmgr.hxx"
 
 FGATIS::FGATIS() :
-       display(false),
-       displaying(false),
        transmission(""),
        trans_ident(""),
        atis_failed(false),
@@ -64,6 +62,7 @@ FGATIS::FGATIS() :
 {
        vPtr = globals->get_ATC_mgr()->GetVoicePointer(ATIS);
        voiceOK = (vPtr == NULL ? false : true);
+       _type = ATIS;
 }
 
 FGATIS::~FGATIS() {
@@ -71,8 +70,8 @@ FGATIS::~FGATIS() {
 
 // Main update function - checks whether we are displaying or not the correct message.
 void FGATIS::Update(double dt) {
-       if(display) {
-               if(displaying) {
+       if(_display) {
+               if(_displaying) {
                        // Check if we need to update the message
                        // - basically every hour and if the weather changes significantly at the station
                        //globals->get_ATC_display()->ChangeRepeatingMessage(transmission);
@@ -81,14 +80,14 @@ void FGATIS::Update(double dt) {
                        UpdateTransmission();
                        //cout << "ATIS.CXX - calling ATCMgr to render transmission..." << endl;
                        Render(transmission, refname, true);
-                       displaying = true;
+                       _displaying = true;
                }
        } else {
                // We shouldn't be displaying
-               if(displaying) {
+               if(_displaying) {
                        //cout << "ATIS.CXX - calling NoRender()..." << endl;
                        NoRender(refname);
-                       displaying = false;
+                       _displaying = false;
                }
        }
 }