Index: branches/coll_rect.merge/src/lib/collision_reaction/cr_physics_ground_walk.cc
===================================================================
--- branches/coll_rect.merge/src/lib/collision_reaction/cr_physics_ground_walk.cc	(revision 10009)
+++ branches/coll_rect.merge/src/lib/collision_reaction/cr_physics_ground_walk.cc	(revision 10010)
@@ -34,99 +34,95 @@
 
 
+namespace CoRe
+{
 
-ObjectListDefinition(CRPhysicsGroundWalk);
-/**
- *  standard constructor
- */
-CRPhysicsGroundWalk::CRPhysicsGroundWalk ()
-    : CollisionReaction()
-{
-  this->registerObject(this, CRPhysicsGroundWalk::_objectList);
-}
+  ObjectListDefinition(CRPhysicsGroundWalk);
 
 
-/**
- *  standard deconstructor
- */
-CRPhysicsGroundWalk::~CRPhysicsGroundWalk ()
-{}
-
-
-/**
- * caluculates and applys the reaction to a specific collision
- *  @param collision the collision
- */
-void CRPhysicsGroundWalk::reactToCollision(Collision* collision)
-{
-
-  AABB* box = collision->getEntityB()->getModelAABB();
-  WorldEntity* entity = collision->getEntityB();
-
-  if( box == NULL)
+  /**
+   *  standard constructor
+   */
+  CRPhysicsGroundWalk::CRPhysicsGroundWalk ()
+      : CollisionReaction()
   {
-    PRINTF(2)("this model has no aabb box so there is no correct collision reaction implemented. skipping\n");
-    return;
+    this->registerObject(this, CRPhysicsGroundWalk::_objectList);
   }
 
 
-  float CR_MAX_WALK_HEIGHT = 15.0f;
-
-  float height = 0.0f;
+  /**
+   *  standard deconstructor
+   */
+  CRPhysicsGroundWalk::~CRPhysicsGroundWalk ()
+  {}
 
 
-  const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents());
-  std::vector<CollisionEvent*>::const_iterator it = collisionEvents->begin();
-  for(; it != collisionEvents->end(); it++)
+  /**
+   * caluculates and applys the reaction to a specific collision
+   *  @param collision the collision
+   */
+  void CRPhysicsGroundWalk::reactToCollision(Collision* collision)
   {
 
-    CollisionEvent* ce = (*it);
-    Vector normal = ce->getGroundNormal();
+    AABB* box = collision->getEntityA()->getModelAABB();
+    WorldEntity* entity = collision->getEntityA();
 
-    // calculate the collision position
-    Vector collPos =  collision->getEntityB()->getAbsCoor()  + box->center - ce->getCollisionPosition();
-
-    // test the 3 axis differently
-    switch( ce->getType())
+    if( box == NULL)
     {
-        /* collision in the Y-AXIS */
-      case COLLISION_TYPE_AXIS_Y_NEG:
-        // calulate the height above ground
-        height = collPos.len() - box->halfLength[1];
+      PRINTF(2)("this model has no aabb box so there is no correct collision reaction implemented. skipping\n");
+      return;
+    }
 
 
-        // object is beneath the plane (ground)
-        //         if(height >= 0.0f && height <= 0.0001f) break ;// Do nothing
-        if( height < 0.0f && -height < CR_MAX_WALK_HEIGHT)
-        {
-          entity->shiftCoor(Vector(0.0f, -height + 0.00001, 0.0f));
-          entity->setOnGround(true);
-        }
-        // object is already in the wall
-        else if( ce->isInWall())
-        {
-          entity->setAbsCoor(entity->getLastAbsCoor());
-        }
-        else
-        {
-          // entity is not on ground
-          entity->setOnGround(false);
-        }
-        break;
+    float CR_MAX_WALK_HEIGHT = 15.0f;
+
+    float height = 0.0f;
 
 
+    std::vector<CollisionEvent*>::const_iterator it = collision->begin();
+    for(; it != collision->end(); it++)
+    {
+
+      CollisionEvent* ce = (*it);
+      Vector normal = ce->getGroundNormal();
+
+      // calculate the collision position
+      Vector collPos =  collision->getEntityA()->getAbsCoor()  + box->center - ce->getCollisionPosition();
+
+      // test the 3 axis differently
+      switch( ce->getType())
+      {
+          /* collision in the Y-AXIS */
+        case CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Y_NEG:
+          // calulate the height above ground
+          height = collPos.len() - box->halfLength[1];
+
+
+          // object is beneath the plane (ground)
+          //         if(height >= 0.0f && height <= 0.0001f) break ;// Do nothing
+          if( height < 0.0f && -height < CR_MAX_WALK_HEIGHT)
+          {
+            entity->shiftCoor(Vector(0.0f, -height + 0.00001, 0.0f));
+            entity->setOnGround(true);
+          }
+          // object is already in the wall
+          else if( ce->isInWall())
+          {
+            entity->setAbsCoor(entity->getLastAbsCoor());
+          }
+          else
+          {
+            // entity is not on ground
+            entity->setOnGround(false);
+          }
+          break;
+
+
+      }
     }
+    //PRINTF(0)("collision distances: x: %f, y: %f, z: %f\n", front, height, side);
+
   }
-  //PRINTF(0)("collision distances: x: %f, y: %f, z: %f\n", front, height, side);
-
-}
 
 
 
-
-/**
- * use this to do some collision offline calculations, only called for bContinuousPoll == true
- */
-void CRPhysicsGroundWalk::update(WorldEntity* owner)
-{}
-
-
+}
