]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/AIPlane.hxx
Catch sound exceptions at the earliest, report problem has an alert, and continue...
[flightgear.git] / src / ATC / AIPlane.hxx
index e6da8ded4d7124211506b3e4c5055bc357a68888..ed61205bcf2f79dae72cff53539392f8a6a7113c 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef _FG_AI_PLANE_HXX
 #define _FG_AI_PLANE_HXX
 
-#include <plib/sg.h>
-#include <plib/ssg.h>
 #include <simgear/math/point3d.hxx>
 #include <simgear/scene/model/model.hxx>
 
@@ -85,7 +83,7 @@ public:
        virtual LandingType GetLandingOption();
        
        // Return the callsign
-       inline string GetCallsign() {return plane.callsign;}
+       inline const string& GetCallsign() {return plane.callsign;}
 
 protected:
        PlaneRec plane;
@@ -120,9 +118,12 @@ protected:
        
        // Transmit regardless of other dialog on the channel eg emergency
        void ImmediateTransmit(int callback_code = 0);
+       
+       inline void SetTrack(double t) { _tgtTrack = t; _trackSet = true; }
+       inline void ClearTrack() { _trackSet = false; }
 
-    void Bank(double angle);
-    void LevelWings(void);
+    inline void Bank(double r) { _tgtRoll = r; }
+    inline void LevelWings(void) { _tgtRoll = 0.0; }
        
        virtual void ProcessCallback(int code);
        
@@ -142,17 +143,23 @@ private:
        // Outputs the transmission either on screen or as audio depending on user preference
        // The refname is a string to identify this sample to the sound manager
        // The repeating flag indicates whether the message should be repeated continuously or played once.
-       void Render(string refname, bool repeating);
+       void Render(const string& refname, bool repeating);
 
        // Cease rendering a transmission.
        // Requires the sound manager refname if audio, else "".
-       void NoRender(string refname);
+       void NoRender(const string& refname);
        
        // Rendering related stuff
        bool voice;                     // Flag - true if we are using voice
        bool playing;           // Indicates a message in progress      
        bool voiceOK;           // Flag - true if at least one voice has loaded OK
        FGATCVoice* vPtr;
+       
+       // Navigation
+       double _tgtTrack;       // Track to be following if _trackSet is true
+       bool _trackSet;         // Set true if tgtTrack is to be followed
+       double _tgtRoll;
+       bool _rollSuspended;    // Set true when a derived class has suspended AIPlane's roll control
 };
 
 #endif  // _FG_AI_PLANE_HXX