Index: orxonox/trunk/src/lib/coord/p_node.cc
===================================================================
--- orxonox/trunk/src/lib/coord/p_node.cc	(revision 4573)
+++ orxonox/trunk/src/lib/coord/p_node.cc	(revision 4574)
@@ -426,6 +426,6 @@
       PNode* pn = iterator->nextElement();
       while( pn != NULL)
-        {
-          /* if this node has changed, make sure, that all children are updated also */
+      {
+        /* if this node has changed, make sure, that all children are updated also */
           if( this->bRelCoorChanged || this->bAbsCoorChanged)
             pn->parentCoorChanged ();
@@ -436,5 +436,5 @@
           pn = iterator->nextElement();
         }
-
+      delete iterator;
       this->bRelCoorChanged = false;
       this->bAbsCoorChanged = false;
@@ -446,11 +446,38 @@
 /**
    \brief displays some information about this pNode
-*/
-void PNode::debug(unsigned int depth) const
-{
-  PRINTF(2)("PNode::debug() - absCoord: (%f, %f, %f)\n",
-         this->absCoordinate.x,
-         this->absCoordinate.y,
-         this->absCoordinate.z);
+   \param depth The deph into which to debug the children of this PNode to.
+  (0: all children will be debugged, 1: only this PNode, 2: this and direct children...)
+   \param level The n-th level of the Node we draw (this is internal and only for nice output)
+*/
+void PNode::debug(unsigned int depth, unsigned int level) const
+{
+  for (unsigned int i = 0; i < level; i++)
+    PRINT(0)("|");
+  if (this->children->getSize() > 0)
+    PRINT(0)("+");
+  PRINT(0)("PNode(%s::%s) - absCoord: (%0.2f, %0.2f, %0.2f), relCoord(%0.2f, %0.2f, %0.2f)\n",
+           this->getClassName(),
+           this->getName(),
+           this->absCoordinate.x,
+           this->absCoordinate.y,
+           this->absCoordinate.z,
+           this->relCoordinate.x,
+           this->relCoordinate.y,
+           this->relCoordinate.z );
+  if (depth >= 2 || depth == 0)
+  {
+    tIterator<PNode>* iterator = this->children->getIterator();
+      //PNode* pn = this->children->enumerate ();
+    PNode* pn = iterator->nextElement();
+    while( pn != NULL)
+    {
+      if (depth == 0)
+        pn->debug(0, level + 1);
+      else
+        pn->debug(depth - 1, level +1);
+      pn = iterator->nextElement();
+    }
+    delete iterator;
+  }
 }
 
Index: orxonox/trunk/src/lib/coord/p_node.h
===================================================================
--- orxonox/trunk/src/lib/coord/p_node.h	(revision 4573)
+++ orxonox/trunk/src/lib/coord/p_node.h	(revision 4574)
@@ -32,6 +32,4 @@
 template<class T> class tList;
 
-//! enumeration for the different translation-binding-types
-//typedef enum parentingMode {PNODE_LOCAL_ROTATE, PNODE_ROTATE_MOVEMENT, PNODE_ALL, PNODE_MOVEMENT, PNODE_ROTATE_AND_MOVE};
 // linkage modes
 #define PNODE_LOCAL_ROTATE       1    //!< Rotates all the children around their centers.
@@ -94,5 +92,5 @@
   void update (float dt);
 
-  void debug (unsigned int depth = 1) const;
+  void debug (unsigned int depth = 1, unsigned int level = 0) const;
   void debugDraw(float size = 1.0) const;
 
Index: orxonox/trunk/src/lib/util/list.h
===================================================================
--- orxonox/trunk/src/lib/util/list.h	(revision 4573)
+++ orxonox/trunk/src/lib/util/list.h	(revision 4574)
@@ -14,5 +14,5 @@
 
 
-//! a list element of the tList, 
+//! a list element of the tList,
 template<class T> struct listElement
 {
@@ -32,5 +32,5 @@
   tIterator(listElement<T>* startElement);
   ~tIterator();
-  
+
   T* nextElement();
 
@@ -45,17 +45,17 @@
    \param startElement:  the first list element from the tList
 
-   normaly you will use it like this: 
+   normaly you will use it like this:
 
    tIterator<char>* nameIterator = nameList->getIterator();
-   char name* = nameIterator->nextElement(); 
+   char name* = nameIterator->nextElement();
    while( name != NULL)
    {
      PRINTF(3)("found name: %s in list\n", name);
-     name = nameIterator->nextElement(); 
+     name = nameIterator->nextElement();
    }
-   delete nameIterator;       
-*/
-template<class T>
-inline tIterator<T>::tIterator (listElement<T>* startElement) 
+   delete nameIterator;
+*/
+template<class T>
+inline tIterator<T>::tIterator (listElement<T>* startElement)
 {
   this->currentEl = startElement;
@@ -96,5 +96,5 @@
    you will use this as a generic list for all type of objects
 */
-template<class T> class tList 
+template<class T> class tList
 {
  public:
@@ -127,5 +127,5 @@
 */
 template<class T>
-inline tList<T>::tList () 
+inline tList<T>::tList ()
 {
   this->first = NULL;
@@ -138,9 +138,9 @@
    \brief the deconstructor
 
-   this will delete only the list. ATTENTION: the list is deleted, but the objects in the list will 
+   this will delete only the list. ATTENTION: the list is deleted, but the objects in the list will
    not be deleted
 */
 template<class T>
-inline tList<T>::~tList () 
+inline tList<T>::~tList ()
 {
   this->currentEl = this->first;
@@ -191,15 +191,15 @@
     {
       if( unlikely(this->currentEl->curr == entity))
-	{ 
-	  if( unlikely(this->currentEl->prev  == NULL)) this->first = this->currentEl->next;
-	  else this->currentEl->prev->next = this->currentEl->next;
-
-	  if( unlikely(this->currentEl->next == NULL)) this->last = this->currentEl->prev;
-	  else this->currentEl->next->prev = this->currentEl->prev;
-
-	  delete this->currentEl;
-	  this->size--;
-	  return;
-	}
+        {
+          if( unlikely(this->currentEl->prev  == NULL)) this->first = this->currentEl->next;
+          else this->currentEl->prev->next = this->currentEl->next;
+
+          if( unlikely(this->currentEl->next == NULL)) this->last = this->currentEl->prev;
+          else this->currentEl->next->prev = this->currentEl->prev;
+
+          delete this->currentEl;
+          this->size--;
+          return;
+        }
       this->currentEl = this->currentEl->next;
     }
@@ -266,5 +266,5 @@
 template<class T>
 inline bool tList<T>::inList(T* entity)
-{  
+{
   // pre checks
   if(this->size == 0) return false;
@@ -277,5 +277,5 @@
 
   // post checks
-  if(this->currentEl == NULL) 
+  if(this->currentEl == NULL)
     return false;
   else
