X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIMultiplayer.hxx;h=748784995fd1caf4b0b41d89e8a574995fc260f8;hb=afcdbd3158503773644aa07dd86cd92d67946bd4;hp=3e10f87230a0d640fe1240019f2a80fe5c476e65;hpb=f5955a9cab55e6c4d977f26c5dc0783024a9e71e;p=flightgear.git diff --git a/src/AIModel/AIMultiplayer.hxx b/src/AIModel/AIMultiplayer.hxx old mode 100755 new mode 100644 index 3e10f8723..748784995 --- a/src/AIModel/AIMultiplayer.hxx +++ b/src/AIModel/AIMultiplayer.hxx @@ -32,19 +32,13 @@ 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 addMotionInfo(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; } @@ -64,6 +58,9 @@ public: void addPropertyId(unsigned id, const char* name) { mPropertyMap[id] = props->getNode(name, true); } + SGPropertyNode* getPropertyRoot() + { return props; } + virtual const char* getTypeString(void) const { return "multiplayer"; } private: @@ -77,19 +74,19 @@ private: typedef std::map > PropertyMap; PropertyMap mPropertyMap; - std::string mCallSign; - double mTimeOffset; bool mTimeOffsetSet; + double lastUpdateTime; + /// Properties which are for now exposed for testing bool mAllowExtrapolation; double mLagAdjustSystemSpeed; long mLastTimestamp; - // Propertiies for tankers - SGPropertyNode* refuel_node; + // Properties for tankers + SGPropertyNode_ptr refuel_node; bool isTanker; bool contact; // set if this tanker is within fuelling range };