Index: branches/coll_rect/src/lib/collision_reaction/collision.h
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision.h	(revision 10000)
+++ branches/coll_rect/src/lib/collision_reaction/collision.h	(revision 10006)
@@ -71,5 +71,5 @@
     /** @return Collision WorldEntity B */
     inline WorldEntity* getEntityB() const { return this->_entityB; }
-    inline bool match(const WorldEntity& entityA, WorldEntity& entityB) const {
+    inline bool same(const WorldEntity& entityA, WorldEntity& entityB) const {
       return ((this->_entityA == &entityA && this->_entityB == &entityB) || (this->_entityA == &entityB && this->_entityB == &entityA)); }
 
Index: branches/coll_rect/src/lib/collision_reaction/collision_event.h
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision_event.h	(revision 10000)
+++ branches/coll_rect/src/lib/collision_reaction/collision_event.h	(revision 10006)
@@ -49,47 +49,23 @@
 
     /** @return CollisionEvent WorldEntity A */
-    inline WorldEntity* getEntityA() const
-    {
-      return this->entityA;
-    }
+    inline const WorldEntity* getEntityA() const  { return this->entityA; }
     /** @return CollisionEvent WorldEntity B */
-    inline WorldEntity* getEntityB() const
-    {
-      return this->entityB;
-    }
+    inline const WorldEntity* getEntityB() const  { return this->entityB; }
     /** @return Bounding Volume from EntityA */
-    inline BoundingVolume* getBVA() const
-    {
-      return this->bvA;
-    }
+    inline const BoundingVolume* getBVA() const { return this->bvA; }
     /** @return Bounding Volume from EntityB */
-    inline BoundingVolume* getBVB() const
-    {
-      return this->bvB;
-    }
+    inline const BoundingVolume* getBVB() const {  return this->bvB;  }
 
     /** @return ground plane if collided with bsp model */
-    inline Vector getGroundNormal()
-    {
-      return this->groundNormal;
-    }
+    inline const Vector& getGroundNormal() const  { return this->groundNormal; }
 
     /** @return position of the position, only accurate if this is a collision with the ground!!! */
-    inline Vector getCollisionPosition()
-    {
-      return this->position;
-    }
+    inline const Vector& getCollisionPosition() const  {  return this->position;  }
 
     /** @return the type of the collision */
-    inline int getType()
-    {
-      return this->collisionType;
-    }
+    inline int getType() const  {  return this->collisionType;  }
 
     /** @return true if the entity is in the wall */
-    inline bool isInWall()
-    {
-      return this->bInWall;
-    }
+    inline bool isInWall() const  {  return this->bInWall;  }
 
 
Index: branches/coll_rect/src/lib/collision_reaction/collision_filter.cc
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision_filter.cc	(revision 10000)
+++ branches/coll_rect/src/lib/collision_reaction/collision_filter.cc	(revision 10006)
@@ -142,6 +142,8 @@
   bool CollisionFilter::operator()(const WorldEntity& entity) const
   {
-    // if there are no installed criterions just ommit and
-    if( this->isReactive())
+    PRINTF(0)("operator()(const WorldEntity& entity)\n");
+
+    // if there are no installed criterions just ommit and return
+    if( !this->isReactive())
       return false;
 
@@ -149,8 +151,11 @@
     for( int i = 0; i < CREngine::CR_NUMBER; i++ )
     {
-      std::vector<ClassID>::const_iterator it = this->_filters[i].begin();
-      for(; it != this->_filters[i].end(); i++ )
+      TargetIteratorConst it = this->_filters[i].begin();
+      for(; it != this->_filters[i].end(); it++ )
+      {
+         PRINTF(0)("[%i] check %s is a %s?\n", i, entity.getClassName().c_str(), (*it).name().c_str());
         if( unlikely(entity.isA(*it) ) )
           return true;
+      }
     }
 
@@ -168,13 +173,20 @@
   bool CollisionFilter::operator()(const WorldEntity& entity, const CREngine::ReactionType type) const
   {
+    assert(&entity != NULL);
+
+    PRINTF(0)("operator()(const WorldEntity& entity, const CREngine::ReactionType type)\n");
     // if there are no installed criterions just omit and return
     if( !this->isReactive())
       return false;
 
+
     // goes through all registered filter criterions and looks for matches
     TargetIteratorConst it = this->_filters[type].begin();
     for(; it != this->_filters[type].end(); it++ )
-      if( unlikely(entity.isA(*it)))
+    {
+       PRINTF(0)("size: %i - %s is a %s?\n", this->_filters[type].size(), entity.getClassName().c_str(), (*it).name().c_str());
+      if( entity.isA(*it))
         return true;
+    }
 
     return false;
Index: branches/coll_rect/src/lib/collision_reaction/collision_tube.cc
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision_tube.cc	(revision 10000)
+++ branches/coll_rect/src/lib/collision_reaction/collision_tube.cc	(revision 10006)
@@ -27,4 +27,5 @@
 #include "cr_physics_full_walk.h"
 
+#include "debug.h"
 
 
@@ -52,5 +53,41 @@
   CollisionTube::~CollisionTube ()
   {
+    this->reset();
+  }
+
+
+
+  /**
+   * resets the collision tube after each collision detection cycle
+   */
+  void CollisionTube::reset()
+  {
     this->_collisionList.clear();
+  }
+
+
+  /**
+   * gets the collision object useable for collision events registarations
+   * @param entityA collision partner 1
+   * @param entityB collision partner 2
+   * @return the collision object to be used
+   */
+  Collision* CollisionTube::registerCollision(WorldEntity* entityA, WorldEntity* entityB)
+  {
+    assert( entityA != NULL && entityB != NULL);
+
+    Collision* collision = NULL;
+    if( !this->_collisionList.empty())
+      collision = this->_collisionList.back();
+
+    // check if there is already a collision defined between these objects or this is the first collision at all
+    if( collision == NULL || !collision->same(*entityA, *entityB))
+    {
+      collision = CREngine::getInstance()->popCollisionObject();
+      collision->collide( entityA, entityB);
+      this->_collisionList.push_back(collision);
+    }
+
+    return collision;
   }
 
@@ -67,14 +104,6 @@
   void CollisionTube::registerCollisionEvent(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
   {
-    Collision* collision = NULL;
-    if( !this->_collisionList.empty())
-      collision = this->_collisionList.back();
-
-    // check if there is already a collision defined between these objects or this is the first collision at all
-    if( collision == NULL || !collision->match(*entityA, *entityB))
-    {
-      collision = CREngine::getInstance()->popCollisionObject();
-      collision->collide( entityA, entityB);
-    }
+    // first get a useable collision object
+    Collision* collision = this->registerCollision(entityA, entityB);
 
     // now register the new collision event
@@ -95,18 +124,8 @@
    */
   void CollisionTube::registerCollisionEvent(CREngine::CollisionType type, WorldEntity* entity, WorldEntity* groundEntity,
-                              const Vector& normal, const Vector& position, bool bInWall)
+      const Vector& normal, const Vector& position, bool bInWall)
   {
-    // get last collision
-    Collision* collision = NULL;
-    if( !this->_collisionList.empty())
-      collision = this->_collisionList.back();
-
-    // check if there is already a collision defined between these objects
-    if( collision == NULL || !collision->match(*entity, *groundEntity))
-    {
-      // get a new collision object
-      collision = CREngine::getInstance()->popCollisionObject();
-      collision->collide( entity, groundEntity);
-    }
+    // first get a useable collision object
+    Collision* collision = this->registerCollision(entity, groundEntity);
 
     // now register the new collision event
Index: branches/coll_rect/src/lib/collision_reaction/collision_tube.h
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/collision_tube.h	(revision 10000)
+++ branches/coll_rect/src/lib/collision_reaction/collision_tube.h	(revision 10006)
@@ -70,4 +70,7 @@
     void registerCollisionEvent(CREngine::CollisionType type, WorldEntity* entity, WorldEntity* groundEntity,
                                 const Vector& normal, const Vector& position, bool bInWall = false);
+    Collision* registerCollision(WorldEntity* entityA, WorldEntity* entityB);
+
+    void reset();
 
     /** @returns an iterator pointing to the beginning of the list */
Index: branches/coll_rect/src/lib/collision_reaction/cr_engine.cc
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/cr_engine.cc	(revision 10000)
+++ branches/coll_rect/src/lib/collision_reaction/cr_engine.cc	(revision 10006)
@@ -66,5 +66,5 @@
       PRINTF(0)("CollisionReaction Error: CollisionEvent cache size missmatch: %i of %i\n", this->collisionEventsUnused.size(), CR_MAX_COLLISION_EVENTS);
 
-    this->flushCollisions();
+    this->reset();
 
     CollisionIterator it1 = this->collisionsUnused.begin();
@@ -121,5 +121,10 @@
       return this->collisionsUsed.back();
     }
-    else return NULL;
+    else
+    {
+      PRINTF(0)("There is no Collision Object left in the precache table, fatal error will cause segfault, change CR_MAX_COLLISIONS\n");
+      assert(false);
+      return NULL;
+    }
   }
 
@@ -136,5 +141,10 @@
       return this->collisionEventsUsed.back();
     }
-    else return NULL;
+    else
+    {
+      PRINTF(0)("There is no Collision Object left in the precache table, fatal error will cause segfault, change CR_MAX_COLLISION_EVENTS\n");
+      assert(false);
+      return NULL;
+    }
   }
 
@@ -147,5 +157,5 @@
     // for all collisions:
     CollisionIterator ci = CollisionTube::getInstance()->begin();
-    for(; ci < CollisionTube::getInstance()->end(); ++ci)
+    for(; ci < CollisionTube::getInstance()->end(); ci++)
     {
       for( int i = CREngine::CR_PHYSICS_MOMENTUM; i < CREngine::CR_NUMBER; i++)
@@ -153,4 +163,8 @@
         if( _reactionList[i] == NULL)
           continue;
+
+        assert((*ci)->getEntityA() != NULL && (*ci)->getEntityB() != NULL);
+
+        PRINTF(0)("CR CHECK: collision between: %s, %s\n", (*ci)->getEntityA()->getClassName().c_str(), (*ci)->getEntityB()->getClassName().c_str());
 
         // check if entity A or B is subscibed for this event
@@ -161,10 +175,9 @@
           PRINTF(0)("react to %i\n", i);
         }
-
-        (*ci)->reset();
       }
-    }
-
-    this->flushCollisions();
+      (*ci)->reset();
+    }
+
+    this->reset();
   }
 
@@ -173,5 +186,5 @@
    * flushes all the collision lists and puts them to their initial state
    */
-  void CREngine::flushCollisions()
+  void CREngine::reset()
   {
     CollisionIterator it1 = this->collisionsUsed.begin();
@@ -185,4 +198,6 @@
     this->collisionsUsed.clear();
     this->collisionEventsUsed.clear();
+
+    CollisionTube::getInstance()->reset();
   }
 
Index: branches/coll_rect/src/lib/collision_reaction/cr_engine.h
===================================================================
--- branches/coll_rect/src/lib/collision_reaction/cr_engine.h	(revision 10000)
+++ branches/coll_rect/src/lib/collision_reaction/cr_engine.h	(revision 10006)
@@ -73,5 +73,4 @@
     inline static CREngine* getInstance() { if (!singletonRef) singletonRef = new CREngine();  return singletonRef; };
 
-
     Collision* popCollisionObject();
     CollisionEvent* popCollisionEventObject();
@@ -86,5 +85,5 @@
     void init();
 
-    void flushCollisions();
+    void reset();
 
 
Index: branches/coll_rect/src/lib/graphics/importer/bsp_manager.cc
===================================================================
--- branches/coll_rect/src/lib/graphics/importer/bsp_manager.cc	(revision 10000)
+++ branches/coll_rect/src/lib/graphics/importer/bsp_manager.cc	(revision 10006)
@@ -1217,5 +1217,5 @@
   {
     CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_AXIS_X ,
-                              this->parent, entity,
+                              entity, this->parent,
                               Vector(testPlane->x, testPlane->y, testPlane->z),
                               collPos,
@@ -1256,5 +1256,5 @@
   {
     CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_AXIS_X_NEG,
-                              this->parent, entity,
+                              entity, this->parent,
                               Vector(testPlane->x, testPlane->y, testPlane->z),
                               collPos,
@@ -1351,6 +1351,6 @@
   if( yCollisionUp)
   {
-    CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Y, this->parent,
-                              entity,
+    CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Y,
+                              entity, this->parent,
                               Vector(testPlane->x, testPlane->y, testPlane->z),
                               collPos, SolidFlag);
@@ -1404,6 +1404,6 @@
   if( yCollisionDown)
   {
-    CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Y_NEG , this->parent,
-                              entity,
+    CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Y_NEG ,
+                              entity, this->parent,
                               Vector(testPlane->x, testPlane->y, testPlane->z),
                               collPos, SolidFlag);
@@ -1483,6 +1483,6 @@
 
   if( zCollisionRight) {
-    CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Z , this->parent,
-                              entity,
+    CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Z ,
+                              entity, this->parent,
                               Vector(testPlane->x, testPlane->y, testPlane->z),
                               collPos , SolidFlag);
@@ -1522,6 +1522,6 @@
 
   if( zCollisionLeft) {
-    CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Z_NEG , this->parent,
-                               entity,
+    CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Z_NEG ,
+                               entity, this->parent,
                                Vector(testPlane->x, testPlane->y, testPlane->z),
                                collPos , SolidFlag);
