Index: branches/objectmanager/src/lib/collision_detection/cd_engine.cc
===================================================================
--- branches/objectmanager/src/lib/collision_detection/cd_engine.cc	(revision 6082)
+++ branches/objectmanager/src/lib/collision_detection/cd_engine.cc	(revision 6124)
@@ -65,46 +65,66 @@
     be able to enhance iteration speed.
  */
-void CDEngine::checkCollisions()
-{
-  this->checkCollisionObjects();
+//void CDEngine::checkCollisions()
+//{
+//  this->checkCollisionObjects();
   //this->checkCollisionGround();
-}
-
-#include "class_list.h"
-#include "state.h"
+//}
+
 /**
  *  this checks the collisions with the objects
  */
-void CDEngine::checkCollisionObjects()
+//void CDEngine::checkCollisionObjects()
+//{
+//   BVTree* tree;
+//   tIterator<WorldEntity>* iterator1 = entityList->getIterator();
+//   tIterator<WorldEntity>* iterator2 = entityList->getIterator();
+//   WorldEntity* entity1 = iterator1->firstElement();
+//   WorldEntity* entity2 = iterator2->iteratorElement(iterator1);
+//   PRINTF(3)("checking for collisions\n");
+//   while( entity1 != NULL)
+//   {
+//     if( likely(entity1 != this->terrain))
+//     {
+//       entity2 = iterator2->nextElement();
+//
+//       while( entity2 != NULL)
+//       {
+//         if( likely(entity2 != this->terrain))
+//         {
+//           PRINTF(4)("checking object %s against %s\n", entity1->getName(), entity2->getName());
+//           tree = entity1->getOBBTree();
+//           if( likely(tree != NULL) && entity2->getOBBTree() != NULL) tree->collideWith(entity1, entity2);
+//         }
+//         entity2 = iterator2->nextElement();
+//       }
+//     }
+//     entity1 = iterator1->nextElement();
+//     entity2 = iterator2->iteratorElement(iterator1);
+//     entity2 = iterator2->nextElement();
+//   }
+//   delete iterator1;
+//   delete iterator2;
+//}
+
+void CDEngine::checkCollisions(std::list<WorldEntity*>& list1, std::list<WorldEntity*>& list2)
 {
   BVTree* tree;
-  tIterator<WorldEntity>* iterator1 = entityList->getIterator();
-  tIterator<WorldEntity>* iterator2 = entityList->getIterator();
-  WorldEntity* entity1 = iterator1->firstElement();
-  WorldEntity* entity2 = iterator2->iteratorElement(iterator1);
+  std::list<WorldEntity*>::iterator entity1, entity2;
   PRINTF(3)("checking for collisions\n");
-  while( entity1 != NULL)
+  for (entity1 = list1.begin(); entity1 != list1.end(); entity1++)
   {
-    if( likely(entity1 != this->terrain))
+    if( likely((*entity1) != this->terrain))
     {
-      entity2 = iterator2->nextElement();
-
-      while( entity2 != NULL)
+      for (entity2 = list2.begin(); entity2 != list2.end(); entity2++)
       {
-        if( likely(entity2 != this->terrain))
+        if( likely((*entity2) != this->terrain))
         {
-          PRINTF(4)("checking object %s against %s\n", entity1->getName(), entity2->getName());
-          tree = entity1->getOBBTree();
-          if( likely(tree != NULL) && entity2->getOBBTree() != NULL) tree->collideWith(entity1, entity2);
+          PRINTF(4)("checking object %s against %s\n", (*entity1)->getName(), (*entity2)->getName());
+          tree = (*entity1)->getOBBTree();
+          if( likely(tree != NULL) && (*entity2)->getOBBTree() != NULL) tree->collideWith(*entity1, *entity2);
         }
-        entity2 = iterator2->nextElement();
       }
     }
-    entity1 = iterator1->nextElement();
-    entity2 = iterator2->iteratorElement(iterator1);
-    entity2 = iterator2->nextElement();
   }
-  delete iterator1;
-  delete iterator2;
 }
 
@@ -134,6 +154,6 @@
   /* this would operate on  worldList bases, for testing purposes, we only use one OBBTree */
   //this->rootTree->drawBV(depth, drawMode);
-
-  tIterator<WorldEntity>* iterator = entityList->getIterator();
+  /// FIXME
+/*  tIterator<WorldEntity>* iterator = entityList->getIterator();
   WorldEntity* entity = iterator->firstElement();
   while( entity != NULL)
@@ -142,5 +162,5 @@
     entity = iterator->nextElement();
   }
-  delete iterator;
+  delete iterator;*/
 }
 
Index: branches/objectmanager/src/lib/collision_detection/cd_engine.h
===================================================================
--- branches/objectmanager/src/lib/collision_detection/cd_engine.h	(revision 6082)
+++ branches/objectmanager/src/lib/collision_detection/cd_engine.h	(revision 6124)
@@ -12,6 +12,6 @@
 #include "model.h"
 
+#include <list>
 
-template<class T> class tList;
 class WorldEntity;
 class OBBTree;
@@ -49,5 +49,4 @@
   inline void disable(const int options) { int temp = this->state & options; this->state ^= temp; }
 
-  inline void setEntityList(tList<WorldEntity>* entityList) { this->entityList = entityList; }
   inline void setTerrain(Terrain* terrain) { this->terrain = terrain; }
   //  inline void setPlayer(Player* player) { this->player = player; } /* only for debug purposes \todo: delete*/
@@ -55,5 +54,6 @@
   void drawBV(int depth, int drawMode) const;
 
-  void checkCollisions();
+//  void checkCollisions();
+  void checkCollisions(std::list<WorldEntity*>& list1, std::list<WorldEntity*>& list2);
 
   void debug();
@@ -75,5 +75,4 @@
  private:
   int                     state;                            //!< the current state of the cd engine
-  tList<WorldEntity>*     entityList;                       //!< pointer to the world entity list
   OBBTree*                rootTree;                         //!< for testing purposes a root tree
 
