]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/ATC.hxx
Multiplayer client/server system -- MessageBuf class and test harness complete
[flightgear.git] / src / ATC / ATC.hxx
index ca6689d36b5d709a294f3fb54af84b754c93379b..8c7210dc236a7a6aff2ee21df5588879634de1e8 100644 (file)
@@ -95,6 +95,7 @@ struct RunwayDetails {
        double length;  // In *METERS*
        double width;   // ditto
        string rwyID;
+       int patternDirection;   // -1 for left, 1 for right
 };
 
 ostream& operator << (ostream& os, atc_type atc);
@@ -126,6 +127,9 @@ public:
        // Indicate that this instance should not output to the display
        virtual void SetNoDisplay();
        
+       // Generate the text of a message from its parameters and the current context.
+       virtual string GenText(const string& m, int c);
+       
        // Returns true if OK to transmit on this frequency
        inline bool GetFreqClear() { return freqClear; }
        // Indicate that the frequency is in use
@@ -242,15 +246,15 @@ operator >> ( istream& fin, ATCData& a )
        
        a.name = "";
        fin >> ch;
-       a.name += ch;
+       if(ch != '"') a.name += ch;
        while(1) {
                //in >> noskipws
                fin.unsetf(ios::skipws);
                fin >> ch;
-               a.name += ch;
                if((ch == '"') || (ch == 0x0A)) {
                        break;
                }   // we shouldn't need the 0x0A but it makes a nice safely in case someone leaves off the "
+               a.name += ch;
        }
        fin.setf(ios::skipws);
        //cout << "Comm name = " << a.name << '\n';