Index: orxonox/trunk/src/util/loading/game_loader.cc
===================================================================
--- orxonox/trunk/src/util/loading/game_loader.cc	(revision 4495)
+++ orxonox/trunk/src/util/loading/game_loader.cc	(revision 4496)
@@ -252,5 +252,5 @@
   // free the XML data
   delete XMLDoc;
-	
+
   return c;
 }
Index: orxonox/trunk/src/util/loading/load_param.cc
===================================================================
--- orxonox/trunk/src/util/loading/load_param.cc	(revision 4495)
+++ orxonox/trunk/src/util/loading/load_param.cc	(revision 4496)
@@ -26,9 +26,26 @@
    \param paramName: The name of the parameter loaded.
    \param paramCount: how many parameters this loading-function takes
+   \param multi: if false LoadParam assumes only one occurence of this parameter in root, if true it assumes multiple occurences.
    \param ...: the parameter information
 */
-BaseLoadParam::BaseLoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName, int paramCount, ...)
-{
-  this->loadString = grabParameter(root, paramName);
+BaseLoadParam::BaseLoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName,
+			     int paramCount, bool multi, ...)
+{
+  this->loadString = NULL;
+
+  if (likely(!multi))
+    this->loadString = grabParameter(root, paramName);
+  else
+    {
+      printf("paramName:::::%s\n", root->Value());
+      if (!strcmp(root->Value(), paramName))
+	{
+	  const TiXmlNode* val = root->FirstChild();
+	  if( val->ToText())
+	    this->loadString = val->Value();
+	}
+    }
+  if (loadString)
+    printf("%s\n", loadString);
 
   this->paramDesc = NULL;
@@ -43,5 +60,5 @@
 
       va_list types;
-      va_start (types, paramCount);
+      va_start (types, multi);
       for(int i = 0; i < paramCount; i++)
 	{
Index: orxonox/trunk/src/util/loading/load_param.h
===================================================================
--- orxonox/trunk/src/util/loading/load_param.h	(revision 4495)
+++ orxonox/trunk/src/util/loading/load_param.h	(revision 4496)
@@ -73,6 +73,6 @@
 */
 #define LoadParam1(type1) \
- LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE)) \
-   : BaseLoadParam(root, pt2Object, paramName, 1, type1##_NAME)		\
+ LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE), bool multi = false) \
+   : BaseLoadParam(root, pt2Object, paramName, 1, multi, type1##_NAME)		\
     { \
       if (loadString != NULL && root != NULL) \
@@ -90,6 +90,6 @@
 */
 #define LoadParam2(type1, type2) \
- LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE)) \
-   : BaseLoadParam(root, pt2Object, paramName, 2, type1##_NAME, type2##_NAME) \
+ LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE), bool multi = false) \
+   : BaseLoadParam(root, pt2Object, paramName, 2, multi, type1##_NAME, type2##_NAME) \
     { \
       if (loadString != NULL && root != NULL) \
@@ -115,6 +115,6 @@
 */
 #define LoadParam3(type1, type2, type3) \
- LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE))\
-   : BaseLoadParam(root, pt2Object, paramName, 3, type1##_NAME, type2##_NAME, type3##_NAME) \
+ LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE), bool multi = false)\
+   : BaseLoadParam(root, pt2Object, paramName, 3, multi, type1##_NAME, type2##_NAME, type3##_NAME) \
     { \
       if (loadString != NULL && root != NULL) \
@@ -141,6 +141,6 @@
 */
 #define LoadParam4(type1, type2, type3, type4) \
- LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE)) \
-   : BaseLoadParam(root, pt2Object, paramName, 4, type1##_NAME, type2##_NAME, type3##_NAME, type2##_NAME, type4##_NAME) \
+ LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE), bool multi = false) \
+   : BaseLoadParam(root, pt2Object, paramName, 4, multi, type1##_NAME, type2##_NAME, type3##_NAME, type2##_NAME, type4##_NAME) \
     { \
       if (loadString != NULL && root != NULL) \
@@ -168,6 +168,6 @@
 */
 #define LoadParam5(type1, type2, type3, type4, type5) \
- LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE, type5##_TYPE)) \
-   : BaseLoadParam(root, pt2Object, paramName, 5, type1##_NAME, type2##_NAME, type3##_NAME, type2##_NAME, type4##_NAME, type5##_NAME) \
+ LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE, type5##_TYPE), bool multi = false) \
+   : BaseLoadParam(root, pt2Object, paramName, 5, multi, type1##_NAME, type2##_NAME, type3##_NAME, type2##_NAME, type4##_NAME, type5##_NAME) \
     { \
       if (loadString != NULL && root != NULL) \
@@ -221,8 +221,8 @@
 
  private:
-  static bool                         parametersDescription;  //!< if parameter-description should be enabled.
-  static tList<LoadClassDescription>* classList;              //!< a list, that holds all the loadable classes. (after one instance has been loaded)
-  char*                               className;              //!< name of the class
-  tList<LoadParamDescription>*        paramList;              //!< List of parameters this class knows.
+  static bool                          parametersDescription;  //!< if parameter-description should be enabled.
+  static tList<LoadClassDescription>*  classList;              //!< a list, that holds all the loadable classes. (after one instance has been loaded)
+  char*                                className;              //!< name of the class
+  tList<LoadParamDescription>*         paramList;              //!< List of parameters this class knows.
 };
 
@@ -234,5 +234,5 @@
 
  protected:
-  BaseLoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName, int paramCount, ...);
+  BaseLoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName, int paramCount, bool multi, ...);
 
  protected:
Index: orxonox/trunk/src/util/track/track_manager.cc
===================================================================
--- orxonox/trunk/src/util/track/track_manager.cc	(revision 4495)
+++ 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 4495)
+++ 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, ...);
