Index: orxonox/branches/trackManager/src/Makefile.am
===================================================================
--- orxonox/branches/trackManager/src/Makefile.am	(revision 3432)
+++ orxonox/branches/trackManager/src/Makefile.am	(revision 3463)
@@ -31,4 +31,5 @@
 		 p_node.cc \
 		 null_parent.cc \
+		 track_node.cc \
 		 base_object.cc \
 		 helper_parent.cc \
@@ -37,5 +38,5 @@
 		 curve.cc \
 		 glmenu_imagescreen.cc \
-		 skysphere.cc
+		 skysphere.cc 
 
 noinst_HEADERS = ability.h \
Index: orxonox/branches/trackManager/src/Makefile.in
===================================================================
--- orxonox/branches/trackManager/src/Makefile.in	(revision 3432)
+++ orxonox/branches/trackManager/src/Makefile.in	(revision 3463)
@@ -61,8 +61,8 @@
 	objModel.$(OBJEXT) array.$(OBJEXT) material.$(OBJEXT) \
 	texture.$(OBJEXT) list.$(OBJEXT) p_node.$(OBJEXT) \
-	null_parent.$(OBJEXT) base_object.$(OBJEXT) \
-	helper_parent.$(OBJEXT) track_manager.$(OBJEXT) \
-	matrix.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) \
-	skysphere.$(OBJEXT)
+	null_parent.$(OBJEXT) track_node.$(OBJEXT) \
+	base_object.$(OBJEXT) helper_parent.$(OBJEXT) \
+	track_manager.$(OBJEXT) matrix.$(OBJEXT) curve.$(OBJEXT) \
+	glmenu_imagescreen.$(OBJEXT) skysphere.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
 orxonox_LDADD = $(LDADD)
@@ -87,5 +87,6 @@
 @AMDEP_TRUE@	./$(DEPDIR)/player.Po ./$(DEPDIR)/skysphere.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/texture.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/track_manager.Po ./$(DEPDIR)/vector.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/track_manager.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/track_node.Po ./$(DEPDIR)/vector.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/world.Po ./$(DEPDIR)/world_entity.Po
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
@@ -240,4 +241,5 @@
 		 p_node.cc \
 		 null_parent.cc \
+		 track_node.cc \
 		 base_object.cc \
 		 helper_parent.cc \
@@ -246,5 +248,5 @@
 		 curve.cc \
 		 glmenu_imagescreen.cc \
-		 skysphere.cc
+		 skysphere.cc 
 
 noinst_HEADERS = ability.h \
@@ -396,4 +398,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_manager.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_node.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world.Po@am__quote@
Index: orxonox/branches/trackManager/src/track_manager.cc
===================================================================
--- orxonox/branches/trackManager/src/track_manager.cc	(revision 3432)
+++ orxonox/branches/trackManager/src/track_manager.cc	(revision 3463)
@@ -88,4 +88,22 @@
 
 
+/**
+   \brief checks if there are any BackLoops in the Track
+   \param trackElem the trackElement to check about
+   it simply does this by looking if the current trackElem is found again somewhere else in the Track
+*/
+bool TrackElement::backLoopCheck(TrackElement* trackElem)
+{
+  if (this->childCount == 0)
+    return true;
+  else
+    {
+      for (int i = 0; i < this->childCount; i++)
+	if(!this->children[i]->backLoopCheck(trackElem))
+	  return false;
+      
+      return true;
+    }
+}
 
 
@@ -137,8 +155,8 @@
 TrackManager* TrackManager::getInstance(void) 
 {
-  if (singletonRef)
-    return singletonRef;
+  if (TrackManager::singletonRef)
+    return TrackManager::singletonRef;
   else
-    return singletonRef = new TrackManager();
+    return TrackManager::singletonRef = new TrackManager();
 }
 
@@ -370,4 +388,9 @@
 {
   printf("Joining %d tracks and merging to Track %d\n", count, trackIDs[0]);
+
+  // checking if there is a back-loop-connection and ERROR if it is.
+  TrackElement* tmpTrackElem = this->findTrackElementByID(trackIDs[0]);
+  if (!tmpTrackElem->backLoopCheck(tmpTrackElem))
+    PRINTF(1)("Backloop connection detected at joining trackElements\n");
 
   // chanching work-on to temporary value. going back at the end.
Index: orxonox/branches/trackManager/src/track_manager.h
===================================================================
--- orxonox/branches/trackManager/src/track_manager.h	(revision 3432)
+++ orxonox/branches/trackManager/src/track_manager.h	(revision 3463)
@@ -35,4 +35,5 @@
 
   TrackElement* findByID(unsigned int trackID);
+  bool backLoopCheck(TrackElement* trackElem);
 
   bool isFresh;              //!< If no Points where added until now
Index: orxonox/branches/trackManager/src/track_node.cc
===================================================================
--- orxonox/branches/trackManager/src/track_node.cc	(revision 3463)
+++ orxonox/branches/trackManager/src/track_node.cc	(revision 3463)
@@ -0,0 +1,97 @@
+
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+*/
+
+
+#include "track_node.h"
+
+#include "null_parent.h"
+
+#include "track_manager.h"
+
+using namespace std;
+
+TrackNode* TrackNode::singletonRef = 0;
+
+TrackNode* TrackNode::getInstance ()
+{
+  if (singletonRef == NULL)
+    singletonRef = new TrackNode ();
+  return singletonRef;
+}
+
+/**
+   \brief standard constructor
+
+   \todo this constructor is not jet implemented - do it
+*/
+TrackNode::TrackNode () 
+{
+  this->setParent(NullParent::getInstance());
+  this->trackManager = TrackManager::getInstance();
+  this->mode = ALL;
+}
+
+
+TrackNode::TrackNode (Vector* absCoordinate)
+{
+  this->parent = NullParent::getInstance();
+  this->trackManager = TrackManager::getInstance();
+  this->mode = ALL;
+  this->absCoordinate = *absCoordinate;
+}
+
+
+/**
+   \brief standard deconstructor
+
+   \todo this deconstructor is not jet implemented - do it
+*/
+TrackNode::~TrackNode () 
+{
+  singletonRef = NULL;
+}
+
+/**
+   \brief updates the absCoordinate/absDirection
+
+   this is used to go through the parent-tree to update all the absolute coordinates
+   and directions. this update should be done by the engine, so you don't have to 
+   worry, normaly...
+*/
+void TrackNode::update (float timeStamp)
+{
+  this->absCoordinate = trackManager->calcPos();
+  this->absDirection = Quaternion(trackManager->calcDir(), Vector(0,1,0));
+  
+  PNode* pn = this->children->enumerate ();
+  while( pn != NULL) 
+    { 
+      /* if this node has changed, make sure, that all children are updated also */
+      if( this->bRelCoorChanged || this->bAbsCoorChanged)
+	pn->parentCoorChanged ();
+      if( this->bRelDirChanged || this->bAbsDirChanged)
+	pn->parentDirChanged ();
+      pn->update (timeStamp);
+      pn = this->children->nextElement ();
+    }
+
+  this->timeStamp = timeStamp;
+  this->bRelCoorChanged = false;
+  this->bAbsCoorChanged = false;
+  this->bRelDirChanged = false;
+  this->bAbsDirChanged = false;
+}
Index: orxonox/branches/trackManager/src/track_node.h
===================================================================
--- orxonox/branches/trackManager/src/track_node.h	(revision 3463)
+++ orxonox/branches/trackManager/src/track_node.h	(revision 3463)
@@ -0,0 +1,36 @@
+/*! 
+    \file track_node.h
+    \brief Definition of the TrackNode are located here
+    
+    the TrackNode is the node, that follows the Track (and the TrackManager) 
+    through the level.
+    Under normal confitions the Plyaer(s) are 
+*/
+
+
+#ifndef _TRACK_NODE_H
+#define _TRACK_NODE_H
+
+#include "p_node.h"
+
+/* FORWARD DEFINITION */
+class TrackManager;
+
+class TrackNode : public PNode {
+
+ public:
+  static TrackNode* getInstance ();
+  ~TrackNode ();
+  
+  virtual void update (float timeStamp);
+
+ private:
+  TrackNode ();
+  TrackNode (Vector* absCoordinate);
+
+  static TrackNode* singletonRef;
+  TrackManager* trackManager;
+
+};
+
+#endif /* _TRACK_NODE_H */
Index: orxonox/branches/trackManager/src/world.cc
===================================================================
--- orxonox/branches/trackManager/src/world.cc	(revision 3432)
+++ orxonox/branches/trackManager/src/world.cc	(revision 3463)
@@ -28,4 +28,5 @@
 #include "glmenu_imagescreen.h"
 #include "skysphere.h"
+#include "track_node.h"
 
 using namespace std;
@@ -294,5 +295,10 @@
 	    env->setName ("env");
 	    this->spawn(env, es, qs);
-	    trackManager->setBindSlave(env);
+	    
+	    trackNode = TrackNode::getInstance();
+
+	    env->setParent(trackNode);
+
+	    trackManager->setBindSlave(trackNode);
 
 	    break;
Index: orxonox/branches/trackManager/src/world.h
===================================================================
--- orxonox/branches/trackManager/src/world.h	(revision 3432)
+++ orxonox/branches/trackManager/src/world.h	(revision 3463)
@@ -80,4 +80,5 @@
  
   PNode* nullParent;
+  PNode* trackNode;
  
   void mainLoop ();
