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 8909)
+++ branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc	(revision 8910)
@@ -64,8 +64,10 @@
 
   // put it back
-  //   PRINTF(0)("putting it back to lastPos: \n");
-  //   this->lastPositions[0].debug();
-  //   PRINTF(0)("current pos:\n");
-  //   collision->getEntityB()->getAbsCoor().debug();
+     PRINTF(0)("putting it back to lastPos: \n");
+     //this->lastPositions[0].debug();
+      PRINTF(0)("current pos:\n");
+     collision->getEntityB()->getAbsCoor().debug();
+     
+   
 
   float height;
@@ -86,14 +88,23 @@
   float CR_THRESHOLD = 0.2f;
 
-
+  //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);
+  // 
 
   switch( ce->getType())
   {
-    case COLLISION_TYPE_AXIS_Y:
-
-//       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);
-// 
+    
+    case COLLISION_TYPE_AXIS_X:
+      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);
+      PRINTF(0)("COLLISION_TYPE_AXIS_X \n");
+      break;
+   case COLLISION_TYPE_AXIS_Y:
+
+      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);
+       PRINTF(0)("COLLISION_TYPE_AXIS_Y \n");
 //       // object is beneath the plane (ground)
 //       if( height <= 0.0f )
@@ -107,9 +118,12 @@
 //       }
 //       break;
-// 
-
-    case COLLISION_TYPE_AXIS_X:
+     break;
+
+    
     case COLLISION_TYPE_AXIS_Z:
-      break;
+      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);
+      PRINTF(0)("COLLISION_TYPE_AXIS_Z \n");
+     break;
 
     }
Index: branches/single_player_map/src/lib/graphics/importer/bsp_manager.cc
===================================================================
--- branches/single_player_map/src/lib/graphics/importer/bsp_manager.cc	(revision 8909)
+++ branches/single_player_map/src/lib/graphics/importer/bsp_manager.cc	(revision 8910)
@@ -82,15 +82,15 @@
     delete this->bspFile;
 }
- 
+
 int BspManager::load(const char* fileName, float scale)
 {
   // open a BSP file
-  
-  
+
+
   this->bspFile = new BspFile();
   this->bspFile->scale =  scale;
   if(this->bspFile->read(ResourceManager::getFullName(fileName).c_str()) == -1)
-  return -1;
-  
+    return -1;
+
   this->bspFile->build_tree();
   this->root  = this->bspFile->get_root();
@@ -98,5 +98,5 @@
 
   this->outputFraction = 1.0f;
-  
+
   return 0;
 }
@@ -998,5 +998,5 @@
   } else {
     // Init positions and destinations to anything useful!
-
+   
   }
 
@@ -1045,10 +1045,13 @@
   }
 
-  plane* testPlane = this->collPlane;
+  plane* testPlane = new plane;
+  testPlane->x =  this->collPlane->x;
+  testPlane->y = this->collPlane->y;
+  testPlane->z = this->collPlane->z;
 
 
   bool xCollision = false;
   bool zCollision = false;
-  if(!SolidFlag) {
+  
 
     // 2nd Collision Detection
@@ -1060,16 +1063,16 @@
     this->checkCollisionRayN(this->root,0.0f,1.0f, &position1, &dest1 );
 
-    if(!this->outputAllSolid != 1.0f) {
+    if(this->outputFraction < 1.0f) {
       out.x = dest1.x + (dest1.x -position1.x) * this->outputFraction;
       xCollision = true;
       testPlane = this->collPlane;
     }
-    if(this->outputAllSolid) {
+    if(this->outputAllSolid || !this->outputStartsOut) {
       SolidFlag = true;
-      xCollision = true;  
+      xCollision = true;
     }
     //out.z = this->outputFraction;
 
-    if(!SolidFlag) {
+   
 
       // 3rd Collision Detection
@@ -1082,5 +1085,5 @@
       //out.x = this->outputFraction;
 
-      if(this->outputFraction != 1.0f ) {
+      if(this->outputFraction < 1.0f ) {
         out.z = out.z = dest2.z + (dest2.z -position2.z) * this->outputFraction;
         zCollision = true;
@@ -1088,10 +1091,10 @@
 
       }
-      if(this->outputAllSolid) {
-          SolidFlag = true;
-          zCollision = true;   
+      if(this->outputAllSolid || !this->outputStartsOut) {
+        SolidFlag = true;
+        zCollision = true;
       }
-    }
-  }//end if
+    
+  //end if
   /*
   This is how you would calculate the Coordinates where worldEntity Collided with the BSP world.
@@ -1104,12 +1107,14 @@
   if( collision) {
     PRINTF(5)("We got a collision!! Are you sure: outputFraction = %f\n", this->outputFraction);
-    worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y || (xCollision ? COLLISION_TYPE_AXIS_X :0) | (zCollision ? COLLISION_TYPE_AXIS_Z :0), this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag);
-  } else {
-    if(xCollision || zCollision) {
-
-      worldEntity->registerCollision((xCollision ? COLLISION_TYPE_AXIS_X :0) | (zCollision ? COLLISION_TYPE_AXIS_Z :0) , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag);
-    }
-
-  }
+    worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag);
+  }
+  if(xCollision) {
+    worldEntity->registerCollision(COLLISION_TYPE_AXIS_X , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag);
+  }
+  if(zCollision) {
+    worldEntity->registerCollision(COLLISION_TYPE_AXIS_Z , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag);
+  }
+
+
   //else  worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y, this->parent, worldEntity, Vector(0.0, 2.0, 0.0), dest, false);
 
Index: branches/single_player_map/src/lib/graphics/importer/bsp_manager.h
===================================================================
--- branches/single_player_map/src/lib/graphics/importer/bsp_manager.h	(revision 8909)
+++ branches/single_player_map/src/lib/graphics/importer/bsp_manager.h	(revision 8910)
@@ -119,5 +119,5 @@
   ::std::deque<int> opal; //!< the others here.
 
-  Vector out;  //!< For debugging only
+  Vector out;  //!< Stores collision coordinates
   Vector out1; //!< For debugging only
   Vector out2; //!< For debugging only
