X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIMultiplayer.hxx;h=748784995fd1caf4b0b41d89e8a574995fc260f8;hb=afcdbd3158503773644aa07dd86cd92d67946bd4;hp=7fec2d05779408fff27c72c1d348936019a1f55c;hpb=e48967cb1de18922fb148f05fe56966af917688f;p=flightgear.git diff --git a/src/AIModel/AIMultiplayer.hxx b/src/AIModel/AIMultiplayer.hxx old mode 100755 new mode 100644 index 7fec2d057..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,18 +74,18 @@ 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 + // Properties for tankers SGPropertyNode_ptr refuel_node; bool isTanker; bool contact; // set if this tanker is within fuelling range