]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIManager.hxx
Clear chat messages when an aircraft becomes inactive in the property tree.
[flightgear.git] / src / AIModel / AIManager.hxx
index 17959776984fcd46293ddf719640d43a56204e5a..2bcd4a541b25248251540c3fc54cf3f7e7e57d74 100644 (file)
@@ -52,20 +52,24 @@ public:
 
     ai_list_type ai_list;
 
-    inline const list <SGSharedPtr<FGAIBase> >& get_ai_list() const { return ai_list; }
+    inline const list <SGSharedPtr<FGAIBase> >& get_ai_list() const {
+        SG_LOG(SG_GENERAL, SG_DEBUG, "AI Manager: AI model return list size " << ai_list.size());
+        return ai_list;
+    }
 
     FGAIManager();
     ~FGAIManager();
 
     void init();
+    void postinit();
     void reinit();
     void bind();
     void unbind();
     void update(double dt);
-
     void attach(SGSharedPtr<FGAIBase> model);
 
     void destroyObject( int ID );
+    const FGAIBase *calcCollision(double alt, double lat, double lon, double fuse_range);
 
     inline double get_user_latitude() const { return user_latitude; }
     inline double get_user_longitude() const { return user_longitude; }
@@ -92,6 +96,8 @@ private:
     int mNumAiTypeModels[FGAIBase::MAX_OBJECTS];
     int mNumAiModels;
 
+    double calcRange(double lat, double lon, double lat2, double lon2)const;
+
     SGPropertyNode_ptr root;
     SGPropertyNode_ptr wind_from_down_node;
     SGPropertyNode_ptr user_latitude_node;
@@ -101,10 +107,8 @@ private:
     SGPropertyNode_ptr user_pitch_node;
     SGPropertyNode_ptr user_yaw_node;
     SGPropertyNode_ptr user_speed_node;
-    SGPropertyNode_ptr wind_from_east_node ;
-    SGPropertyNode_ptr wind_from_north_node ;
-
-    string scenario_filename;
+    SGPropertyNode_ptr wind_from_east_node;
+    SGPropertyNode_ptr wind_from_north_node;
 
     double user_latitude;
     double user_longitude;
@@ -116,6 +120,7 @@ private:
     double wind_from_east;
     double wind_from_north;
     double _dt;
+
     void fetchUserState( void );
 
     // used by thermals