X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIMultiplayer.hxx;h=4c8d50a001d086f237fc4d2ac8ed8f58076ac48b;hb=f7cd808f2313a8b35165b44cbf805f2d57e2c567;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..4c8d50a00 --- a/src/AIModel/AIMultiplayer.hxx +++ b/src/AIModel/AIMultiplayer.hxx @@ -32,19 +32,14 @@ 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 +59,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,11 +75,11 @@ 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; @@ -89,7 +87,7 @@ private: long mLastTimestamp; // Propertiies for tankers - SGPropertyNode* refuel_node; + SGPropertyNode_ptr refuel_node; bool isTanker; bool contact; // set if this tanker is within fuelling range };