]> git.mxchange.org Git - flightgear.git/blobdiff - src/MultiPlayer/mpmessages.hxx
AircraftModel hacking for package support.
[flightgear.git] / src / MultiPlayer / mpmessages.hxx
index dded2b3e2175819b6fa1eef626e4f66b853c48ff..38e7fea58a524e096e262a875b18d176af111ce0 100644 (file)
@@ -141,7 +141,7 @@ struct FGExternalMotionData {
   // simulation time when this packet was generated
   double time;
   // the artificial lag the client should stay behind the average
-  // simulation time to arrival time diference
+  // simulation time to arrival time difference
   // FIXME: should be some 'per model' instead of 'per packet' property
   double lag;
   
@@ -164,8 +164,22 @@ struct FGExternalMotionData {
   // the earth centered frame
   SGVec3f angularAccel;
   
-  // The set of properties recieved for this timeslot
+  // The set of properties received for this timeslot
   std::vector<FGPropertyData*> properties;
+
+  ~FGExternalMotionData()
+  {
+      std::vector<FGPropertyData*>::const_iterator propIt;
+      std::vector<FGPropertyData*>::const_iterator propItEnd;
+      propIt = properties.begin();
+      propItEnd = properties.end();
+
+      while (propIt != propItEnd)
+      {
+        delete *propIt;
+        propIt++;
+      }
+  }
 };
 
 #endif