Index: orxonox/trunk/src/util/track/track_manager.cc
===================================================================
--- orxonox/trunk/src/util/track/track_manager.cc	(revision 4489)
+++ orxonox/trunk/src/util/track/track_manager.cc	(revision 4496)
@@ -25,6 +25,9 @@
 #include "text_engine.h"
 #include "t_animation.h"
+#include "load_param.h"
+
+
+#include "tinyxml.h"
 #include "substring.h"
-#include "tinyxml.h"
 
 #include <stdarg.h>
@@ -409,44 +412,20 @@
   while( element != NULL)
     {
-      if( !strcmp( element->Value(), "Point"))
-	{
-	  container = element->FirstChild();
-	  if( container->ToText())
-	    {
-	      assert( container->Value() != NULL);
-	      if( sscanf( container->Value(), "%lf,%lf,%lf", &x, &y, &z) == 3)
-		{
-		  PRINTF(5)("Loaded Point: %lf,%lf,%lf (%s)\n", x, y, z, container->Value());
-		  addPoint( Vector( x, y, z));
-		}
-	      else
-		{
-		  PRINTF(0)("Invalid Point in Track (skipped)\n");
-		}			
-	    }
-	}
-      else if( !strcmp( element->Value(), "Duration"))
-	{
-	  container = element->FirstChild();
-	  if( container->ToText())
-	    {
-	      assert( container->Value() != NULL);
-	      if( sscanf( container->Value(), "%lf", &d) == 1)
-		{
-		  PRINTF(5)("Loaded Duration: %lf (%s)\n", d, container->Value());
-		  setDuration( d);
-		}
-	      else
-		{
-		  PRINTF(2)("Invalid Duration in Track (skipped)\n");
-		}			
-	    }
-	}
-      else if( !strcmp( element->Value(), "SavePoint"))
+      LoadParam<TrackManager>(element, "Point", this, &TrackManager::addPoint, true)
+	.describe("Adds a new Point to the currently selected TrackElement");
+
+      LoadParam<TrackManager>(element, "Duration", this, &TrackManager::setDuration, true)
+	.describe("Sets the Duration of the currently selected TrackElement");
+      
+      LoadParam<TrackManager>(element, "SavePoint", this, &TrackManager::setSavePoint, true);
+
+      /*
+      if( !strcmp( element->Value(), "SavePoint"))
 	{
 	  PRINTF(5)("Loaded Savepoint\n");
 	  setSavePoint();
 	}
-      else if( !strcmp( element->Value(), "Fork"))
+      */
+      if( !strcmp( element->Value(), "Fork"))
 	{
 	  container = element->FirstChild();
@@ -526,5 +505,5 @@
       newElem->startingTime = trackElem->endTime + trackElem->jumpTime;
       // adds the conection Point
-      this->addPoint(trackElem->curve->getNode(trackElem->curve->getNodeCount()),
+      this->addPointV(trackElem->curve->getNode(trackElem->curve->getNodeCount()),
 		     newElem);
       // add the new child to the childList.
@@ -600,4 +579,13 @@
 
 /**
+   \param duration the duration of the TrackElement
+   \see void TrackManager::setDuration(float duration, TrackElement* trackElem)
+*/
+void TrackManager::setDuration(float duration)
+{
+  this->setDuration(duration, NULL);
+}
+
+/**
    \brief Sets the duration of the current path in seconds.
    \param duration The duration in seconds.
@@ -615,8 +603,20 @@
 /**
    \brief adds a point to trackElem
+   \param x x coord
+   \param y y coord
+   \param z z coord
+   \param trackElem The TrackElement to add the Point to
+*/
+void TrackManager::addPoint(float x, float y, float z)
+{
+  this->addPointV(Vector(x,y,z));
+}
+
+/**
+   \brief adds a point to trackElem
    \param newPoint The point to add.
    \param trackElem The TrackElement to add the Point to
 */
-bool TrackManager::addPoint(Vector newPoint, TrackElement* trackElem)
+void TrackManager::addPointV(Vector newPoint, TrackElement* trackElem)
 {
   if (!trackElem)
@@ -653,4 +653,12 @@
   trackElem->nodeCount++;
   this->initChildren(1, trackElem);
+}
+
+/**
+   \todo this must be better
+*/
+void TrackManager::setSavePoint(int isLoadable)
+{
+  this->setSavePoint();
 }
 
@@ -946,7 +954,7 @@
 	  else
 	    {
-	      this->addPoint(tmpc2Point, tmpJoinElem);
-	      this->addPoint(tmpTangentPoint, tmpJoinElem);
-	      this->addPoint(tmpEndPoint, tmpJoinElem);
+	      this->addPointV(tmpc2Point, tmpJoinElem);
+	      this->addPointV(tmpTangentPoint, tmpJoinElem);
+	      this->addPointV(tmpEndPoint, tmpJoinElem);
 	      // time all other Joins
 	      tmpJoinElem->jumpTime = tmpLatestTime - tmpJoinElem->endTime;
Index: orxonox/trunk/src/util/track/track_manager.h
===================================================================
--- orxonox/trunk/src/util/track/track_manager.h	(revision 4489)
+++ orxonox/trunk/src/util/track/track_manager.h	(revision 4496)
@@ -151,7 +151,10 @@
   inline void setCurveType(CurveType curveType) { this->setCurveType (curveType, this->currentTrackElem);};
   void setCurveType(CurveType curveType, TrackElement* trackElem);
-  void setDuration(float duration, TrackElement* trackElem = NULL);
-  bool addPoint(Vector newPoint, TrackElement* trackElem = NULL);
+  void setDuration(float duration);
+  void setDuration(float duration, TrackElement* trackElem);
+  void addPoint(float x, float y, float z);
+  void addPointV(Vector newPoint, TrackElement* trackElem = NULL);
   int addHotPoint(Vector newPoint, TrackElement* trackElem = NULL);
+  void setSavePoint(int isLoadable);
   int setSavePoint(TrackElement* trackElem = NULL);
   void fork(unsigned int count, ...);
