Index: /orxonox/branches/physics/src/Makefile.am
===================================================================
--- /orxonox/branches/physics/src/Makefile.am	(revision 4222)
+++ /orxonox/branches/physics/src/Makefile.am	(revision 4223)
@@ -83,4 +83,5 @@
 		 lib/lang/base_object.cc \
 		 lib/util/ini_parser.cc \
+		 lib/util/substring.cc \
 		 util/common/list.cc \
 		 util/resource_manager.cc \
@@ -167,4 +168,5 @@
 		 util/physics/fields/twirl.h \
 		 lib/util/ini_parser.h \
+		 lib/util/substring.h \
 		 lib/math/vector.h \
 		 lib/math/curve.h \
Index: /orxonox/branches/physics/src/Makefile.in
===================================================================
--- /orxonox/branches/physics/src/Makefile.in	(revision 4222)
+++ /orxonox/branches/physics/src/Makefile.in	(revision 4223)
@@ -87,9 +87,10 @@
 	particle_system.$(OBJEXT) particle_emitter.$(OBJEXT) \
 	base_entity.$(OBJEXT) base_object.$(OBJEXT) \
-	ini_parser.$(OBJEXT) list.$(OBJEXT) resource_manager.$(OBJEXT) \
-	i_physics.$(OBJEXT) physics_engine.$(OBJEXT) \
-	physics_connection.$(OBJEXT) field.$(OBJEXT) gravity.$(OBJEXT) \
-	point_gravity.$(OBJEXT) twirl.$(OBJEXT) vector.$(OBJEXT) \
-	curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) tinyxml.$(OBJEXT) \
+	ini_parser.$(OBJEXT) substring.$(OBJEXT) list.$(OBJEXT) \
+	resource_manager.$(OBJEXT) i_physics.$(OBJEXT) \
+	physics_engine.$(OBJEXT) physics_connection.$(OBJEXT) \
+	field.$(OBJEXT) gravity.$(OBJEXT) point_gravity.$(OBJEXT) \
+	twirl.$(OBJEXT) vector.$(OBJEXT) curve.$(OBJEXT) \
+	glmenu_imagescreen.$(OBJEXT) tinyxml.$(OBJEXT) \
 	tinystr.$(OBJEXT) tinyxmlerror.$(OBJEXT) \
 	tinyxmlparser.$(OBJEXT) benchmark.$(OBJEXT)
@@ -143,5 +144,6 @@
 @AMDEP_TRUE@	./$(DEPDIR)/satellite.Po ./$(DEPDIR)/skybox.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/skysphere.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/terrain.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/story_entity.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/substring.Po ./$(DEPDIR)/terrain.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/test_bullet.Po ./$(DEPDIR)/test_gun.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/text_engine.Po ./$(DEPDIR)/texture.Po \
@@ -331,4 +333,5 @@
 		 lib/lang/base_object.cc \
 		 lib/util/ini_parser.cc \
+		 lib/util/substring.cc \
 		 util/common/list.cc \
 		 util/resource_manager.cc \
@@ -415,4 +418,5 @@
 		 util/physics/fields/twirl.h \
 		 lib/util/ini_parser.h \
+		 lib/util/substring.h \
 		 lib/math/vector.h \
 		 lib/math/curve.h \
@@ -468,7 +472,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/Makefile
+	  $(AUTOMAKE) --gnu  src/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -586,4 +590,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skysphere.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/substring.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terrain.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bullet.Po@am__quote@
@@ -1402,4 +1407,20 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ini_parser.obj `if test -f 'lib/util/ini_parser.cc'; then $(CYGPATH_W) 'lib/util/ini_parser.cc'; else $(CYGPATH_W) '$(srcdir)/lib/util/ini_parser.cc'; fi`
+
+substring.o: lib/util/substring.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT substring.o -MD -MP -MF "$(DEPDIR)/substring.Tpo" -c -o substring.o `test -f 'lib/util/substring.cc' || echo '$(srcdir)/'`lib/util/substring.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/substring.Tpo" "$(DEPDIR)/substring.Po"; else rm -f "$(DEPDIR)/substring.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/util/substring.cc' object='substring.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/substring.Po' tmpdepfile='$(DEPDIR)/substring.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o substring.o `test -f 'lib/util/substring.cc' || echo '$(srcdir)/'`lib/util/substring.cc
+
+substring.obj: lib/util/substring.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT substring.obj -MD -MP -MF "$(DEPDIR)/substring.Tpo" -c -o substring.obj `if test -f 'lib/util/substring.cc'; then $(CYGPATH_W) 'lib/util/substring.cc'; else $(CYGPATH_W) '$(srcdir)/lib/util/substring.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/substring.Tpo" "$(DEPDIR)/substring.Po"; else rm -f "$(DEPDIR)/substring.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/util/substring.cc' object='substring.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/substring.Po' tmpdepfile='$(DEPDIR)/substring.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o substring.obj `if test -f 'lib/util/substring.cc'; then $(CYGPATH_W) 'lib/util/substring.cc'; else $(CYGPATH_W) '$(srcdir)/lib/util/substring.cc'; fi`
 
 list.o: util/common/list.cc
Index: /orxonox/branches/physics/src/game_loader.cc
===================================================================
--- /orxonox/branches/physics/src/game_loader.cc	(revision 4222)
+++ /orxonox/branches/physics/src/game_loader.cc	(revision 4223)
@@ -74,16 +74,10 @@
    this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
 */
-ErrorMessage GameLoader::loadCampaign(char* name)
+ErrorMessage GameLoader::loadCampaign(const char* name)
 {
   ErrorMessage errorCode;
-  char* campaignName;
-  if (ResourceManager::isFile(name))
-    {
-      this->currentCampaign = this->fileToCampaign(name);
-    }
-  else
-    {
-      campaignName = new char[strlen(ResourceManager::getInstance()->getDataDir())+strlen(name)];
-      sprintf(campaignName, "%s%s", ResourceManager::getInstance()->getDataDir(), name);
+  char* campaignName = ResourceManager::getFullName(name);
+  if (campaignName)
+    {
       this->currentCampaign = this->fileToCampaign(campaignName);
       delete campaignName;
Index: /orxonox/branches/physics/src/game_loader.h
===================================================================
--- /orxonox/branches/physics/src/game_loader.h	(revision 4222)
+++ /orxonox/branches/physics/src/game_loader.h	(revision 4223)
@@ -39,5 +39,5 @@
 
   ErrorMessage init();
-  ErrorMessage loadCampaign(char* name);
+  ErrorMessage loadCampaign(const char* name);
   ErrorMessage start();
   ErrorMessage stop();
Index: /orxonox/branches/physics/src/lib/Makefile.in
===================================================================
--- /orxonox/branches/physics/src/lib/Makefile.in	(revision 4222)
+++ /orxonox/branches/physics/src/lib/Makefile.in	(revision 4223)
@@ -183,7 +183,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /orxonox/branches/physics/src/lib/graphics/Makefile.in
===================================================================
--- /orxonox/branches/physics/src/lib/graphics/Makefile.in	(revision 4222)
+++ /orxonox/branches/physics/src/lib/graphics/Makefile.in	(revision 4223)
@@ -177,7 +177,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/graphics/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/graphics/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /orxonox/branches/physics/src/lib/graphics/importer/Makefile.in
===================================================================
--- /orxonox/branches/physics/src/lib/graphics/importer/Makefile.in	(revision 4222)
+++ /orxonox/branches/physics/src/lib/graphics/importer/Makefile.in	(revision 4223)
@@ -235,7 +235,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /orxonox/branches/physics/src/lib/gui/Makefile.in
===================================================================
--- /orxonox/branches/physics/src/lib/gui/Makefile.in	(revision 4222)
+++ /orxonox/branches/physics/src/lib/gui/Makefile.in	(revision 4223)
@@ -179,7 +179,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/gui/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/gui/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /orxonox/branches/physics/src/lib/gui/console/Makefile.in
===================================================================
--- /orxonox/branches/physics/src/lib/gui/console/Makefile.in	(revision 4222)
+++ /orxonox/branches/physics/src/lib/gui/console/Makefile.in	(revision 4223)
@@ -205,7 +205,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/console/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/console/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/gui/console/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/gui/console/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /orxonox/branches/physics/src/lib/gui/gui/Makefile.in
===================================================================
--- /orxonox/branches/physics/src/lib/gui/gui/Makefile.in	(revision 4222)
+++ /orxonox/branches/physics/src/lib/gui/gui/Makefile.in	(revision 4223)
@@ -265,7 +265,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/gui/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/gui/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/lib/gui/gui/Makefile
+	  $(AUTOMAKE) --gnu  src/lib/gui/gui/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /orxonox/branches/physics/src/lib/util/substring.cc
===================================================================
--- /orxonox/branches/physics/src/lib/util/substring.cc	(revision 4222)
+++ /orxonox/branches/physics/src/lib/util/substring.cc	(revision 4223)
@@ -22,41 +22,44 @@
 #include "substring.h"
 
+#include <string.h>
+#include <assert.h>
+
 SubString::SubString( const char* string)
 {
-	n = 0;
+  n = 0;
 	
-	assert( string != NULL);
+  assert( string != NULL);
 	
-	for( int i = 0; i < strlen(string); i++) if( string[i] == ',') n++;
+  for( int i = 0; i < strlen(string); i++) if( string[i] == ',') n++;
 
-	n += 1;
+  n += 1;
 	
-	strings = new char*[n];
+  strings = new char*[n];
+
+  assert (strings != NULL);
 	
-	assert( strings != NULL);
+  int i = 0;
+  int l = 0;
 	
-	int i = 0;
-	int l = 0;
+  const char* offset = string;
+  char* end = strchr( string, ',');
+  while( end != NULL)
+    {
+      assert( i < n);
+      l = end - offset;
+      strings[i] = new char[l + 1];
+      assert( strings[i] != NULL);
+      strncpy( strings[i], offset, l);
+      strings[i][l] = 0;
+      i++;
+      end++;
+      offset = end;
+      end = strchr( offset, ',');
+    }
 	
-	const char* offset = string;
-	char* end = strchr( string, ',');
-	while( end != NULL)
-	{
-		assert( i < n);
-		l = end - offset;
-		strings[i] = new char[l + 1];
-		assert( strings[i] != NULL);
-		strncpy( strings[i], offset, l);
-		strings[i][l] = 0;
-		i++;
-		end++;
-		offset = end;
-		end = strchr( offset, ',');
-	}
-	
-	strings[i] = new char[l + 1];
-	l = strlen( offset);
-	strncpy( strings[i], offset, l);
-	strings[i][l] = 0;
+  strings[i] = new char[l + 1];
+  l = strlen( offset);
+  strncpy( strings[i], offset, l);
+  strings[i][l] = 0;
 }
 
@@ -66,10 +69,10 @@
 SubString::~SubString()
 {
-	for( int i = 0; i < n; i++)
-	{
-		delete strings[i];
-	}
+  for( int i = 0; i < n; i++)
+    {
+      delete strings[i];
+    }
 	
-	delete strings;
+  delete strings;
 }
 
@@ -78,7 +81,7 @@
    \returns the amount of substrings
 */
-int SubString::getN()
+int SubString::getCount()
 {
-	return n;
+  return n;
 }
 
@@ -90,5 +93,5 @@
 const char* SubString::getString( int i)
 {
-	if( i < n && i >= 0) return strings[i];
-	else return NULL;
+  if( i < n && i >= 0) return strings[i];
+  else return NULL;
 }
Index: /orxonox/branches/physics/src/lib/util/substring.h
===================================================================
--- /orxonox/branches/physics/src/lib/util/substring.h	(revision 4222)
+++ /orxonox/branches/physics/src/lib/util/substring.h	(revision 4223)
@@ -1,5 +1,5 @@
 /*! 
-    \file substring.h
-    \brief a small class to get the parts of a string separated by commas
+  \file substring.h
+  \brief a small class to get the parts of a string separated by commas
 */
 
@@ -7,19 +7,17 @@
 #define _SUBSTRING_H
 
-#include "stdincl.h"
-
 class SubString
 {
-	public:
+ public:
 	
-		SubString( const char* string);
-		~SubString();
+  SubString( const char* string);
+  ~SubString();
 		
-		int getN();
-		const char* getString( int i);
+  int getCount();
+  const char* getString( int i);
 		
-	private:
-		char** strings;
-		int n;
+ private:
+  char** strings;
+  int n;
 };
 
Index: /orxonox/branches/physics/src/story_entities/world.cc
===================================================================
--- /orxonox/branches/physics/src/story_entities/world.cc	(revision 4222)
+++ /orxonox/branches/physics/src/story_entities/world.cc	(revision 4223)
@@ -365,5 +365,5 @@
   
   // find Track
-  /*element = root->FirstChildElement( "Track");
+  element = root->FirstChildElement( "Track");
   if( element == NULL)
     {
@@ -375,8 +375,8 @@
       PRINTF0("============>>>>>>>>>>>>>>>>Loading Track\n");
 
-      trackManager->loadTrack( element);
+      trackManager->load( element);
       trackManager->finalize();
       PRINTF0("============>>>>>>>>>>>>>>>>Done loading Track\n");
-    }*/
+    }
   
   // free the XML data
@@ -395,5 +395,5 @@
   
   // stuff beyond this point remains to be loaded properly
- 
+  /*
       // initializing the TrackManager
   this->trackManager = TrackManager::getInstance();
@@ -403,5 +403,5 @@
       trackManager->addPoint(Vector(250, -35, 5));
       trackManager->addPoint(Vector(320,-33,-.55));
-      trackManager->setDuration(2);
+      trackManager->setDuration(1);
       trackManager->setSavePoint();
 
@@ -410,9 +410,8 @@
       trackManager->addPoint(Vector(550, 20, -10));
       trackManager->addPoint(Vector(570, 20, -10));
-      trackManager->setDuration(5);
+      trackManager->setDuration(2);
       
-      int fork11, fork12;
-      trackManager->fork(2, &fork11, &fork12);
-      trackManager->workOn(fork11);
+      trackManager->forkS("testFork1,testFork2");
+      trackManager->workOn("testFork1");
       trackManager->addPoint(Vector(640, 25, -30));
       trackManager->addPoint(Vector(700, 40, -120));
@@ -423,7 +422,7 @@
       trackManager->addPoint(Vector(1050, 65, -10));
       trackManager->addPoint(Vector(1100, 65, -20));
-      trackManager->setDuration(10);
-
-      trackManager->workOn(fork12);
+      trackManager->setDuration(4);
+
+      trackManager->workOn("testFork2");
       trackManager->addPoint(Vector(640, 25, 20));
       trackManager->addPoint(Vector(670, 50, 120));
@@ -435,10 +434,9 @@
       trackManager->addPoint(Vector(970, 24, 40));
       trackManager->addPoint(Vector(1000, 40, -7));
-      trackManager->setDuration(10);
+      trackManager->setDuration(4);
       
-
-      trackManager->join(2, fork11, fork12);
-
-      trackManager->workOn(5);
+      
+      trackManager->joinS("testFork1,testFork2");
+	
       trackManager->addPoint(Vector(1200, 60, -50));
       trackManager->addPoint(Vector(1300, 50, -50));
@@ -451,5 +449,5 @@
       trackManager->addPoint(Vector(1800, 100, -40));
       trackManager->setDuration(10);
-
+  */
       trackManager->finalize();
 
@@ -483,5 +481,5 @@
   glNewList (objectList, GL_COMPILE);
   
-  //  trackManager->drawGraph(.01);
+  trackManager->drawGraph(.01);
   trackManager->debug(2);
   glEndList();
Index: /orxonox/branches/physics/src/subprojects/Makefile.in
===================================================================
--- /orxonox/branches/physics/src/subprojects/Makefile.in	(revision 4222)
+++ /orxonox/branches/physics/src/subprojects/Makefile.in	(revision 4223)
@@ -177,7 +177,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/subprojects/Makefile
+	  $(AUTOMAKE) --gnu  src/subprojects/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /orxonox/branches/physics/src/subprojects/testmain/Makefile.in
===================================================================
--- /orxonox/branches/physics/src/subprojects/testmain/Makefile.in	(revision 4222)
+++ /orxonox/branches/physics/src/subprojects/testmain/Makefile.in	(revision 4223)
@@ -197,7 +197,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/testmain/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/testmain/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  src/subprojects/testmain/Makefile
+	  $(AUTOMAKE) --gnu  src/subprojects/testmain/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /orxonox/branches/physics/src/track_manager.cc
===================================================================
--- /orxonox/branches/physics/src/track_manager.cc	(revision 4222)
+++ /orxonox/branches/physics/src/track_manager.cc	(revision 4223)
@@ -25,4 +25,5 @@
 #include "text_engine.h"
 #include "t_animation.h"
+#include "substring.h"
 
 #include <stdarg.h>
@@ -401,8 +402,87 @@
    \brief loads a trackElement from a TiXmlElement
    \param root the TiXmlElement to load the Data from
-
 */
 bool TrackManager::load( TiXmlElement* root)
 {
+  TiXmlElement* element;
+  TiXmlNode* container;
+  double x, y, z, d;
+	
+  element = root->FirstChildElement();
+	
+  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(0)("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"))
+	{
+	  PRINTF(5)("Loaded Savepoint\n");
+	  setSavePoint();
+	}
+      else if( !strcmp( element->Value(), "Fork"))
+	{
+	  container = element->FirstChild();
+	  if( container->ToText())
+	    {
+	      assert( container->Value() != NULL);
+	      PRINTF(4)("Loaded Fork: %s\n", container->Value());
+	      forkS(container->Value());
+	    }
+	}
+      else if( !strcmp( element->Value(), "Join"))
+	{
+	  container = element->FirstChild();
+	  if( container->ToText())
+	    {
+	      assert( container->Value() != NULL);
+	      PRINTF0("Loaded Join: %s\n", container->Value());
+	      joinS(container->Value());
+	    }
+	}
+      else if( !strcmp( element->Value(), "WorkOn"))
+	{
+	  container = element->FirstChild();
+	  if( container->ToText())
+	    {
+	      assert( container->Value() != NULL);
+	      PRINTF(4)("Loaded WorkOn: %s\n", container->Value());
+	      workOn( container->Value());
+	    }
+	}
+		
+      element = element->NextSiblingElement();
+    }
 
 }
@@ -620,5 +700,5 @@
 /**
    \brief adds some interessting non-linear movments through the level.
-   \param count The Count of childrens the current HotPoint will have.
+   \param count The Count of children the fork will produce
 
    If no HotPoint was defined the last added Point will be rendered into a fork. \n
@@ -628,5 +708,5 @@
 {
   int* trackIDs = new int[count];
-  this->forkV(count, trackIDs);
+  this->forkV(count, trackIDs, NULL);
   va_list ID;
   va_start (ID, count);
@@ -640,11 +720,47 @@
 
 /**
+   \param string the String to parse.
+   \see TrackManager::fork(unsigned int count, ...)
+
+   does the same as fork, but has an array of strings as an input.
+*/
+void TrackManager::forkS(unsigned int count, ...)
+{
+  int* trackIDs = new int[count];
+  this->forkV(count, trackIDs, NULL);
+  va_list name;
+  va_start (name, count);
+  for(int i = 0; i < count; i++)
+    {
+      this->firstTrackElem->findByID(trackIDs[i])->setName(va_arg(name, const char*));
+    }
+  va_end(name);  
+  delete []trackIDs;
+}
+
+/**
+   \see TrackManager::fork(unsigned int count, ...)
+*/
+void TrackManager::forkS(const char* forkString)
+{
+  SubString strings(forkString);
+
+  int* trackIDs = new int[strings.getCount()];
+  this->forkV(strings.getCount(), trackIDs, NULL);
+
+  for(int i = 0; i < strings.getCount(); i++)
+    {
+      this->firstTrackElem->findByID(trackIDs[i])->setName(strings.getString(i));
+    }  
+}
+
+/**
    \brief adds some interessting non-linear movments through the level.
    \param count The Count of childrens the current HotPoint will have.
    \param trackIDs A Pointer to an Array of ints which will hold the trackID's (the user will have to reserve space for this).
-   \param trackElem The TrackElement to appy this to. (if NULL chose this->currentTrackElement)
+   \param trackElem The TrackElement to appy this to. (if NULL choose this->currentTrackElement)
    \see TrackManager::fork(unsigned int count, ...)
 */
-void TrackManager::forkV(unsigned int count, int* trackIDs, TrackElement* trackElem)
+void TrackManager::forkV(unsigned int count, int* trackIDs, char** trackNames, TrackElement* trackElem)
 {
   if (!trackElem)
@@ -738,10 +854,10 @@
    \brief Joins some Tracks together again.
    \param count The count of trackElements to join
-
    \see void TrackManager::join(unsigned int count, ...)
+
    The difference to void TrackManager::join(unsigned int count, ...) is, that this function takes
    the Names of the TrackElements as inputs and not their ID
 */
-void TrackManager::joinc(unsigned int count, ...)
+void TrackManager::joinS(unsigned int count, ...)
 {
   int* trackIDs = new int [count];
@@ -750,5 +866,5 @@
   for(int i = 0; i < count; i++)
     {
-      char* name = va_arg (NAME, char*);
+      const char* name = va_arg (NAME, char*);
       TrackElement* tmpElem = this->firstTrackElem->findByName(name);
       if (tmpElem)
@@ -762,4 +878,26 @@
 }
 
+/**
+   \see void TrackManager::join(unsigned int count, ...)
+*/
+void TrackManager::joinS(const char* joinString)
+{
+  SubString strings(joinString);
+
+  int* trackIDs = new int[strings.getCount()];
+  this->joinV(strings.getCount(), trackIDs);
+
+  for(int i = 0; i < strings.getCount(); i++)
+    {
+      TrackElement* tmpElem = this->firstTrackElem->findByName(strings.getString(i));
+      if (tmpElem)
+	trackIDs[i] = tmpElem->ID;
+      else
+	PRINTF(1)("Trying to join a Track, of which the name does not exist: %s\n", strings.getString(i));
+    }
+
+  this->joinV(strings.getCount(), trackIDs);
+  delete []trackIDs;
+}
 
 /**
@@ -777,5 +915,5 @@
     if (!this->firstTrackElem->findByID(trackIDs[i]))
       {
-	PRINTF(1)("Error trying to Connect Paths that do not exist yet: %d\n Not Joining Anything", trackIDs[i]);
+	PRINTF(1)("Trying to Connect Paths that do not exist yet: %d\n Not Joining Anything\n", trackIDs[i]);
 	return;
       }
Index: /orxonox/branches/physics/src/track_manager.h
===================================================================
--- /orxonox/branches/physics/src/track_manager.h	(revision 4222)
+++ /orxonox/branches/physics/src/track_manager.h	(revision 4223)
@@ -167,9 +167,12 @@
   int setSavePoint(TrackElement* trackElem = NULL);
   void fork(unsigned int count, ...);
-  void forkV(unsigned int count, int* trackIDs, TrackElement* trackElem = NULL);
+  void forkS(unsigned int count, ...);
+  void forkS(const char* forkString);
+  void forkV(unsigned int count, int* trackIDs, char** trackNames, TrackElement* trackElem = NULL);
   void condition(unsigned int trackID, CONDITION cond, void* subject);
   void condition(CONDITION cond, void* subject, TrackElement* trackElem = NULL);
   void join(unsigned int count, ...);
-  void joinc(unsigned int count, ...);
+  void joinS(const char* joinString);
+  void joinS(unsigned int cound, ...);
   void joinV(unsigned int count, int* trackIDs);
   void finalize(void);
Index: /orxonox/branches/physics/src/util/resource_manager.cc
===================================================================
--- /orxonox/branches/physics/src/util/resource_manager.cc	(revision 4222)
+++ /orxonox/branches/physics/src/util/resource_manager.cc	(revision 4223)
@@ -648,5 +648,6 @@
 char* ResourceManager::getFullName(const char* fileName)
 {
-  char* retName = new char[strlen(ResourceManager::getInstance()->getDataDir()) + strlen(fileName)+1];
+  char* retName = new char[strlen(ResourceManager::getInstance()->getDataDir())
+			   + strlen(fileName) + 1];
   sprintf(retName, "%s%s", ResourceManager::getInstance()->getDataDir(), fileName);
   if (ResourceManager::isFile(retName))
