Index: trunk/src/defs/class_id.h
===================================================================
--- trunk/src/defs/class_id.h	(revision 7922)
+++ trunk/src/defs/class_id.h	(revision 7927)
@@ -249,4 +249,5 @@
   /// Collision
   CL_COLLISION                  =    0x00000711,
+  CL_COLLISION_HANDLE           =    0x00000712,
   CL_BV_TREE                    =    0x00701000,
   CL_BV_TREE_NODE               =    0x00702000,
Index: trunk/src/defs/include_paths.am
===================================================================
--- trunk/src/defs/include_paths.am	(revision 7922)
+++ trunk/src/defs/include_paths.am	(revision 7927)
@@ -24,4 +24,5 @@
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/physics/fields
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/collision_detection
+AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/collision_reaction
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/newmat
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/sound
Index: trunk/src/lib/collision_reaction/Makefile.am
===================================================================
--- trunk/src/lib/collision_reaction/Makefile.am	(revision 7922)
+++ trunk/src/lib/collision_reaction/Makefile.am	(revision 7927)
@@ -4,8 +4,10 @@
 noinst_LIBRARIES = libORXcr.a
 
-libORXcr_a_SOURCES = cr_engine.cc
+libORXcr_a_SOURCES = cr_engine.cc \
+                     collision_handle.cc
 
 
 
-noinst_HEADERS =     cr_engine.h
+noinst_HEADERS =     cr_engine.h \
+ 										 collision_handle.h
 
Index: trunk/src/lib/collision_reaction/collision_handle.cc
===================================================================
--- trunk/src/lib/collision_reaction/collision_handle.cc	(revision 7922)
+++ trunk/src/lib/collision_reaction/collision_handle.cc	(revision 7927)
@@ -10,5 +10,5 @@
 
    ### File Specific:
-   main-programmer: Patirick Boenzli
+   main-programmer: Patrick Boenzli
 */
 
@@ -24,7 +24,10 @@
  * @todo this constructor is not jet implemented - do it
 */
-CollisionHandle::CollisionHandle ()
+CollisionHandle::CollisionHandle (WorldEntity* owner, CREngine::CRType type)
 {
-   this->setClassID(CL_COLLISION_HANDLE, "CollisionHandle");
+  this->setClassID(CL_COLLISION_HANDLE, "CollisionHandle");
+
+  this->owner = owner;
+  this->type = type;
 
 }
Index: trunk/src/lib/collision_reaction/collision_handle.h
===================================================================
--- trunk/src/lib/collision_reaction/collision_handle.h	(revision 7922)
+++ trunk/src/lib/collision_reaction/collision_handle.h	(revision 7927)
@@ -8,6 +8,14 @@
 
 #include "base_object.h"
+#include "cr_engine.h"
+
+#include <vector>
+
 
 class Collision;
+class WorldEntity;
+
+// struct CRType;
+
 
 //! A class for defining collision reactions and storing events
@@ -15,6 +23,9 @@
 
  public:
-  CollisionHandle();
+  CollisionHandle(WorldEntity* owner, CREngine::CRType type);
   virtual ~CollisionHandle();
+
+
+  void addTarget();
 
   void registerCollision(Collision* collision);
@@ -25,11 +36,11 @@
  private:
    WorldEntity*                  owner;                   //!< the worldenity this reaction will be applied on
-   classID                       targetClass;             //!< the entities triggering the handle
+   CREngine::CRType              type;                    //!< the reaction type
 
    bool                          bDispatched;             //!< true if this handle has already been dispatched
-   bool                          bStopOnFirstCollision    //!< true if the cd of this object should be terminated after one match
+   bool                          bStopOnFirstCollision;   //!< true if the cd of this object should be terminated after one match
 
    std::vector<Collision*>       collisionList;           //!< a list full of collisions
-   std::vector<classID>          targetList;              //!< a list of target classes for filtering
+   std::vector<long>             targetList;              //!< a list of target classes for filtering
 
 };
Index: trunk/src/lib/collision_reaction/cr_engine.cc
===================================================================
--- trunk/src/lib/collision_reaction/cr_engine.cc	(revision 7922)
+++ trunk/src/lib/collision_reaction/cr_engine.cc	(revision 7927)
@@ -47,10 +47,11 @@
 
 
-CollisionHandle* CREngine::subscribeReaction(WorldEntity* worldEntity, CRType type, int nrOfTargets, ...)
+CollisionHandle* CREngine::subscribeReaction(WorldEntity* owner, CRType type, int nrOfTargets, ...)
 {
+
   va_list itemlist;
   va_start (itemlist, type);
-  for (int i = 0; i < nrOfTargets; i++)
-    this->targetList.push_back(va_arg(itemlist, int));
+//  for (int i = 0; i < nrOfTargets; i++)
+  //  this->targetList.push_back(va_arg(itemlist, int));
   va_end(itemlist);
 }
Index: trunk/src/lib/collision_reaction/cr_engine.h
===================================================================
--- trunk/src/lib/collision_reaction/cr_engine.h	(revision 7922)
+++ trunk/src/lib/collision_reaction/cr_engine.h	(revision 7927)
@@ -20,6 +20,9 @@
 {
 
+  public:
   typedef enum CRType {
-    CR_CONSERVATION_OF_MOMENTUM   = 0,
+    CR_PHYSICS_MOMENTUM   = 0,
+    CR_PHYSICS_GROUND,
+    CR_PHYSICS_GROUND_WALK,
 
     CR_OBJECT_DAMAGE,
@@ -28,12 +31,11 @@
     CR_VERTEX_TRAFO,
 
-    CR_CALLBACK,
+    CR_SPECIAL_CALLBACK,
 
     CR_NUMBER
   };
 
+  virtual ~CREngine(void);
 
-public:
-  virtual ~CREngine(void);
   /** @returns a Pointer to the only object of this Class */
   inline static CREngine* getInstance(void) { if (!singletonRef) singletonRef = new CREngine();  return singletonRef; };
@@ -57,8 +59,8 @@
   CREngine(void);
 
+
 private:
   std::vector<CollisionHandle*>       collisionHandles;         //!< list with the collision handles
   std::vector<Collision*>             cachedCollisions;         //!< a list of unused, cached collision events
-  std::vector<int>                    targetList;
 
   static CREngine*                    singletonRef;             //!< the reference to the CREngine object (singleton)
Index: trunk/src/world_entities/world_entity.cc
===================================================================
--- trunk/src/world_entities/world_entity.cc	(revision 7922)
+++ trunk/src/world_entities/world_entity.cc	(revision 7927)
@@ -32,4 +32,8 @@
 #include "camera.h"
 
+#include "cr_engine.h"
+#include "collision_handle.h"
+
+
 using namespace std;
 
@@ -65,4 +69,6 @@
 
   this->toList(OM_NULL);
+
+  //this->collisionHandles = new *CollisionHandle[CREngine::CR_NUMBER]();
 }
 
@@ -228,4 +234,15 @@
 }
 
+
+/**
+ * subscribes this world entity to a collision reaction
+ *  @param type the type of reaction to subscribe to
+ *  @param nrOfTargets number of target filters
+ *  @param ... the targets as classIDs
+ */
+void WorldEntity::subscribeReaction(CREngine::CRType type, int nrOfTargets, ...)
+{}
+
+
 /**
  * @brief moves this entity to the List OM_List
Index: trunk/src/world_entities/world_entity.h
===================================================================
--- trunk/src/world_entities/world_entity.h	(revision 7922)
+++ trunk/src/world_entities/world_entity.h	(revision 7927)
@@ -11,7 +11,11 @@
 #include "model.h"
 
+#include "cr_engine.h"
 #include "object_manager.h"
 #include "glincl.h"
 #include <vector>
+#include <stdarg.h>
+
+
 
 // FORWARD DECLARATION
@@ -21,4 +25,6 @@
 class BVTree;
 class Model;
+class CollisionHandle;
+
 
 //class CharacterAttributes;
@@ -54,4 +60,5 @@
   virtual void draw () const;
 
+  /* --- Collision Detection Block  --- */
   bool buildObbTree(int depth);
   virtual void collidesWith (WorldEntity* entity, const Vector& location);
@@ -60,7 +67,6 @@
   void drawBVTree(int depth, int drawMode) const;
 
-  void debugWE() { this->debugEntity(); }
-  ;  ///FIXME
-  void debugEntity() const;
+  /* --- Collision Reaction Block --- */
+  void subscribeReaction(CREngine::CRType type, int nrOfTargets, ...);
 
 
@@ -72,7 +78,6 @@
   //  CharacterAttributes* getCharacterAttributes();
 
+  /* --- Object Manager Block --- */
   void toList(OM_LIST list);
-
-
   /** @returns a Reference to the objectListNumber to set. */
   OM_LIST& getOMListNumber() { return this->objectListNumber; }
@@ -80,7 +85,9 @@
   ObjectManager::EntityList::iterator& getEntityIterator() { return this->objectListIterator; }
 
+  /* --- Network Block --- */
   int       writeState(const byte* data, int length, int sender);
   int       readState(byte* data, int maxLength );
 
+  /* --- Character Attribute Block --- */
   /** @returns the Energy of the entity */
   float getHealth() const { return this->health; };
@@ -92,4 +99,10 @@
   OrxGui::GLGuiWidget* getHealthWidget();
   bool hasHealthWidget() const { return this->healthWidget; };
+
+  /* --- Misc Stuff Block --- */
+  void debugWE() { this->debugEntity(); }
+  ;  ///FIXME
+  void debugEntity() const;
+
 
 protected:
@@ -121,4 +134,5 @@
 
   float                   scaling;
+  CollisionHandle**       collisionHandles;
 
 
