Index: branches/single_player_map/src/lib/collision_reaction/collision_event.h
===================================================================
--- branches/single_player_map/src/lib/collision_reaction/collision_event.h	(revision 8863)
+++ branches/single_player_map/src/lib/collision_reaction/collision_event.h	(revision 8864)
@@ -9,7 +9,11 @@
 #include "vector.h"
 
+#include "cr_defs.h"
+
+
 class WorldEntity;
 class BoundingVolume;
 class Plane;
+
 
 
@@ -22,9 +26,9 @@
 
   /** collides two WorldEntities @param entityA world entity A, @param entityB world entity B, @param bvA volume A @param bvB volumeB */
-  inline void collide(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
-  { this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; }
+  inline void collide(int type, WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
+  { this->collisionType = type; this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; }
   /** collides two WorldEntities @param entity world entity , @param ground ground plane, @param position position on the ground */
-  inline void collide(WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall)
-  { this->entityA = entity; this->entityB = groundEntity, this->groundNormal = normal; this->position = position; this->bInWall = bInWall; }
+  inline void collide(int type, WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall)
+  { this->collisionType = type; this->entityA = entity; this->entityB = groundEntity, this->groundNormal = normal; this->position = position; this->bInWall = bInWall; }
 
 
@@ -44,4 +48,7 @@
   inline Vector getCollisionPosition() { return this->position; }
 
+  /** @return the type of the collision */
+  inline int getType() { return this->collisionType; }
+
   /** @return true if the entity is in the wall */
   inline bool isInWall() { return this->bInWall; }
@@ -59,4 +66,5 @@
 
   bool              bInWall;                       //!< true if is in wall
+  int               collisionType;                 //!< collision type
 };
 
Index: branches/single_player_map/src/lib/collision_reaction/cr_defs.h
===================================================================
--- branches/single_player_map/src/lib/collision_reaction/cr_defs.h	(revision 8863)
+++ branches/single_player_map/src/lib/collision_reaction/cr_defs.h	(revision 8864)
@@ -28,4 +28,13 @@
 
 
+//!< the collision axis x collision event
+#define COLLISION_TYPE_AXIS_X   1
+//!< the collision axis y collision event
+#define COLLISION_TYPE_AXIS_Y   2
+//!< the collision axis z collision event
+#define COLLISION_TYPE_AXIS_Z   4
+//!< the collision is a obb collision
+#define COLLISION_TYPE_OBB      8
+
 
 #endif /* _NETWORK_MANAGER */
Index: branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc
===================================================================
--- branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc	(revision 8863)
+++ branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc	(revision 8864)
@@ -66,5 +66,5 @@
   //   collision->getEntityB()->getAbsCoor().debug();
 
-  Vector height;
+  float height;
   AABB* box = collision->getEntityB()->getModelAABB();
   WorldEntity* entity = collision->getEntityB();
@@ -73,27 +73,27 @@
   float CR_THRESHOLD = 0.2f;
 
-//   if( box != NULL)
-//   {
-//
-//     Vector collPos =  collision->getEntityB()->getAbsCoor()  + box->center - ce->getCollisionPosition();
-//     height = collPos.y - box->halfLength[1];
-//
-//     PRINTF(0)("height: %f          , model height: %f\n", height, box->halfLength[1]);
-//     PRINTF(0)(" ground normal: %f, %f, %f\n", normal.x, normal.y, normal.z);
-//
-//     // object is beneath the plane (ground)
-//     if( height < 0.0f )
-//     {
-//       entity->shiftCoor(Vector(0, -height, 0));
-//     }
-//     // object is already in the wall
-//     else if( ce->isInWall())
-//     {
-//
-//     }
-//
-//
-//
-//   }
+  if( box != NULL)
+  {
+
+    Vector collPos =  collision->getEntityB()->getAbsCoor()  + box->center - ce->getCollisionPosition();
+    height = collPos.y - box->halfLength[1];
+
+    PRINTF(0)("height: %f          , model height: %f\n", height, box->halfLength[1]);
+    PRINTF(0)(" ground normal: %f, %f, %f\n", normal.x, normal.y, normal.z);
+
+    // object is beneath the plane (ground)
+    if( height < 0.0f )
+    {
+      entity->shiftCoor(Vector(0, -height, 0));
+    }
+    // object is already in the wall
+    else if( ce->isInWall())
+    {
+      entity->setAbsCoor(entity->getLastAbsCoor());
+    }
+
+
+
+  }
 
 
@@ -101,5 +101,5 @@
 
 
-// #if 0
+#if 0
   if( box != NULL)
     height = ( ce->getCollisionPosition() - collision->getEntityB()->getAbsCoor() )*(-1.0f) ;
@@ -158,5 +158,5 @@
 
   }// if(box!= NULL)
-// #endif
+#endif
   /*
   PRINTF(0)("Collision with Ground: \n");
Index: branches/single_player_map/src/lib/graphics/importer/bsp_manager.cc
===================================================================
--- branches/single_player_map/src/lib/graphics/importer/bsp_manager.cc	(revision 8863)
+++ branches/single_player_map/src/lib/graphics/importer/bsp_manager.cc	(revision 8864)
@@ -1,19 +1,19 @@
 /*
    orxonox - the future of 3D-vertical-scrollers
- 
+
    Copyright (C) 2006 orx
- 
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
    any later version.
- 
+
    ### File Specific:
    main-programmer: bottac@ee.ethz.ch
- 
+
    Inspired by:
    Rendering Q3 Maps by Morgan McGuire                  http://graphics.cs.brown.edu/games/quake/quake3.html
    Unofficial Quake 3 Map Specs by Kekoa Proudfoot      http://graphics.stanford.edu/~kekoa/q3/
- 
+
    Collision detection adapted from:
    Quake 3 Collision Detection by Nathan Ostgard        http://www.devmaster.net/articles/quake3collision/
@@ -45,5 +45,5 @@
 
 #include "aabb.h"
-
+#include "cr_defs.h"
 
 
@@ -69,9 +69,9 @@
 BspManager::BspManager(const TiXmlElement* root)
 {
- 
- 
+
+
   if( root != NULL)
     this->loadParams(root);
- 
+
   CDEngine::getInstance()->setBSPModel(this);
 } */
@@ -99,5 +99,5 @@
   this->root  = this->bspFile->get_root();
   this->alreadyVisible = new bool [this->bspFile->numFaces];
- 
+
   CDEngine::getInstance()->setBSPModel(this);
 }
@@ -962,5 +962,5 @@
   upDir.z = 0.0;
   Vector dest;
-   
+
 
   Vector position = worldEntity->getAbsCoor();       //+ upDir*10.0f ;
@@ -978,29 +978,29 @@
   Vector out2;
 
- 
+
 
   float height = 40;
-  
-  
+
+
   if( box != NULL)
   {
     position = worldEntity->getAbsCoor() +  box->center; // + box->axis[1] * box->halfLength[1];
     dest     = worldEntity->getAbsCoor() +  box->center - box->axis[1] * box->halfLength[1] * 40.0;
-    
+
     position1 = worldEntity->getAbsCoor() +  box->center + box->axis[0] * box->halfLength[0] * 2.0f;
     dest1     = worldEntity->getAbsCoor() +  box->center - box->axis[0] * box->halfLength[0] *2.0f;
-    
-        
+
+
     position2 = worldEntity->getAbsCoor() +  box->center + box->axis[2] * box->halfLength[2] * 2.0f;
     dest2     = worldEntity->getAbsCoor() +  box->center - box->axis[2] * box->halfLength[2] * 2.0f;
-    
+
   }
   else
   {
-    
-  }
-
-  
-  
+
+  }
+
+
+
   //
   this->inputStart =  position;
@@ -1025,10 +1025,10 @@
         this->collPlane->z = 0.0f;
         collision = true;
-      } else 
+      } else
         collision = false;
-        
-        
+
+
         out = dest;
-      
+
     } else {
       collision = true;
@@ -1046,5 +1046,5 @@
   plane* testPlane = this->collPlane;
 
-  
+
   // 2nd Collision Detection
   this->outputStartsOut = true;
@@ -1056,6 +1056,6 @@
   out.x = this->outputFraction;
   //out.z = this->outputFraction;
-  
-  
+
+
     // 3rd Collision Detection
   this->outputStartsOut = true;
@@ -1067,5 +1067,5 @@
   //out.x = this->outputFraction;
   out.z = this->outputFraction;
-  
+
 
   /*
@@ -1077,10 +1077,10 @@
 
   // Return the normal here: Normal's stored in this->collPlane;
-  if( collision) 
+  if( collision)
   {
     PRINTF(5)("We got a collision!! Are you sure: outputFraction = %f\n", this->outputFraction);
-    worldEntity->registerCollision(this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out);
-  } 
-  else  worldEntity->registerCollision(this->parent, worldEntity, Vector(0.0, 2.0, 0.0), dest);
+    worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y, this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out);
+  }
+  else  worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y, this->parent, worldEntity, Vector(0.0, 2.0, 0.0), dest);
 
 }
