Index: branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc
===================================================================
--- branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc	(revision 8219)
+++ branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc	(revision 8220)
@@ -83,4 +83,6 @@
   this->root  = this->bspFile->get_root();
   this->alreadyVisible = new bool [this->bspFile->numFaces];
+
+  this->outputFraction = 1.0f;
 }
 /*
@@ -853,60 +855,65 @@
 
   Vector position = worldEntity->getAbsCoor();
-
-
-  Vector forwardDir = worldEntity->getAbsDirX();
-  forwardDir.x =8.0*forwardDir.x;
-  forwardDir.y =8.0*forwardDir.y;
-  forwardDir.z =8.0*forwardDir.z;
-
-  Vector upDir = worldEntity->getAbsDirY();
-  Vector dest = position;
-  dest.x  += forwardDir.x;
-  dest.y  += forwardDir.y;
-  dest.z  += forwardDir.z;
-  Vector out = dest;
+  Vector downDir = worldEntity->getAbsDirY();
+  Vector dest = position + downDir * -80.0f;
+
+//   Vector forwardDir = worldEntity->getAbsDirX();
+//   forwardDir.x =8.0*forwardDir.x;
+//   forwardDir.y =8.0*forwardDir.y;
+//   forwardDir.z =8.0*forwardDir.z;
+//
+//   Vector upDir = worldEntity->getAbsDirY();
+//   Vector dest = position;
+//   dest.x  += forwardDir.x;
+//   dest.y  += forwardDir.y;
+//   dest.z  += forwardDir.z;
+//   Vector out = dest;
 
    bool collision = false;
 
-   Vector position1 = position + Vector(0.0,0.1,0.0);
-   Vector position2 = position + Vector(0.0,0.2,0.0);
-   Vector dest1 = position1 + forwardDir;
-   Vector dest2 = position2 + forwardDir;
-   dest = position - Vector(0.0, 20.0,0.0);
-   Vector out1;
-   Vector out2;
-
-   this->checkCollisionRayN(this->root,0.0f,1.0f, &position1, &dest1 );
-   if(this->outputFraction == 1.0f)  out1 = dest;
+
+//    Vector position1 = position + Vector(0.0,0.1,0.0);
+//    Vector position2 = position + Vector(0.0,0.2,0.0);
+//    Vector dest1 = position1 + forwardDir;
+//    Vector dest2 = position2 + forwardDir;
+//    dest = position - Vector(0.0, 20.0,0.0);
+//    Vector out1;
+//    Vector out2;
+
+//    this->checkCollisionRayN(this->root,0.0f,1.0f, &position1, &dest1 );
+//    if(this->outputFraction == 1.0f)  out1 = dest;
+//    else {
+//      collision = true;
+//      out1.x = position1.x + (dest1.x -position1.x) * this->outputFraction;
+//      out1.y = position1.y + (dest1.y -position1.y) * this->outputFraction;
+//      out1.z = position1.z + (dest1.z - position1.z) * this->outputFraction;
+//
+//    }
+//    this->checkCollisionRayN(this->root,0.0f,1.0f, &position2, &dest2 );
+//    if(this->outputFraction == 1.0f) out2= dest;
+//    else {
+//      collision = true;
+//      out2.x = position2.x + (dest2.x -position2.x) * this->outputFraction;
+//      out2.y = position2.y + (dest2.y -position2.y) * this->outputFraction;
+//      out2.z = position2.z + (dest2.z - position2.z) * this->outputFraction;
+//
+//    }
+
+   this->checkCollisionRayN(this->root,0.0f, 1.0f, &position, &dest );
+
+   if( this->outputFraction == 1.0f)
+     out = dest;
    else {
+     PRINTF(0)("We got a collision!! Are you sure: outputFraction = %f\n", this->outputFraction);
      collision = true;
-     out1.x = position1.x + (dest1.x -position1.x) * this->outputFraction;
-     out1.y = position1.y + (dest1.y -position1.y) * this->outputFraction;
-     out1.z = position1.z + (dest1.z - position1.z) * this->outputFraction;
-
-   }
-
-   this->checkCollisionRayN(this->root,0.0f,1.0f, &position2, &dest2 );
-   if(this->outputFraction == 1.0f) out2= dest;
-   else {
-     collision = true;
-     out2.x = position2.x + (dest2.x -position2.x) * this->outputFraction;
-     out2.y = position2.y + (dest2.y -position2.y) * this->outputFraction;
-     out2.z = position2.z + (dest2.z - position2.z) * this->outputFraction;
-
-   }
-
-   this->checkCollisionRayN(this->root,0.0f,1.0f, &position, &dest );
-   if(this->outputFraction == 1.0f) out = dest;
-   else {
-     collision = true;
-     out.x = position.x + (dest.x -position.x) * this->outputFraction;
-     out.y = position.y + (dest.y -position.y) * this->outputFraction;
-     out.z = position.z + (dest.z -position.z) * this->outputFraction;
+//      out.x = position.x + (dest.x -position.x) * this->outputFraction;
+//      out.y = position.y + (dest.y -position.y) * this->outputFraction;
+//      out.z = position.z + (dest.z -position.z) * this->outputFraction;
+
+     out = position + (dest - position) * this->outputFraction;
 
      Vector out3 = out + Vector(3*this->collPlane->x,3*this->collPlane->y,3*this->collPlane->z);
-     this->out = out;
-     this->out1 = out1;
-     this->out2 = out2;
+
+
       //this->drawDebugCube(&out1);
       //this->drawDebugCube(&out2);
@@ -917,6 +924,7 @@
 
     // Return the normal here: Normal's stored in this->collPlane;
-   if(collision)
+   if( collision) {
      worldEntity->registerCollision(worldEntity, this->parent, Vector(this->collPlane->x, this->collPlane->y, this->collPlane->z), out);
+   }
 }
 
