Index: orxonox/branches/physics/src/util/animation/animation_player.cc
===================================================================
--- orxonox/branches/physics/src/util/animation/animation_player.cc	(revision 4301)
+++ orxonox/branches/physics/src/util/animation/animation_player.cc	(revision 4332)
@@ -28,5 +28,5 @@
 AnimationPlayer::AnimationPlayer () 
 {
-   this->setClassName ("AnimationPlayer");
+   this->setClassID(CL_ANIMATION_PLAYER, "AnimationPlayer");
 
    this->animationList = new tList<Animation>();
Index: orxonox/branches/physics/src/util/event/event.cc
===================================================================
--- orxonox/branches/physics/src/util/event/event.cc	(revision 4332)
+++ orxonox/branches/physics/src/util/event/event.cc	(revision 4332)
@@ -0,0 +1,51 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 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: ...
+   co-programmer: ...
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+
+#include "proto_class.h"
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+   \todo this constructor is not jet implemented - do it
+*/
+ProtoClass::ProtoClass () 
+{
+   this->setClassID(CL_PROTO_ID, "ProtoClass"); 
+
+   /* If you make a new class, what is most probably the case when you write this file
+      don't forget to:
+       1. Add the new file new_class.cc to the ./src/Makefile.am
+       2. Add the class identifier to ./src/class_list.h eg. CL_NEW_CLASS
+
+      Advanced Topics:
+      - if you want to let your object be managed via the ObjectManager make sure to read
+        the object_manager.h header comments. You will use this most certanly only if you
+	make many objects of your class, like a weapon bullet.
+   */
+}
+
+
+/**
+   \brief standard deconstructor
+
+*/
+ProtoClass::~ProtoClass () 
+{
+  // delete what has to be deleted here
+}
Index: orxonox/branches/physics/src/util/event/event.h
===================================================================
--- orxonox/branches/physics/src/util/event/event.h	(revision 4332)
+++ orxonox/branches/physics/src/util/event/event.h	(revision 4332)
@@ -0,0 +1,28 @@
+/*! 
+    \file proto_class.h
+    \brief Definition of ...
+
+*/
+
+#ifndef _PROTO_CLASS_H
+#define _PROTO_CLASS_H
+
+#include "base_object.h"
+
+// FORWARD DEFINITION
+
+
+
+//! A class for ...
+class ProtoClass : public BaseObject {
+
+ public:
+  ProtoClass();
+  virtual ~ProtoClass();
+
+
+ private:
+
+};
+
+#endif /* _PROTO_CLASS_H */
Index: orxonox/branches/physics/src/util/event/event_handler.cc
===================================================================
--- orxonox/branches/physics/src/util/event/event_handler.cc	(revision 4332)
+++ orxonox/branches/physics/src/util/event/event_handler.cc	(revision 4332)
@@ -0,0 +1,66 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 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: ...
+   co-programmer: ...
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+
+#include "proto_singleton.h"
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+*/
+ProtoSingleton::ProtoSingleton () 
+{
+   this->setClassName("ProtoSingleton");
+   this->setClassID(CL_PROTO_ID, "ProtoSingleton"); 
+
+   /* If you make a new class, what is most probably the case when you write this file
+      don't forget to:
+       1. Add the new file new_class.cc to the ./src/Makefile.am
+       2. Add the class identifier to ./src/class_list.h eg. CL_NEW_CLASS
+
+      Advanced Topics:
+      - if you want to let your object be managed via the ObjectManager make sure to read
+        the object_manager.h header comments. You will use this most certanly only if you
+	make many objects of your class, like a weapon bullet.
+   */
+}
+
+/**
+   \brief the singleton reference to this class
+*/
+ProtoSingleton* ProtoSingleton::singletonRef = NULL;
+
+/**
+   \returns a Pointer to this Class
+*/
+ProtoSingleton* ProtoSingleton::getInstance(void)
+{
+  if (!ProtoSingleton::singletonRef)
+    ProtoSingleton::singletonRef = new ProtoSingleton();
+  return ProtoSingleton::singletonRef;
+}
+
+/**
+   \brief standard deconstructor
+
+*/
+ProtoSingleton::~ProtoSingleton () 
+{
+  ProtoSingleton::singletonRef = NULL;
+
+}
Index: orxonox/branches/physics/src/util/event/event_handler.h
===================================================================
--- orxonox/branches/physics/src/util/event/event_handler.h	(revision 4332)
+++ orxonox/branches/physics/src/util/event/event_handler.h	(revision 4332)
@@ -0,0 +1,26 @@
+/*! 
+    \file proto_singleton.h
+    \brief Definition of the ... singleton Class
+    
+*/
+
+#ifndef _PROTO_SINGLETON_H
+#define _PROTO_SINGLETON_H
+
+#include "base_object.h"
+
+// FORWARD DEFINITION
+
+//! A default singleton class.
+class ProtoSingleton : public BaseObject {
+
+ public:
+  static ProtoSingleton* getInstance(void);
+  virtual ~ProtoSingleton(void);
+
+ private:
+  ProtoSingleton(void);
+  static ProtoSingleton* singletonRef;
+};
+
+#endif /* _PROTO_SINGLETON_H */
Index: orxonox/branches/physics/src/util/event/event_listener.cc
===================================================================
--- orxonox/branches/physics/src/util/event/event_listener.cc	(revision 4332)
+++ orxonox/branches/physics/src/util/event/event_listener.cc	(revision 4332)
@@ -0,0 +1,51 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 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: ...
+   co-programmer: ...
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+
+#include "proto_class.h"
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+   \todo this constructor is not jet implemented - do it
+*/
+ProtoClass::ProtoClass () 
+{
+   this->setClassID(CL_PROTO_ID, "ProtoClass"); 
+
+   /* If you make a new class, what is most probably the case when you write this file
+      don't forget to:
+       1. Add the new file new_class.cc to the ./src/Makefile.am
+       2. Add the class identifier to ./src/class_list.h eg. CL_NEW_CLASS
+
+      Advanced Topics:
+      - if you want to let your object be managed via the ObjectManager make sure to read
+        the object_manager.h header comments. You will use this most certanly only if you
+	make many objects of your class, like a weapon bullet.
+   */
+}
+
+
+/**
+   \brief standard deconstructor
+
+*/
+ProtoClass::~ProtoClass () 
+{
+  // delete what has to be deleted here
+}
Index: orxonox/branches/physics/src/util/event/event_listener.h
===================================================================
--- orxonox/branches/physics/src/util/event/event_listener.h	(revision 4332)
+++ orxonox/branches/physics/src/util/event/event_listener.h	(revision 4332)
@@ -0,0 +1,28 @@
+/*! 
+    \file proto_class.h
+    \brief Definition of ...
+
+*/
+
+#ifndef _PROTO_CLASS_H
+#define _PROTO_CLASS_H
+
+#include "base_object.h"
+
+// FORWARD DEFINITION
+
+
+
+//! A class for ...
+class ProtoClass : public BaseObject {
+
+ public:
+  ProtoClass();
+  virtual ~ProtoClass();
+
+
+ private:
+
+};
+
+#endif /* _PROTO_CLASS_H */
Index: orxonox/branches/physics/src/util/garbage_collector.cc
===================================================================
--- orxonox/branches/physics/src/util/garbage_collector.cc	(revision 4301)
+++ orxonox/branches/physics/src/util/garbage_collector.cc	(revision 4332)
@@ -38,5 +38,5 @@
 GarbageCollector::GarbageCollector () 
 {
-   this->setClassName ("GarbageCollection");
+   this->setClassID(CL_GARBAGE_COLLECTOR, "GarbageCollector");
    this->time = 0;
    this->delay = 1.5f; /* clean up all 5.0 seconds */
@@ -139,6 +139,5 @@
 	  /* then finaly delete reference */
 	  //delete entity;
-	  ObjectManager::getInstance()->addToDeadList(CL_TEST_BULLET, entity);
-	  ObjectManager::getInstance()->debug();
+	  ObjectManager::getInstance()->addToDeadList(entity->getClassID(), entity);
 	}
       entity = iterator->nextElement();
@@ -148,4 +147,6 @@
   PRINTF(3)("=============================\n");
 
+  ObjectManager::getInstance()->debug();
+
   /* reset time to count again up to this->delay */
   this->time = 0;
Index: orxonox/branches/physics/src/util/loading/game_loader.cc
===================================================================
--- orxonox/branches/physics/src/util/loading/game_loader.cc	(revision 4301)
+++ orxonox/branches/physics/src/util/loading/game_loader.cc	(revision 4332)
@@ -82,4 +82,7 @@
       delete campaignName;
     }
+  World* world0 = new World(DEBUG_WORLD_0);
+  world0->setNextStoryID(WORLD_ID_GAMEEND);
+  this->currentCampaign->addEntity(world0, WORLD_ID_2);
 }
 
Index: orxonox/branches/physics/src/util/loading/load_param.h
===================================================================
--- orxonox/branches/physics/src/util/loading/load_param.h	(revision 4301)
+++ orxonox/branches/physics/src/util/loading/load_param.h	(revision 4332)
@@ -180,4 +180,5 @@
   static LoadClassDescription* addClass(const char* className);
   LoadParamDescription* addParam(const char* paramName);
+  
 
   static void printAll(const char* fileName = NULL);
Index: orxonox/branches/physics/src/util/object_manager.cc
===================================================================
--- orxonox/branches/physics/src/util/object_manager.cc	(revision 4301)
+++ orxonox/branches/physics/src/util/object_manager.cc	(revision 4332)
@@ -28,11 +28,15 @@
 ObjectManager::ObjectManager () 
 {
-  this->setClassName ("ObjectManager");
+  this->setClassID(CL_OBJECT_MANAGER, "ObjectManager");
   
-  //this->managedObjectList = new BaseObject*[CL_NUMBER];
   this->managedObjectList = new tList<BaseObject>*[CL_NUMBER];
+  for(int i = 0; i < CL_NUMBER; ++i)
+    {
+      this->managedObjectList[i] = NULL;
+    }
 
   this->garbageCollector = GarbageCollector::getInstance();
 }
+
 
 /**
@@ -62,25 +66,14 @@
 
 
-void ObjectManager::cache(classList index, int number, const BaseObject &copyObject)
-{
-  //this->managedObjectList[index] = new BaseObject[number];
-  this->managedObjectList[index] = new tList<BaseObject>();
-  for(int i = 0; i < number; ++i)
-    {
-      this->managedObjectList[index]->add(new BaseObject(copyObject));
-    }
-}
-
-
-void ObjectManager::addToDeadList(classList index, BaseObject* object)
+void ObjectManager::addToDeadList(int index, BaseObject* object)
 {
   if( likely(this->managedObjectList[index] != NULL))
     this->managedObjectList[index]->add(object);
   else
-    PRINTF(0)(" Error: unable to add object to the list nr. %i: no list initialized - ignoring\n", index);
+    PRINTF(0)(" Critical: unable to add object to the list nr. %i: no list initialized - ignoring\n", index);
 }
 
 
-BaseObject* ObjectManager::getFromDeadList(classList index, int number)
+BaseObject* ObjectManager::getFromDeadList(int index, int number)
 {
   if( likely(this->managedObjectList[index] != NULL))
@@ -88,8 +81,13 @@
       BaseObject* obj = this->managedObjectList[index]->firstElement();
       this->managedObjectList[index]->remove(obj);
+      if( unlikely(obj == NULL))
+	{
+	  PRINTF(0)("Critical: there was no object anymore in the dead list! This could result in Segfaults\n");
+	}
       return obj;
     }
   else
-    PRINTF(0)(" Error: unable to get object from the list nr. %i: no elements initialized - ignoring\n", index);
+    PRINTF(0)(" Critical: unable to get object from the list nr. %i: no elements initialized - ignoring\n", index);
+  return NULL;
 }
 
@@ -102,5 +100,5 @@
   for(int i = 0; i < CL_NUMBER; ++i)
     {
-      if(this->managedObjectList[i] != NULL)
+      if( this->managedObjectList[i] != NULL)
 	PRINT(0)("=   o Class Nr. %i has cached %i object(s)\n", i, this->managedObjectList[i]->getSize());
       else
Index: orxonox/branches/physics/src/util/object_manager.h
===================================================================
--- orxonox/branches/physics/src/util/object_manager.h	(revision 4301)
+++ orxonox/branches/physics/src/util/object_manager.h	(revision 4332)
@@ -8,4 +8,10 @@
     - recycle deleted objects: specific for Projectils since there is a lot of world entity creation/deletion (and this needs a lot of time)
     - control the garbage collector
+
+    TO ADD SUPPORT FOR A CLASS do the following steps:
+    1. include the hader file : #include "class_header.h"
+    2. add the class to the type enum classList {}; in class_list.h
+    3. define a function void mCache( ClassName ) in class ObjectManager
+
 */
 
@@ -15,9 +21,9 @@
 
 #include "base_object.h"
-
-#define OM_
+#include "projectile.h"
+#include "list.h"
 
 #include "class_list.h"
-
+  
 
 class WorldEntity;
@@ -25,6 +31,16 @@
 
 
-template<class T> class tList; 
-template<class T> class ManagedObject;
+//! This defines the "template" makro function for cache(...)
+#define mCache( Class ) \
+ cache(classList index, int number, Class * copyObject)        \
+{                                                              \
+  this->managedObjectList[index] = new tList<BaseObject>(); \
+  for(int i = 0; i < number; ++i)\
+    {\
+      this->managedObjectList[index]->add(new Class (*copyObject));\
+    }\
+}
+
+
 
 //! the object manager itself
@@ -35,7 +51,7 @@
   virtual ~ObjectManager(void);
   
-  void cache(classList index, int number, const BaseObject &copyObject);
-  void addToDeadList(classList index, BaseObject* object);
-  BaseObject* getFromDeadList(classList index, int number = 1);
+  void mCache(Projectile);
+  void addToDeadList(int index, BaseObject* object);
+  BaseObject* getFromDeadList(int index, int number = 1);
 
   void debug();
@@ -43,7 +59,7 @@
  private:
   ObjectManager(void);
+
   static ObjectManager* singletonRef;
 
-  //BaseObject** managedObjectList;
   tList<BaseObject>** managedObjectList;
   GarbageCollector* garbageCollector;
Index: orxonox/branches/physics/src/util/resource_manager.cc
===================================================================
--- orxonox/branches/physics/src/util/resource_manager.cc	(revision 4301)
+++ orxonox/branches/physics/src/util/resource_manager.cc	(revision 4332)
@@ -38,5 +38,5 @@
 ResourceManager::ResourceManager () 
 {
-   this->setClassName ("ResourceManager");
+   this->setClassID(CL_RESOURCE_MANAGER, "ResourceManager");
    this->dataDir = NULL;
    this->setDataDir("./");
Index: orxonox/branches/physics/src/util/track/track_manager.cc
===================================================================
--- orxonox/branches/physics/src/util/track/track_manager.cc	(revision 4301)
+++ orxonox/branches/physics/src/util/track/track_manager.cc	(revision 4332)
@@ -370,5 +370,5 @@
 TrackManager::TrackManager(void)
 {
-  this->setClassName("TrackManager");
+  this->setClassID(CL_TRACK_MANAGER, "TrackManager");
   
   TrackManager::singletonRef = this; // do this because otherwise the TrackNode cannot get The instance of the TrackManager
Index: orxonox/branches/physics/src/util/track/track_node.cc
===================================================================
--- orxonox/branches/physics/src/util/track/track_node.cc	(revision 4301)
+++ orxonox/branches/physics/src/util/track/track_node.cc	(revision 4332)
@@ -32,5 +32,5 @@
 TrackNode::TrackNode () 
 {
-  this->setClassName("TrackNode");
+  this->setClassID(CL_TRACK_NODE, "TrackNode");
   this->setName("TrackNode"); /* absolete but still used... */
 
