Index: /branches/bsp_model/src/lib/collision_detection/cd_engine.cc
===================================================================
--- /branches/bsp_model/src/lib/collision_detection/cd_engine.cc	(revision 8216)
+++ /branches/bsp_model/src/lib/collision_detection/cd_engine.cc	(revision 8217)
@@ -32,4 +32,5 @@
 
 #include "bsp_manager.h"
+#include "bsp_entity.h"
 
 using namespace std;
@@ -101,5 +102,5 @@
   std::list<BaseObject*>::const_iterator bspIterator;
   std::list<WorldEntity*>::iterator entityIterator;
-  const std::list<BaseObject*>* bspList = ClassList::getList(CL_BSP_MODEL);
+  const std::list<BaseObject*>* bspList = ClassList::getList(CL_BSP_ENTITY);
   if( bspList == NULL)
     return;
@@ -108,5 +109,5 @@
   for( bspIterator = bspList->begin(); bspIterator != bspList->end(); bspIterator++) {
       for(entityIterator = list1.begin(); entityIterator != list1.end(); entityIterator++)
-        static_cast<BspManager*>(*bspIterator)->checkCollision(*entityIterator);
+        (static_cast<BspEntity*>(*bspIterator)->getBspManager())->checkCollision(*entityIterator);
   }
 }
Index: /branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc	(revision 8216)
+++ /branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc	(revision 8217)
@@ -39,6 +39,4 @@
 #include "movie_player.h"
 
-#include "cd_engine.h"
-
 #include "world_entity.h"
 
@@ -77,5 +75,4 @@
 void BspManager::load(const char* fileName, float scale)
 {
-  this->setClassID(CL_BSP_MODEL, "BspManager");
   // open a BSP file
   this->bspFile = new BspFile();
@@ -85,7 +82,4 @@
   this->root  = this->bspFile->get_root();
   this->alreadyVisible = new bool [this->bspFile->numFaces];
-
-  CDEngine::getInstance()->setBSPModel(this);
-
 }
 /*
@@ -872,54 +866,46 @@
   Vector out = dest;
 
-
-
-  if(!worldEntity->isA(CL_PLAYABLE)) {
-
-
-
-  }
-  else {
-
-    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;
-    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 {
-      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;
-
-      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;
+   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;
+   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 {
+     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;
+
+     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);
@@ -927,12 +913,10 @@
       //this->drawDebugCube(&out3);
 
-    }
+   }
 
     // Return the normal here: Normal's stored in this->collPlane;
-
-    if(collision)
-      worldEntity->registerCollision(worldEntity, Vector(this->collPlane->x, this->collPlane->y, this->collPlane->z), out);
-//       worldEntity->collidesWithGround(out,out1,out2);
-  }
+   if(collision)
+     worldEntity->registerCollision(worldEntity, Vector(this->collPlane->x, this->collPlane->y, this->collPlane->z), out);
+
 }
 
Index: /branches/bsp_model/src/lib/graphics/importer/bsp_manager.h
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/bsp_manager.h	(revision 8216)
+++ /branches/bsp_model/src/lib/graphics/importer/bsp_manager.h	(revision 8217)
@@ -20,8 +20,12 @@
 */
 
+#ifndef _BSP_MANAGER_H
+#define _BSP_MANAGER_H
+
+
 #include <vector>
 #include <deque>
 
-#include "base_object.h"
+
 
 // FORWARD DECLARATIONS
@@ -43,5 +47,5 @@
 };
 
-class BspManager : public BaseObject
+class BspManager
 {
 public:
@@ -106,2 +110,3 @@
 };
 
+#endif /* _BSP_MANAGER_H */
Index: /branches/bsp_model/src/world_entities/bsp_entity.h
===================================================================
--- /branches/bsp_model/src/world_entities/bsp_entity.h	(revision 8216)
+++ /branches/bsp_model/src/world_entities/bsp_entity.h	(revision 8217)
@@ -18,5 +18,5 @@
 class BSPEntity : public WorldEntity
 {
- 
+
  public:
   BSPEntity(const TiXmlElement* root = NULL);
@@ -24,5 +24,5 @@
 
   virtual void loadParams(const TiXmlElement* root);
-  
+
   void setName(const std::string& name);
 
@@ -33,4 +33,7 @@
   virtual void collidesWith (WorldEntity* entity, const Vector& location);
 
+  /** @returns the BspManager of this entity */
+  inline BspManager* getBspManager() { return this->bspManager; }
+
  private:
    BspManager* bspManager;
Index: /branches/bsp_model/src/world_entities/playable.cc
===================================================================
--- /branches/bsp_model/src/world_entities/playable.cc	(revision 8216)
+++ /branches/bsp_model/src/world_entities/playable.cc	(revision 8217)
@@ -66,4 +66,6 @@
   this->bDead = false;
 
+  this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_MODEL);
+
   registerVar( new SynchronizeableInt( &score, &score, "score" ) );
   registerVar( new SynchronizeableBool( &bFire, &bFire, "bFire", PERMISSION_OWNER));
@@ -79,5 +81,5 @@
   // this->setPlayer(NULL);
   // IN ITS DESTRUCTOR.
-  
+
   assert(this->currentPlayer == NULL);
 }
