Index: branches/current_cd/src/lib/collision_detection/cd_engine.cc
===================================================================
--- branches/current_cd/src/lib/collision_detection/cd_engine.cc	(revision 6922)
+++ branches/current_cd/src/lib/collision_detection/cd_engine.cc	(revision 7005)
@@ -133,5 +133,5 @@
   std::list<WorldEntity*>::const_iterator entity;
   for (entity = drawList.begin(); entity != drawList.end(); entity++)
-    (*entity)->drawBVTree(1, 226);
+    (*entity)->drawBVTree(3, 226);
 }
 
@@ -141,5 +141,5 @@
 void CDEngine::debugDraw(int depth, int drawMode)
 {
-  if(this-> rootTree != NULL)
-    this->rootTree->drawBV(depth, drawMode);
+//   if(this-> rootTree != NULL)
+//     this->rootTree->drawBV(depth, drawMode);
 }
Index: branches/current_cd/src/lib/collision_detection/obb_tree.cc
===================================================================
--- branches/current_cd/src/lib/collision_detection/obb_tree.cc	(revision 6922)
+++ branches/current_cd/src/lib/collision_detection/obb_tree.cc	(revision 7005)
@@ -31,5 +31,5 @@
  *  standard constructor
 */
-OBBTree::OBBTree(int depth, const modelInfo* modelInf)
+OBBTree::OBBTree(int depth, const modelInfo* modelInf, WorldEntity* owner)
   : BVTree()
 {
@@ -37,4 +37,5 @@
   this->init();
   this->spawnBVTree(*modelInf);
+  this->owner = owner;
 }
 
Index: branches/current_cd/src/lib/collision_detection/obb_tree.h
===================================================================
--- branches/current_cd/src/lib/collision_detection/obb_tree.h	(revision 6922)
+++ branches/current_cd/src/lib/collision_detection/obb_tree.h	(revision 7005)
@@ -15,4 +15,5 @@
 class OBBTreeNode;
 class PNode;
+class WorldEntity;
 
 //! A class for representing an obb tree
@@ -21,5 +22,5 @@
 
   public:
-    OBBTree(int depth, const modelInfo* modInfo);
+    OBBTree(int depth, const modelInfo* modInfo, WorldEntity* entity);
     virtual ~OBBTree();
     void init();
@@ -35,4 +36,5 @@
     /** returns the root node of the bounding volume tree @return reference to the root node */
     inline OBBTreeNode* getRootNode() const { return this->rootNode; }
+    inline WorldEntity* getOwner() const { return this->owner; }
 
     void debug();
@@ -42,4 +44,5 @@
     int                  id;                              //!< the next id of a obb tree node
     int                  depth;                           //!< the depth of the tree to generate
+    WorldEntity*         owner;                           //!< owner
 };
 
Index: branches/current_cd/src/lib/collision_detection/obb_tree_node.cc
===================================================================
--- branches/current_cd/src/lib/collision_detection/obb_tree_node.cc	(revision 6922)
+++ branches/current_cd/src/lib/collision_detection/obb_tree_node.cc	(revision 7005)
@@ -66,4 +66,6 @@
   if( OBBTreeNode_sphereObj == NULL)
     OBBTreeNode_sphereObj = gluNewQuadric();
+
+  this->owner = NULL;
 
   /* debug ids */
@@ -565,6 +567,8 @@
 
 
-bool OBBTreeNode::overlapTest(const OBB& boxA, const OBB& boxB, WorldEntity* nodeA, WorldEntity* nodeB)
-{
+bool OBBTreeNode::overlapTest(OBB& boxA, OBB& boxB, WorldEntity* nodeA, WorldEntity* nodeB)
+{
+  //HACK remove this again
+  this->owner = nodeA;
   //   if( boxB == NULL || boxA == NULL)
   //     return false;
@@ -677,6 +681,6 @@
 
   /* FIXME: there is no collision mark set now */
-  //   boxA.bCollided = true; /* use this ONLY(!!!!) for drawing operations */
-  //   boxB.bCollided = true;
+     boxA.bCollided = true; /* use this ONLY(!!!!) for drawing operations */
+     boxB.bCollided = true;
 
 
@@ -689,8 +693,15 @@
 
 
+
+
+
+
+
+/**
+ *
+ * draw the BV tree - debug mode
+ */
 void OBBTreeNode::drawBV(int depth, int drawMode, const Vector& color,  bool top) const
 {
-
-
   /* this function can be used to draw the triangles and/or the points only  */
   if( drawMode & DRAW_MODEL || drawMode & DRAW_ALL)
@@ -778,7 +789,7 @@
       depth = 0;
 
-    if( !(drawMode & DRAW_SINGLE && depth != 0))
-    {
-      PRINTF(0)("debug poly draw: depth: %i, mode: %i\n", depth, drawMode);
+    if( depth == 0 /*!(drawMode & DRAW_SINGLE && depth != 0)*/)
+    {
+
 
       Vector cen = this->bvElement->center;
@@ -794,4 +805,13 @@
         glColor4f(color.x, color.y, color.z, .5);
       }
+
+      // debug out
+      if( this->obbTree->getOwner() != NULL)
+      {
+        PRINTF(0)("debug poly draw: depth: %i, mode: %i, entity-name: %s, class: %s\n", depth, drawMode, this->obbTree->getOwner()->getName(), this->obbTree->getOwner()->getClassName());
+      }
+      else
+        PRINTF(0)("debug poly draw: depth: %i, mode: %i\n", depth, drawMode);
+
 
       /* draw bounding box */
@@ -902,9 +922,7 @@
       }
 
-
       if( drawMode & DRAW_BV_BLENDED)
         glColor3f(color.x, color.y, color.z);
     }
-
   }
 
Index: branches/current_cd/src/lib/collision_detection/obb_tree_node.h
===================================================================
--- branches/current_cd/src/lib/collision_detection/obb_tree_node.h	(revision 6922)
+++ branches/current_cd/src/lib/collision_detection/obb_tree_node.h	(revision 7005)
@@ -48,5 +48,5 @@
     void forkBox(OBB& box);
 
-    bool overlapTest(const OBB& boxA, const OBB& boxB, WorldEntity* nodeA, WorldEntity* nodeB);
+    bool overlapTest(OBB& boxA, OBB& boxB, WorldEntity* nodeA, WorldEntity* nodeB);
 
 
@@ -76,4 +76,6 @@
     int                 triangleIndexLength1;       //!< len vert data obbox1
     int                 triangleIndexLength2;       //!< len vert data obbox2
+
+    WorldEntity*        owner;
 };
 
