X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIMultiplayer.hxx;h=6b30685aab218708b006ed9ec69e49cdf19d5ff4;hb=afbc360eeded20d4447ab005ee0e234a43f068cd;hp=fed80cfdb2c11d569fb0cf8c2c3efcd0b61fa1d3;hpb=da6568ad50774e241d8157006a0b49baee2d8537;p=flightgear.git diff --git a/src/AIModel/AIMultiplayer.hxx b/src/AIModel/AIMultiplayer.hxx old mode 100755 new mode 100644 index fed80cfdb..6b30685aa --- a/src/AIModel/AIMultiplayer.hxx +++ b/src/AIModel/AIMultiplayer.hxx @@ -16,7 +16,7 @@ // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef _FG_AIMultiplayer_HXX #define _FG_AIMultiplayer_HXX @@ -31,20 +31,15 @@ class FGAIMultiplayer : public FGAIBase { public: FGAIMultiplayer(); virtual ~FGAIMultiplayer(); - - virtual bool init(); + + virtual bool init(bool search_in_AI_path=false); virtual void bind(); virtual void unbind(); virtual void update(double dt); - + void addMotionInfo(const FGExternalMotionData& motionInfo, long stamp); void setDoubleProperty(const std::string& prop, double val); - - void setCallSign(const string& callSign) - { mCallSign = callSign; } - const char* getCallSign(void) const - { return mCallSign.c_str(); } - + long getLastTimestamp(void) const { return mLastTimestamp; } @@ -71,22 +66,25 @@ private: // Automatic sorting of motion data according to its timestamp typedef std::map MotionInfo; MotionInfo mMotionInfo; - + // Map between the property id's from the multiplayers network packets // and the property nodes typedef std::map > PropertyMap; PropertyMap mPropertyMap; - std::string mCallSign; - double mTimeOffset; bool mTimeOffsetSet; - + /// Properties which are for now exposed for testing bool mAllowExtrapolation; double mLagAdjustSystemSpeed; long mLastTimestamp; + + // Propertiies for tankers + SGPropertyNode_ptr refuel_node; + bool isTanker; + bool contact; // set if this tanker is within fuelling range }; #endif // _FG_AIMultiplayer_HXX