]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Hitch.hpp
Fix for bug 1304 - crash loading XML route
[flightgear.git] / src / FDM / YASim / Hitch.hpp
old mode 100755 (executable)
new mode 100644 (file)
index 0536805..2badeb1
@@ -1,6 +1,11 @@
 #ifndef _HITCH_HPP
 #define _HITCH_HPP
-class SGPropertyNode;
+
+#include <string>
+
+#include <Main/fg_props.hxx>
+#include <simgear/props/tiedpropertylist.hxx>
+
 namespace yasim {
 
 class Ground;
@@ -46,7 +51,7 @@ public:
 
     void integrate (float dt);
 
-    const char *getConnectedPropertyNode() const;
+    std::string getConnectedPropertyNode() const;
     void setConnectedPropertyNode(const char *nodename);
 
 private:
@@ -72,12 +77,12 @@ private:
     float _forceMagnitude;
     double _global_ground[4];
     float _global_vel[3];
-    char _name[256];
+    //char _name[256];
     State* _state;
     float _dist;
     float _timeLagCorrectedDist;
-    SGPropertyNode *_towEndNode;
-    const char *_towEndPropertyName;
+    SGPropertyNode_ptr _towEndNode;
+    //const char *_towEndPropertyName;
     bool _towEndIsConnectedToProperty;
     bool _nodeIsMultiplayer;
     bool _nodeIsAiAircraft;
@@ -102,10 +107,12 @@ private:
     float _mp_force[3];
     bool _mp_is_slave;
     bool _mp_open_last_state;
-    
+
     bool _displayed_len_lower_dist_message;
     bool _last_wish;
 
+    SGPropertyNode_ptr _node;
+    simgear::TiedPropertyList _tiedProperties;
 };
 
 }; // namespace yasim