Index: /trunk/src/defs/debug.h
===================================================================
--- /trunk/src/defs/debug.h	(revision 6141)
+++ /trunk/src/defs/debug.h	(revision 6142)
@@ -110,5 +110,5 @@
 #endif
 #ifndef NO_SHELL
-#define PRINT_EXEC       printf //ShellBuffer::addBufferLineStatic
+#define PRINT_EXEC       ShellBuffer::addBufferLineStatic
 #else /* NO_SHELL */
 #define PRINT_EXEC       printf
Index: /trunk/src/lib/collision_detection/cd_engine.cc
===================================================================
--- /trunk/src/lib/collision_detection/cd_engine.cc	(revision 6141)
+++ /trunk/src/lib/collision_detection/cd_engine.cc	(revision 6142)
@@ -65,46 +65,71 @@
     be able to enhance iteration speed.
  */
-void CDEngine::checkCollisions()
-{
-  this->checkCollisionObjects();
+//void CDEngine::checkCollisions()
+//{
+//  this->checkCollisionObjects();
   //this->checkCollisionGround();
-}
-
-#include "class_list.h"
-#include "state.h"
+//}
+
 /**
  *  this checks the collisions with the objects
  */
-void CDEngine::checkCollisionObjects()
+//void CDEngine::checkCollisionObjects()
+//{
+//   BVTree* tree;
+//   tIterator<WorldEntity>* iterator1 = entityList->getIterator();
+//   tIterator<WorldEntity>* iterator2 = entityList->getIterator();
+//   WorldEntity* entity1 = iterator1->firstElement();
+//   WorldEntity* entity2 = iterator2->iteratorElement(iterator1);
+//   PRINTF(3)("checking for collisions\n");
+//   while( entity1 != NULL)
+//   {
+//     if( likely(entity1 != this->terrain))
+//     {
+//       entity2 = iterator2->nextElement();
+//
+//       while( entity2 != NULL)
+//       {
+//         if( likely(entity2 != this->terrain))
+//         {
+//           PRINTF(4)("checking object %s against %s\n", entity1->getName(), entity2->getName());
+//           tree = entity1->getOBBTree();
+//           if( likely(tree != NULL) && entity2->getOBBTree() != NULL) tree->collideWith(entity1, entity2);
+//         }
+//         entity2 = iterator2->nextElement();
+//       }
+//     }
+//     entity1 = iterator1->nextElement();
+//     entity2 = iterator2->iteratorElement(iterator1);
+//     entity2 = iterator2->nextElement();
+//   }
+//   delete iterator1;
+//   delete iterator2;
+//}
+
+void CDEngine::checkCollisions(std::list<WorldEntity*>& list1, std::list<WorldEntity*>& list2)
 {
   BVTree* tree;
-  tIterator<WorldEntity>* iterator1 = entityList->getIterator();
-  tIterator<WorldEntity>* iterator2 = entityList->getIterator();
-  WorldEntity* entity1 = iterator1->firstElement();
-  WorldEntity* entity2 = iterator2->iteratorElement(iterator1);
+  std::list<WorldEntity*>::iterator entity1, entity2, pre1, pre2;
   PRINTF(3)("checking for collisions\n");
-  while( entity1 != NULL)
+
+  pre1 = list1.begin();
+  while (pre1 != list1.end())
   {
-    if( likely(entity1 != this->terrain))
+    entity1 = pre1++;
+    if( likely((*entity1) != this->terrain))
     {
-      entity2 = iterator2->nextElement();
-
-      while( entity2 != NULL)
+      pre2 = list2.begin();
+      while (pre2 != list2.end())
       {
-        if( likely(entity2 != this->terrain))
+        entity2 = pre2++;
+        if( likely((*entity2) != this->terrain))
         {
-          PRINTF(4)("checking object %s against %s\n", entity1->getName(), entity2->getName());
-          tree = entity1->getOBBTree();
-          if( likely(tree != NULL) && entity2->getOBBTree() != NULL) tree->collideWith(entity1, entity2);
+          PRINTF(4)("checking object %s against %s\n", (*entity1)->getName(), (*entity2)->getName());
+          tree = (*entity1)->getOBBTree();
+          if( likely(tree != NULL) && (*entity2)->getOBBTree() != NULL) tree->collideWith(*entity1, *entity2);
         }
-        entity2 = iterator2->nextElement();
       }
     }
-    entity1 = iterator1->nextElement();
-    entity2 = iterator2->iteratorElement(iterator1);
-    entity2 = iterator2->nextElement();
   }
-  delete iterator1;
-  delete iterator2;
 }
 
@@ -134,6 +159,6 @@
   /* this would operate on  worldList bases, for testing purposes, we only use one OBBTree */
   //this->rootTree->drawBV(depth, drawMode);
-
-  tIterator<WorldEntity>* iterator = entityList->getIterator();
+  /// FIXME
+/*  tIterator<WorldEntity>* iterator = entityList->getIterator();
   WorldEntity* entity = iterator->firstElement();
   while( entity != NULL)
@@ -142,5 +167,5 @@
     entity = iterator->nextElement();
   }
-  delete iterator;
+  delete iterator;*/
 }
 
Index: /trunk/src/lib/collision_detection/cd_engine.h
===================================================================
--- /trunk/src/lib/collision_detection/cd_engine.h	(revision 6141)
+++ /trunk/src/lib/collision_detection/cd_engine.h	(revision 6142)
@@ -12,6 +12,6 @@
 #include "model.h"
 
+#include <list>
 
-template<class T> class tList;
 class WorldEntity;
 class OBBTree;
@@ -49,5 +49,4 @@
   inline void disable(const int options) { int temp = this->state & options; this->state ^= temp; }
 
-  inline void setEntityList(tList<WorldEntity>* entityList) { this->entityList = entityList; }
   inline void setTerrain(Terrain* terrain) { this->terrain = terrain; }
   //  inline void setPlayer(Player* player) { this->player = player; } /* only for debug purposes \todo: delete*/
@@ -55,5 +54,6 @@
   void drawBV(int depth, int drawMode) const;
 
-  void checkCollisions();
+//  void checkCollisions();
+  void checkCollisions(std::list<WorldEntity*>& list1, std::list<WorldEntity*>& list2);
 
   void debug();
@@ -75,5 +75,4 @@
  private:
   int                     state;                            //!< the current state of the cd engine
-  tList<WorldEntity>*     entityList;                       //!< pointer to the world entity list
   OBBTree*                rootTree;                         //!< for testing purposes a root tree
 
Index: /trunk/src/lib/coord/p_node.cc
===================================================================
--- /trunk/src/lib/coord/p_node.cc	(revision 6141)
+++ /trunk/src/lib/coord/p_node.cc	(revision 6142)
@@ -81,5 +81,5 @@
     {
       deleteNode = tmp;
-      ++tmp;
+      tmp++;
 //      printf("TEST::%s(%s) %s\n", (*deleteNode)->getName(), (*deleteNode)->getClassName(), this->getName());
       if ((this->parentMode & PNODE_PROHIBIT_CHILD_DELETE) ||
@@ -470,4 +470,5 @@
               this->getClassName(), this->getName(), child->getClassName(), child->getName());
     child->parent = NULL;
+    child->parentCoorChanged();
   }
 }
@@ -536,5 +537,6 @@
     if (this->parentMode & PNODE_REPARENT_CHILDREN_ON_REMOVE ||
         (*reparenter)->parentMode & PNODE_REPARENT_ON_PARENTS_REMOVE)
-    {      printf("TEST----------------%s ---- %s\n", this->getClassName(), (*reparenter)->getClassName());
+    {
+      printf("TEST----------------%s ---- %s\n", this->getClassName(), (*reparenter)->getClassName());
       (*reparenter)->reparent();
       printf("REPARENTED TO: %s::%s\n",(*reparenter)->getParent()->getClassName(),(*reparenter)->getParent()->getName());
@@ -542,5 +544,8 @@
   }
   if (this->parent != NULL)
+  {
     this->parent->eraseChild(this);
+    this->parent = NULL;
+  }
 }
 
Index: /trunk/src/lib/coord/p_node.h
===================================================================
--- /trunk/src/lib/coord/p_node.h	(revision 6141)
+++ /trunk/src/lib/coord/p_node.h	(revision 6142)
@@ -79,5 +79,5 @@
 
   // ACTIVATION //
-  inline void activateNode() { this->bActive = true; };
+  inline void activateNode() { this->bActive = this->bRelCoorChanged = this->bRelDirChanged = true; };
   inline void deactivateNode() { this->bActive = false; };
   inline bool getNodeActiveState() { return this->bActive; };
Index: /trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- /trunk/src/lib/graphics/graphics_engine.cc	(revision 6141)
+++ /trunk/src/lib/graphics/graphics_engine.cc	(revision 6142)
@@ -19,4 +19,6 @@
 #include "resource_manager.h"
 #include "event_handler.h"
+
+#include "world_entity.h"
 
 #include "render_2d.h"
@@ -573,4 +575,13 @@
 }
 
+void GraphicsEngine::draw(const std::list<WorldEntity*>& drawList ) const
+{
+  std::list<WorldEntity*>::const_iterator entity;
+  for (entity = drawList.begin(); entity != drawList.end(); entity++)
+    if ((*entity)->isVisible()) 
+      (*entity)->draw(); 
+}
+
+
 /**
  * displays the Frames per second
Index: /trunk/src/lib/graphics/graphics_engine.h
===================================================================
--- /trunk/src/lib/graphics/graphics_engine.h	(revision 6141)
+++ /trunk/src/lib/graphics/graphics_engine.h	(revision 6142)
@@ -15,8 +15,11 @@
 #include "glincl.h"
 
+#include <list>
+
 // Forward Declaration
 class Text;
 class IniParser;
 class SubString;
+class WorldEntity;
 
 //! class to handle graphics
@@ -66,4 +69,5 @@
     void tick(float dt);
     void draw() const;
+    void draw(const std::list<WorldEntity*>& drawList) const;
     void displayFPS(bool display);
 
Index: /trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- /trunk/src/lib/graphics/render2D/element_2d.cc	(revision 6141)
+++ /trunk/src/lib/graphics/render2D/element_2d.cc	(revision 6142)
@@ -18,4 +18,6 @@
 #include "element_2d.h"
 #include "render_2d.h"
+
+#include <algorithm>
 
 #include "p_node.h"
@@ -82,5 +84,5 @@
   if (this->parent != NULL)
   {
-    this->parent->children.remove(this);
+    this->parent->eraseChild(this);
     this->parent = NULL;
   }
@@ -512,5 +514,5 @@
   {
     PRINTF(5)("Element2D::addChild() - reparenting node: removing it and adding it again\n");
-    child->parent->children.remove(child);
+    child->parent->eraseChild(child);
   }
   child->parent = this;
@@ -581,5 +583,5 @@
   if (this->parent != NULL)
   {
-    this->parent->children.remove(this);
+    this->parent->eraseChild(this);
     this->parent = NULL;
   }
@@ -655,4 +657,11 @@
   if (parentNode != NULL)
     this->setParentSoft2D(parentNode, bias);
+}
+
+/** @param child the child to be erased from this Nodes List */
+void Element2D::eraseChild(Element2D* child)
+{
+  std::list<Element2D*>::iterator childIT = std::find(this->children.begin(), this->children.end(), child);
+  this->children.erase(childIT);
 }
 
@@ -733,5 +742,5 @@
     else if (unlikely(this->bindNode != NULL))
     {
-      GLdouble projectPos[3];
+      GLdouble projectPos[3] = {0, 0, 0};
       gluProject(this->bindNode->getAbsCoor().x,
                  this->bindNode->getAbsCoor().y,
Index: /trunk/src/lib/graphics/render2D/element_2d.h
===================================================================
--- /trunk/src/lib/graphics/render2D/element_2d.h	(revision 6141)
+++ /trunk/src/lib/graphics/render2D/element_2d.h	(revision 6142)
@@ -195,4 +195,5 @@
 
   private:
+    void eraseChild(Element2D* child);
     /** tells the child that the parent's Coordinate has changed */
     inline void parentCoorChanged () { this->bRelCoorChanged = true; }
Index: /trunk/src/lib/sound/sound_engine.cc
===================================================================
--- /trunk/src/lib/sound/sound_engine.cc	(revision 6141)
+++ /trunk/src/lib/sound/sound_engine.cc	(revision 6142)
@@ -141,7 +141,5 @@
     if (!this->ALSources.empty())
     {
-
       source = this->ALSources.top();
-      printf("test: : %d\n", source);
       this->ALSources.pop();
     }
Index: /trunk/src/lib/sound/sound_source.cc
===================================================================
--- /trunk/src/lib/sound/sound_source.cc	(revision 6141)
+++ /trunk/src/lib/sound/sound_source.cc	(revision 6142)
@@ -69,5 +69,4 @@
     SoundEngine::getInstance()->popALSource(this->sourceID);
 
-  //printf("%d\n",sourceID);
   alSourceStop(this->sourceID);
   alSourcei (this->sourceID, AL_BUFFER, buffer->getID());
Index: /trunk/src/orxonox.cc
===================================================================
--- /trunk/src/orxonox.cc	(revision 6141)
+++ /trunk/src/orxonox.cc	(revision 6142)
@@ -43,5 +43,4 @@
 #include "text_engine.h"
 #include "event_handler.h"
-#include "garbage_collector.h"
 
 #include "factory.h"
@@ -96,5 +95,4 @@
   // game-specific
   delete GameLoader::getInstance();
-  delete GarbageCollector::getInstance();
 
   // class-less services/factories
Index: /trunk/src/story_entities/network_world.cc
===================================================================
--- /trunk/src/story_entities/network_world.cc	(revision 6141)
+++ /trunk/src/story_entities/network_world.cc	(revision 6142)
@@ -38,5 +38,4 @@
 #include "shell.h"
 
-#include "garbage_collector.h"
 #include "fast_factory.h"
 #include "animation_player.h"
@@ -123,9 +122,4 @@
   PRINTF(3)("NetworkWorld::~NetworkWorld() - deleting current world\n");
 
-
-  // here everything that is alocated by the NetworkWorld is deleted
-  delete this->entities;
-  State::setWorldEntityList(NULL);
-
   delete this->localPlayer;
 
@@ -141,5 +135,6 @@
   SoundEngine::getInstance()->flushAllSources();
 
-
+  if (State::getObjectManager() == &this->objectManager)
+    State::setObjectManager(NULL);
   // erease everything that is left.
   delete PNode::getNullParent();
@@ -180,5 +175,4 @@
   this->music = NULL;
   this->shell = NULL;
-  this->entities = NULL;
   this->localPlayer = NULL;
   this->localCamera = NULL;
@@ -214,5 +208,5 @@
 ErrorMessage NetworkWorld::preLoad()
 {
-  State::setWorldEntityList(this->entities = new tList<WorldEntity>());
+  State::setObjectManager(&this->objectManager);
   this->cycle = 0;
 
@@ -233,6 +227,4 @@
 
   GraphicsEngine::getInstance()->displayFPS(true);
-
-  CDEngine::getInstance()->setEntityList( this->entities);
 }
 
@@ -630,14 +622,4 @@
 
 /**
- *  gets the list of entities from the world
- * @returns entity list
-*/
-tList<WorldEntity>* NetworkWorld::getEntities()
-{
-  return this->entities;
-}
-
-
-/**
  *  this returns the current game time
  * @returns elapsed game time
@@ -648,21 +630,20 @@
 }
 
-
 /**
  *  function to put your own debug stuff into it. it can display informations about
    the current class/procedure
 */
-void NetworkWorld::debug()
-{
-  PRINTF(0)("Printing out the List of alive NetworkWorldEntities:\n");
-  tIterator<WorldEntity>* iterator = this->entities->getIterator();
-  WorldEntity* entity = iterator->firstElement();
-  while( entity != NULL)
-  {
-    PRINTF(0)("%s::%s\n", entity->getClassName(), entity->getName());
-    entity = iterator->nextElement();
-  }
-  delete iterator;
-}
+// void NetworkWorld::debug()
+// {
+//   PRINTF(0)("Printing out the List of alive NetworkWorldEntities:\n");
+//   tIterator<WorldEntity>* iterator = this->entities->getIterator();
+//   WorldEntity* entity = iterator->firstElement();
+//   while( entity != NULL)
+//   {
+//     PRINTF(0)("%s::%s\n", entity->getClassName(), entity->getName());
+//     entity = iterator->nextElement();
+//   }
+//   delete iterator;
+// }
 
 
@@ -682,5 +663,5 @@
     {
       ++this->cycle;
-      PRINTF(4)("NetworkWorld::mainloop() - number of entities: %i\n", this->entities->getSize());
+//      PRINTF(4)("NetworkWorld::mainloop() - number of entities: %i\n", this->entities->getSize());
       // Network
       this->synchronize ();
@@ -727,4 +708,11 @@
 }
 
+void NetworkWorld::tick(std::list<WorldEntity*> entityList, float dt)
+{
+  std::list<WorldEntity*>::iterator entity;
+  for (entity = entityList.begin(); entity != entityList.end(); entity++)
+    (*entity)->tick(dt);
+
+}
 
 /**
@@ -763,12 +751,9 @@
       this->gameTime += this->dtS;
 
-      tIterator<WorldEntity>* iterator = this->entities->getIterator();
-      WorldEntity* entity = iterator->firstElement();
-      while( entity != NULL)
-        {
-          entity->tick (this->dtS);
-          entity = iterator->nextElement();
-        }
-      delete iterator;
+/*      this->tick(this->objectManager.getObjectList(OM_DEAD_TICK), this->dtS);
+      this->tick(this->objectManager.getObjectList(OM_COMMON), this->dtS);
+      this->tick(this->objectManager.getObjectList(OM_GROUP_00), this->dtS);*/
+      this->tick(this->objectManager.getObjectList(OM_GROUP_01), this->dtS);
+      this->tick(this->objectManager.getObjectList(OM_GROUP_01_PROJ), this->dtS);
 
       /* update tick the rest */
@@ -780,5 +765,4 @@
 
       ParticleEngine::getInstance()->tick(this->dtS);
-      GarbageCollector::getInstance()->tick(this->dtS);
 
 
@@ -805,5 +789,4 @@
 void NetworkWorld::update()
 {
-  GarbageCollector::getInstance()->update();
   GraphicsEngine::getInstance()->update(this->dtS);
   PNode::getNullParent()->updateNode (this->dtS);
@@ -816,5 +799,8 @@
 void NetworkWorld::collide()
 {
-  CDEngine::getInstance()->checkCollisions();
+  CDEngine::getInstance()->checkCollisions(this->objectManager.getObjectList(OM_GROUP_00),
+                                            this->objectManager.getObjectList(OM_GROUP_01_PROJ));
+  CDEngine::getInstance()->checkCollisions(this->objectManager.getObjectList(OM_GROUP_01),
+                                            this->objectManager.getObjectList(OM_COMMON));
 }
 
@@ -846,16 +832,18 @@
 void NetworkWorld::draw ()
 {
-  /* draw entities */
-  WorldEntity* entity;
-  glLoadIdentity();
-  tIterator<WorldEntity>* iterator = this->entities->getIterator();
-  entity = iterator->firstElement();
-  while( entity != NULL )
-  {
-    if( entity->isVisible() ) entity->draw();
-    if( unlikely( this->showBV)) entity->drawBVTree(3, 226);  // to draw the bounding boxes of the objects at level 2 for debug purp
-    entity = iterator->nextElement();
-  }
-  delete iterator;
+  GraphicsEngine* engine = GraphicsEngine::getInstance();
+  engine->draw(State::getObjectManager()->getObjectList(OM_ENVIRON_NOTICK));
+  engine->draw(State::getObjectManager()->getObjectList(OM_ENVIRON));
+  engine->draw(State::getObjectManager()->getObjectList(OM_COMMON));
+  engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_00));
+  engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_01));
+  engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_01_PROJ));
+
+//   {
+//     if( entity->isVisible() ) entity->draw();
+  //FIXME
+//     if( unlikely( this->showBV)) entity->drawBVTree(3, 226);  // to draw the bounding boxes of the objects at level 2 for debug purp
+//     entity = iterator->nextElement();
+//   }
 
   glCallList (objectList);
@@ -866,5 +854,5 @@
     PNode::getNullParent()->debugDraw(0);
 
-  GraphicsEngine::getInstance()->draw();
+  engine->draw();
   //TextEngine::getInstance()->draw();
 }
@@ -876,5 +864,5 @@
 void NetworkWorld::spawn(WorldEntity* entity)
 {
-  this->entities->add (entity);
+//   this->entities->add (entity);
   entity->postSpawn ();
 }
@@ -889,5 +877,5 @@
 void NetworkWorld::spawn(WorldEntity* entity, Vector* absCoor, Quaternion* absDir)
 {
-  this->entities->add (entity);
+//   this->entities->add (entity);
 
   entity->setAbsCoor (*absCoor);
@@ -915,5 +903,5 @@
       entity->setRelDir (*relDir);
 
-      this->entities->add (entity);
+//       this->entities->add (entity);
 
       entity->postSpawn ();
Index: /trunk/src/story_entities/network_world.h
===================================================================
--- /trunk/src/story_entities/network_world.h	(revision 6141)
+++ /trunk/src/story_entities/network_world.h	(revision 6142)
@@ -11,6 +11,8 @@
 #include "story_entity.h"
 #include "p_node.h"
+#include "object_manager.h"
 
 class NetworkWorld;
+
 class WorldEntity;
 class Camera;
@@ -18,11 +20,8 @@
 class GLMenuImageScreen;
 class Terrain;
-class GarbageCollector;
-class Text;
 class TiXmlElement;
 
 class Shell;
 class OggPlayer;
-template<class T> class tList;
 
 //! The game world
@@ -61,6 +60,4 @@
   bool command (Command* cmd);
 
-  tList<WorldEntity>* getEntities();
-
   /* interface to world */
   void spawn (WorldEntity* entity);
@@ -84,4 +81,5 @@
   void synchronize ();
   void handleInput ();
+  void tick (std::list<WorldEntity*> worldEntity, float dt);
   void tick ();
   void update ();
@@ -104,4 +102,6 @@
     bool bPause;                        //!< pause mode
 
+    ObjectManager      objectManager;   //!< The ObjectManager of this World.
+
     GLMenuImageScreen* glmis;           //!< The Level-Loader Display
 
@@ -118,5 +118,5 @@
 
     GLuint objectList;                  //!< temporary: @todo this will be ereased soon
-    tList<WorldEntity>* entities;       //!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
+
     Player* localPlayer;                //!< The Player, you fly through the level.
 };
Index: /trunk/src/story_entities/world.cc
===================================================================
--- /trunk/src/story_entities/world.cc	(revision 6141)
+++ /trunk/src/story_entities/world.cc	(revision 6142)
@@ -38,5 +38,4 @@
 #include "shell.h"
 
-#include "garbage_collector.h"
 #include "fast_factory.h"
 #include "animation_player.h"
@@ -123,9 +122,4 @@
   PRINTF(3)("World::~World() - deleting current world\n");
 
-
-  // here everything that is alocated by the World is deleted
-  delete this->entities;
-  State::setWorldEntityList(NULL);
-
   delete this->localPlayer;
 
@@ -141,5 +135,6 @@
   SoundEngine::getInstance()->flushAllSources();
 
-
+  if (State::getObjectManager() == &this->objectManager)
+    State::setObjectManager(NULL);
   // erease everything that is left.
   delete PNode::getNullParent();
@@ -180,5 +175,4 @@
   this->music = NULL;
   this->shell = NULL;
-  this->entities = NULL;
   this->localPlayer = NULL;
   this->localCamera = NULL;
@@ -214,5 +208,5 @@
 ErrorMessage World::preLoad()
 {
-  State::setWorldEntityList(this->entities = new tList<WorldEntity>());
+  State::setObjectManager(&this->objectManager);
   this->cycle = 0;
 
@@ -233,6 +227,4 @@
 
   GraphicsEngine::getInstance()->displayFPS(true);
-
-  CDEngine::getInstance()->setEntityList( this->entities);
 }
 
@@ -588,14 +580,4 @@
 
 /**
- *  gets the list of entities from the world
- * @returns entity list
-*/
-tList<WorldEntity>* World::getEntities()
-{
-  return this->entities;
-}
-
-
-/**
  *  this returns the current game time
  * @returns elapsed game time
@@ -605,23 +587,4 @@
   return this->gameTime;
 }
-
-
-/**
- *  function to put your own debug stuff into it. it can display informations about
-   the current class/procedure
-*/
-void World::debug()
-{
-  PRINTF(0)("Printing out the List of alive WorldEntities:\n");
-  tIterator<WorldEntity>* iterator = this->entities->getIterator();
-  WorldEntity* entity = iterator->firstElement();
-  while( entity != NULL)
-  {
-    PRINTF(0)("%s::%s\n", entity->getClassName(), entity->getName());
-    entity = iterator->nextElement();
-  }
-  delete iterator;
-}
-
 
 /**
@@ -640,5 +603,4 @@
     {
       ++this->cycle;
-      PRINTF(4)("World::mainloop() - number of entities: %i\n", this->entities->getSize());
       // Network
       this->synchronize ();
@@ -685,4 +647,11 @@
 }
 
+void World::tick(std::list<WorldEntity*> entityList, float dt)
+{
+  std::list<WorldEntity*>::iterator entity;
+  for (entity = entityList.begin(); entity != entityList.end(); entity++)
+    (*entity)->tick(dt);
+
+}
 
 /**
@@ -721,12 +690,9 @@
       this->gameTime += this->dtS;
 
-      tIterator<WorldEntity>* iterator = this->entities->getIterator();
-      WorldEntity* entity = iterator->firstElement();
-      while( entity != NULL)
-        {
-          entity->tick (this->dtS);
-          entity = iterator->nextElement();
-        }
-      delete iterator;
+/*      this->tick(this->objectManager.getObjectList(OM_DEAD_TICK), this->dtS);
+      this->tick(this->objectManager.getObjectList(OM_COMMON), this->dtS);
+      this->tick(this->objectManager.getObjectList(OM_GROUP_00), this->dtS);*/
+      this->tick(this->objectManager.getObjectList(OM_GROUP_01), this->dtS);
+      this->tick(this->objectManager.getObjectList(OM_GROUP_01_PROJ), this->dtS);
 
       /* update tick the rest */
@@ -738,5 +704,4 @@
 
       ParticleEngine::getInstance()->tick(this->dtS);
-      GarbageCollector::getInstance()->tick(this->dtS);
 
 
@@ -763,5 +728,4 @@
 void World::update()
 {
-  GarbageCollector::getInstance()->update();
   GraphicsEngine::getInstance()->update(this->dtS);
   PNode::getNullParent()->updateNode (this->dtS);
@@ -774,5 +738,8 @@
 void World::collide()
 {
-  CDEngine::getInstance()->checkCollisions();
+  CDEngine::getInstance()->checkCollisions(this->objectManager.getObjectList(OM_GROUP_00),
+                                            this->objectManager.getObjectList(OM_GROUP_01_PROJ));
+  CDEngine::getInstance()->checkCollisions(this->objectManager.getObjectList(OM_GROUP_01),
+                                            this->objectManager.getObjectList(OM_COMMON));
 }
 
@@ -804,16 +771,18 @@
 void World::draw ()
 {
-  /* draw entities */
-  WorldEntity* entity;
-  glLoadIdentity();
-  tIterator<WorldEntity>* iterator = this->entities->getIterator();
-  entity = iterator->firstElement();
-  while( entity != NULL )
-  {
-    if( entity->isVisible() ) entity->draw();
-    if( unlikely( this->showBV)) entity->drawBVTree(3, 226);  // to draw the bounding boxes of the objects at level 2 for debug purp
-    entity = iterator->nextElement();
-  }
-  delete iterator;
+  GraphicsEngine* engine = GraphicsEngine::getInstance();
+  engine->draw(State::getObjectManager()->getObjectList(OM_ENVIRON_NOTICK));
+  engine->draw(State::getObjectManager()->getObjectList(OM_ENVIRON));
+  engine->draw(State::getObjectManager()->getObjectList(OM_COMMON));
+  engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_00));
+  engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_01));
+  engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_01_PROJ));
+
+//   {
+//     if( entity->isVisible() ) entity->draw();
+  //FIXME
+//     if( unlikely( this->showBV)) entity->drawBVTree(3, 226);  // to draw the bounding boxes of the objects at level 2 for debug purp
+//     entity = iterator->nextElement();
+//   }
 
   glCallList (objectList);
@@ -824,5 +793,5 @@
     PNode::getNullParent()->debugDraw(0);
 
-  GraphicsEngine::getInstance()->draw();
+  engine->draw();
   //TextEngine::getInstance()->draw();
 }
@@ -834,5 +803,5 @@
 void World::spawn(WorldEntity* entity)
 {
-  this->entities->add (entity);
+//   this->entities->add (entity);
   entity->postSpawn ();
 }
@@ -847,5 +816,5 @@
 void World::spawn(WorldEntity* entity, Vector* absCoor, Quaternion* absDir)
 {
-  this->entities->add (entity);
+//   this->entities->add (entity);
 
   entity->setAbsCoor (*absCoor);
@@ -873,5 +842,5 @@
       entity->setRelDir (*relDir);
 
-      this->entities->add (entity);
+//       this->entities->add (entity);
 
       entity->postSpawn ();
Index: /trunk/src/story_entities/world.h
===================================================================
--- /trunk/src/story_entities/world.h	(revision 6141)
+++ /trunk/src/story_entities/world.h	(revision 6142)
@@ -11,6 +11,7 @@
 #include "story_entity.h"
 #include "p_node.h"
+#include "object_manager.h"
 
-class World;
+
 class WorldEntity;
 class Camera;
@@ -18,11 +19,8 @@
 class GLMenuImageScreen;
 class Terrain;
-class GarbageCollector;
-class Text;
 class TiXmlElement;
 
 class Shell;
 class OggPlayer;
-template<class T> class tList;
 
 //! The game world
@@ -61,6 +59,4 @@
   bool command (Command* cmd);
 
-  tList<WorldEntity>* getEntities();
-
   /* interface to world */
   void spawn (WorldEntity* entity);
@@ -84,4 +80,5 @@
   void synchronize ();
   void handleInput ();
+  void tick (std::list<WorldEntity*> worldEntity, float dt);
   void tick ();
   void update ();
@@ -104,4 +101,6 @@
     bool bPause;                        //!< pause mode
 
+    ObjectManager      objectManager;   //!< The ObjectManager of this World.
+
     GLMenuImageScreen* glmis;           //!< The Level-Loader Display
 
@@ -118,5 +117,5 @@
 
     GLuint objectList;                  //!< temporary: @todo this will be ereased soon
-    tList<WorldEntity>* entities;       //!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
+
     Player* localPlayer;                //!< The Player, you fly through the level.
 };
Index: /trunk/src/util/Makefile.am
===================================================================
--- /trunk/src/util/Makefile.am	(revision 6141)
+++ /trunk/src/util/Makefile.am	(revision 6142)
@@ -7,5 +7,4 @@
 			object_manager.cc \
                         loading/factory.cc \
-			garbage_collector.cc \
 			state.cc \
 			user_control.cc \
@@ -19,9 +18,8 @@
 			track/pilot_node.cc \
 			track/track_manager.cc \
-			track/track_node.cc 
+			track/track_node.cc
 
 noinst_HEADERS =        fast_factory.h \
 			object_manager.h \
-			garbage_collector.h \
 			state.h \
 			user_control.h \
Index: unk/src/util/garbage_collector.cc
===================================================================
--- /trunk/src/util/garbage_collector.cc	(revision 6141)
+++ 	(revision )
@@ -1,185 +1,0 @@
-/*
-   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: Patrick Boenzli
-   co-programmer: ...
-*/
-
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GARBAGE_COLLECTOR
-
-#include "garbage_collector.h"
-
-#include "state.h"
-#include "world_entity.h"
-#include "fast_factory.h"
-
-#include "list.h"
-
-using namespace std;
-
-GarbageCollector* GarbageCollector::singletonRef = 0;
-
-/**
- *  standard constructor
-*/
-GarbageCollector::GarbageCollector ()
-{
-   this->setClassID(CL_GARBAGE_COLLECTOR, "GarbageCollector");
-   this->setName("GarbageCollector");
-
-   this->collectedObjects = NULL;
-   this->unusedContainers = NULL;
-
-   this->time = 0;
-   this->delay = 5.0f; /* clean up all 5.0 seconds */
-}
-
-
-/**
- *  standard deconstructor
-*/
-GarbageCollector::~GarbageCollector ()
-{
-  // delete what has to be deleted here
-}
-
-/**
- *  this sets the collection delay
- * @param delay: the delay
-
-   after this delay, the garbage collector starts its work and begins to collect unused object
-   to delete them afterwards. only objects in the worldentity list from the world object are lookded
-   at.
-*/
-void GarbageCollector::setCollectionDelay(float delay)
-{
-  this->delay = delay;
-}
-
-
-/**
- *  this foreces a garbage collection
-
-   if this function is called, the gc tries to initiate the garbage collection routines. actually
-   this should always work.
-*/
-void GarbageCollector::forceCollection()
-{
-  /* just make the time slitely bigger than the delay */
-  this->time = this->delay + 1;
-  /* and update, to get rid of the unused objects */
-  this->update();
-}
-
-
-/**
- * collect an Object, that should be scheduled for clearing.
- * @param object the Object to schedule.
- */
-void GarbageCollector::collect(BaseObject* object)
-{
-  State::getWorldEntityList()->remove(dynamic_cast<WorldEntity*>(object));
-  FastObjectMember* tmpC;
-  if (unlikely(this->unusedContainers == NULL))
-  {
-    tmpC = new FastObjectMember;
-  }
-  else
-  {
-    tmpC = this->unusedContainers;
-    this->unusedContainers = this->unusedContainers->next;
-  }
-
-  tmpC->next = this->collectedObjects;
-  tmpC->objectPointer = object;
-  this->collectedObjects = tmpC;
-}
-
-/**
- *  this ticks the GarbageCollector to give it the time pulse
- * @param time: the time passed since last tick
-
-   like every other tick function eg. worldentity
-*/
-void GarbageCollector::tick(float time)
-{
-  this->time += time;
-}
-
-
-void GarbageCollector::update()
-{
-  if (this->time < this->delay || this->collectedObjects == NULL)
-    return;
-  else
-  {
-    FastObjectMember* tmpC = this->collectedObjects;
-    FastObjectMember* moveC;
-    while (tmpC != NULL)
-    {
-      //WorldEntity* entity = dynamic_cast<WorldEntity*>(tmpC->objectPointer);
-      //State::getWorldEntityList()->remove(entity);
-      //entity->remove();
-      FastFactory::kill(tmpC->objectPointer, true);
-
-      moveC = tmpC->next;
-      tmpC->next = this->unusedContainers;
-      this->unusedContainers = tmpC;
-      tmpC = moveC;
-    }
-    this->collectedObjects = NULL;
-  }
-}
-
-/**
- *  this updated the gargabe collection, if the time is ready
-*/
-// void GarbageCollector::update()
-// {
-//   if( this->time < this->delay)
-//     return;
-//   /* garbage collect */
-//   PRINTF(3)("=============================\n");
-//   PRINTF(3)("Processing Garbage Collection\n");
-//   PRINTF(3)("=============================\n");
-//   int counter = 0;
-//
-//   tList<WorldEntity>* list = State::getWorldEntityList();
-//
-//   tIterator<WorldEntity>* iterator = list->getIterator();
-//   WorldEntity* entity = iterator->firstElement();
-//   while( entity != NULL)
-//     {
-//       if( entity->isFinalized())
-//         {
-//           PRINTF(4)("= finalizing object\n");
-//           ++counter;
-//
-//           /* first remove out of entity list */
-//           list->remove(entity);
-//           /* second remove out of pnode tree */
-//           entity->remove();
-//           /* then finaly delete reference */
-//           //delete entity;
-//           //FastFactory::kill();
-//           //ObjectManager::getInstance()->addToDeadList(entity->getClassID() & CL_MASK_LOWLEVEL_CLASS, entity);
-//         }
-//       entity = iterator->nextElement();
-//     }
-//
-//   PRINTF(3)("= collected %i unused objects\n", counter);
-//   PRINTF(3)("=============================\n");
-//
-//   //ObjectManager::getInstance()->debug();
-//
-//   /* reset time to count again up to this->delay */
-//   this->time = 0;
-// }
Index: unk/src/util/garbage_collector.h
===================================================================
--- /trunk/src/util/garbage_collector.h	(revision 6141)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*!
- * @file garbage_collector.h
- */
-
-#ifndef _GARBAGE_COLLECTOR_H
-#define _GARBAGE_COLLECTOR_H
-
-#include "base_object.h"
-
-// FORWARD DECLARATION
-class FastObjectMember;
-
-//! this class maintains the garbage collection.
-/**
- * you can pass everything to this class that you want to be collected
- * just use GarbageCollector->collect(POINTER); to pass a collectable to the GarbageCollector
- * it will then be handled acording to the class
-*/
-class GarbageCollector : public BaseObject {
-
- public:
-  virtual ~GarbageCollector();
-  /** @returns a Pointer to the only object of this Class */
-  inline static GarbageCollector* getInstance() { if (!singletonRef) singletonRef = new GarbageCollector();  return singletonRef; };
-
-  void setCollectionDelay(float delay);
-
-  void forceCollection();
-
-  void collect(BaseObject* object);
-
-  void tick(float time);
-  void update();
-
- private:
-  GarbageCollector();
-
- private:
-  static GarbageCollector*    singletonRef;           //!< The reference to this class (singleton)
-
-  FastObjectMember*           collectedObjects;       //!< A list of recently collected Objects, that want to be deleted.
-  FastObjectMember*           unusedContainers;       //!< A list of unused containers.
-  float                       delay;                  //!< this is the delay to wait until collection.
-  float                       time;                   //!< the current time
-
-};
-
-#endif /* _GARBAGE_COLLECTOR_H */
Index: /trunk/src/util/object_manager.cc
===================================================================
--- /trunk/src/util/object_manager.cc	(revision 6141)
+++ /trunk/src/util/object_manager.cc	(revision 6142)
@@ -10,5 +10,5 @@
 
    ### File Specific:
-   main-programmer: ...
+   main-programmer: Benjamin Grauer
    co-programmer: ...
 */
@@ -19,13 +19,16 @@
 #include "class_list.h"
 
-#include "p_node.h"
 #include "world_entity.h"
-#include "list.h"
+
+#include "shell_command.h"
+
+#include <assert.h>
 
 using namespace std;
-
-
-/**
- * standard constructor
+SHELL_COMMAND(debug, ObjectManager, debug)
+    ->defaultValues(2, NULL, 0);
+
+/**
+ * @brief standard constructor
  */
 ObjectManager::ObjectManager ()
@@ -37,16 +40,67 @@
 }
 
-/**
- *  the singleton reference to this class
- */
-ObjectManager* ObjectManager::singletonRef = NULL;
-
-/**
-   @brief standard deconstructor
+
+/**
+ * @brief standard deconstructor
+ *
+ * this also removes ALL entitites in existence.
  */
 ObjectManager::~ObjectManager ()
 {
-  ObjectManager::singletonRef = NULL;
-}
+  this->flush();
+}
+
+/**
+ * @brief flushes all entities
+ *
+ * this function deletes all entities that exist within the ObjectManager.
+ * It does this by poping each list from the front, and delete the given object.
+ *
+ * automatically called by a destructor.
+ */
+void ObjectManager::flush()
+{
+  for (unsigned int i = 0; i < OM_SIZE; ++i)
+    while(!this->objectLists[i].empty())
+      delete this->objectLists[i].front();
+}
+
+
+/**
+ * @brief moves an Entity from an old list to a new One
+ * @param entity the entity to move.
+ * @param omList the new List to move the entity to.
+ *
+ * this will erase the entity from the old list
+ */
+void ObjectManager::toList (WorldEntity* entity, OM_LIST omList)
+{
+  assert (omList != OM_SIZE);
+
+  if (likely(entity->getOMListNumber() != OM_INIT))
+    this->objectLists[entity->getOMListNumber()].erase(entity->getEntityIterator());
+
+  if (likely(omList != OM_INIT))
+  {
+    this->objectLists[omList].push_back(entity);
+    entity->getEntityIterator() = --this->objectLists[omList].end();
+    entity->getOMListNumber() = omList;
+  }
+}
+
+
+/**
+ * @see ObjectManager::toList(WorldEntity* OM_LIST)
+ * @param entity the entity to move.
+ * @param omList the new List to move the entity to.
+ *
+ * this function also does a transformation from omList as char* to OM_LIST.
+ */
+void ObjectManager::toList (WorldEntity* entity, const char* omList)
+{
+  this->toList(entity, ObjectManager::StringToOMList(omList));
+}
+
+
 
 /**
@@ -68,2 +122,124 @@
   return NULL;
 }
+
+
+/**
+ * @brief print out nice debug information about Elements in the list OM_LIST
+ * @param omList the List to debug.
+ * @param level: level 0: only show list info; level 1: also show entities and their names.
+ */
+void ObjectManager::debug(OM_LIST omList, unsigned int level) const
+{
+  if (omList != OM_INIT || omList == OM_SIZE)
+  {
+    PRINT(0)(" +ObjectManager-LIST: '%s'==size='%d'==---\n", ObjectManager::OMListToString((OM_LIST)omList), this->objectLists[omList].size());
+  //  if (level >= 1)
+    {
+      std::list<WorldEntity*>::const_iterator entity;
+      for (entity = this->objectLists[omList].begin(); entity != this->objectLists[omList].end(); entity++)
+      {
+        PRINT(0)(" | %s::%s\n",(*entity)->getClassName(), (*entity)->getName());
+      }
+    }
+  }
+  else
+    PRINTF(2)("Invalid query. for OM_INIT-LIST or OM_SIZE\n");
+}
+
+
+/**
+ * @brief prints out very nice debug information
+ * @param listName the Name of the list to get Debug information from
+ * @param level: level 0: only show list info; level 1: also show entities and their names.
+ */
+void ObjectManager::debug(const char* listName, unsigned int level)
+{
+  PRINT(0)("=================================\n");
+  PRINT(0)("=ObjectManager-DEBUG=============\n");
+  PRINT(0)("=================================\n");
+  if (listName == NULL || listName[0] == '\0')
+    for (unsigned int i = 0; i < OM_SIZE; ++i)
+      debug((OM_LIST) i, level);
+  else
+    debug(ObjectManager::StringToOMList(listName));
+  PRINT(0)("=========================== OM ==\n");
+}
+
+
+
+/**
+ * @brief transforms an omList into a String (usefull for debugging).
+ * @param omList the OM_LIST to be transformed into a String.
+ * @returns the String transformed from omList.
+ */
+const char* ObjectManager::OMListToString(OM_LIST omList)
+{
+  if (omList == OM_INIT || omList == OM_SIZE)
+    return "===invalid===";
+
+  printf("%d\n", omList);
+  return ObjectManager::objectManagerListNames[omList];
+}
+
+
+
+/**
+ * @brief transforms a String into an OM_LIST (usefull for debugging/Loading).
+ * @param listName the OM_LIST-name to be transformed into an OM_LIST.
+ * @returns the OM_LIST transformed from listName. or the default, if not found or NULL.
+ */
+OM_LIST ObjectManager::StringToOMList(const char* listName)
+{
+  if (unlikely(listName == NULL)) return OM_DEFAULT_LIST;
+
+  for(unsigned int i = 0; i < OM_SIZE; ++i) {
+    if(!strcmp(listName, ObjectManager::objectManagerListNames[i])) {
+      return (OM_LIST)i;
+    }
+  }
+  return OM_DEFAULT_LIST;
+}
+
+
+
+const char* ObjectManager::objectManagerListNames[] = {
+    "null",
+    "dead",
+    "dead-tick",
+    "environ-notick",
+    "environ",
+    "common",
+
+    "group00",
+    "group00-proj",
+    "group01",
+    "group01-proj",
+    "group02",
+    "group02-proj",
+    "group03",
+    "group03-proj",
+    "group04",
+    "group04-proj",
+    "group05",
+    "group05-proj",
+    "group06",
+    "group06-proj",
+    "group07",
+    "group07-proj",
+    "group08",
+    "group08-proj",
+    "group09",
+    "group09-proj",
+    "group10",
+    "group10-proj",
+    "group11",
+    "group11-proj",
+    "group12",
+    "group12-proj",
+    "group13",
+    "group13-proj",
+    "group14",
+    "group14-proj",
+    "group15",
+    "group15-proj"
+};
Index: /trunk/src/util/object_manager.h
===================================================================
--- /trunk/src/util/object_manager.h	(revision 6141)
+++ /trunk/src/util/object_manager.h	(revision 6142)
@@ -1,6 +1,6 @@
 /*!
  * @file object_manager.h
- * @brief Definition of the ... singleton Class
-*/
+ * @brief Definition of the ObjectManager.
+ */
 
 #ifndef _OBJECT_MANAGER_H
@@ -9,4 +9,56 @@
 #include "base_object.h"
 #include <list>
+#include <vector>
+
+/// Enumerator for Managed Object Lists
+typedef enum {
+  OM_NULL             =  0,
+  OM_DEAD,
+  OM_DEAD_TICK,
+  OM_ENVIRON_NOTICK,
+  OM_ENVIRON,
+  OM_COMMON,
+
+  OM_GROUP_00,
+  OM_GROUP_00_PROJ,
+  OM_GROUP_01,
+  OM_GROUP_01_PROJ,
+  OM_GROUP_02,
+  OM_GROUP_02_PROJ,
+  OM_GROUP_03,
+  OM_GROUP_03_PROJ,
+  OM_GROUP_04,
+  OM_GROUP_04_PROJ,
+  OM_GROUP_05,
+  OM_GROUP_05_PROJ,
+  OM_GROUP_06,
+  OM_GROUP_06_PROJ,
+  OM_GROUP_07,
+  OM_GROUP_07_PROJ,
+  OM_GROUP_08,
+  OM_GROUP_08_PROJ,
+  OM_GROUP_09,
+  OM_GROUP_09_PROJ,
+  OM_GROUP_10,
+  OM_GROUP_10_PROJ,
+  OM_GROUP_11,
+  OM_GROUP_11_PROJ,
+  OM_GROUP_12,
+  OM_GROUP_12_PROJ,
+  OM_GROUP_13,
+  OM_GROUP_13_PROJ,
+  OM_GROUP_14,
+  OM_GROUP_14_PROJ,
+  OM_GROUP_15,
+  OM_GROUP_15_PROJ,
+
+  OM_SIZE,
+
+
+  OM_INIT             = -1, //!< DO NOT USE THIS. (WorldEntity Internal).
+} OM_LIST;
+
+#define OM_DEFAULT_LIST  OM_NULL
+
 
 // FORWARD DECLARATION
@@ -14,34 +66,35 @@
 class WorldEntity;
 
-class ObjectGroupList
-{
-
-
-
-};
-
-
-//! A default singleton class.
+//! A powerfull handler for the Object (WorldEntities) in the World.
 class ObjectManager : public BaseObject {
 
  public:
-  virtual ~ObjectManager(void);
-  /** @returns a Pointer to the only object of this Class */
-  inline static ObjectManager* getInstance(void) { if (!ObjectManager::singletonRef) ObjectManager::singletonRef = new ObjectManager();  return ObjectManager::singletonRef; };
+   ObjectManager();
+   virtual ~ObjectManager();
 
+  void flush();
+
+  void toList (WorldEntity* entity, OM_LIST omList = OM_DEFAULT_LIST);
+  void toList (WorldEntity* entity, const char* omList);
+
+
+  std::list<WorldEntity*>& getObjectList(OM_LIST listNumber) { return this->objectLists[listNumber]; }
+  const std::list<WorldEntity*>& getObjectList(OM_LIST listNumber) const { return this->objectLists[listNumber]; }
 
   static std::list<WorldEntity*>* distanceFromObject(const PNode& center, float radius, ClassID classID);
 
-  ObjectGroupList* getGroupList( );
+  void debug(OM_LIST omList, unsigned int level = 0) const;
+  void debug(const char* listName = NULL, unsigned int level = 0);
+
+  static OM_LIST StringToOMList(const char* listName);
+  static const char* OMListToString(OM_LIST omList);
 
  private:
-  ObjectManager(void);
-  static ObjectManager* singletonRef;
-
-  std::list<ObjectGroupList>           groupList;
-
-  const std::list<BaseObject>*         pNodeList;
+  const std::list<BaseObject>*            pNodeList;
 
 
+  std::list<WorldEntity*>                 objectLists[OM_SIZE];
+
+  static const char*                      objectManagerListNames[]; //!< Names of all the lists
 };
 
Index: /trunk/src/util/state.cc
===================================================================
--- /trunk/src/util/state.cc	(revision 6141)
+++ /trunk/src/util/state.cc	(revision 6142)
@@ -29,5 +29,5 @@
 const PNode* State::cameraTarget = NULL;
 
-tList<WorldEntity>* State::worldEntityList = NULL;
+ObjectManager* State::objectManager = NULL;
 
 /**
Index: /trunk/src/util/state.h
===================================================================
--- /trunk/src/util/state.h	(revision 6141)
+++ /trunk/src/util/state.h	(revision 6142)
@@ -10,6 +10,5 @@
 class PNode;
 class WorldEntity;
-template<class T> class tList;
-//template<class T> class tStack;
+class ObjectManager;
 
 //! handles states about orxonox's most importatn objects
@@ -22,5 +21,7 @@
 
  public:
-  // CAMERA //
+   //////////////
+   /// CAMERA ///
+   //////////////
   /** @param camera the PNode to the Camera, @param cameraTarget the PNode to the Camera's target */
   static void setCamera(const PNode* camera, const PNode* cameraTarget);
@@ -30,9 +31,15 @@
   static inline const PNode* getCameraTarget() { return State::cameraTarget; };
 
-  // WORLD_ENTITY_LIST //
-  /** @param worldEntityList The World's List of WorldEntities */
-  static inline void setWorldEntityList(tList<WorldEntity>* worldEntityList) { State::worldEntityList = worldEntityList; };
-  /** @returns the List of WorldEntities */
-  static inline tList<WorldEntity>* getWorldEntityList() { return State::worldEntityList; };
+  //////////////////////
+  /// OBJECT-MANAGER ///
+  //////////////////////
+  /** @param objectManager the new Current ObjectManager */
+  static inline void setObjectManager(ObjectManager* objectManager) { State::objectManager = objectManager; };
+  /** @returns the current ObjectManager. */
+  static inline ObjectManager* getObjectManager() { return State::objectManager; };
+
+  /////////////////////////
+  /// WORLD_ENTITY_LIST ///
+  /////////////////////////
 
  private:
@@ -42,8 +49,6 @@
   static const PNode*           cameraTarget;       //!< A reference to the cameraTarget
   static PNode*                 nullParent;         //!< A reference to the Null-PNode.
+  static ObjectManager*         objectManager;      //!< A referenct to the current ObjectManager
 
-  static tList<WorldEntity>*    worldEntityList;    //!< The List of the worldEntities
-
-  //tStack<
 };
 
Index: /trunk/src/world_entities/environment.cc
===================================================================
--- /trunk/src/world_entities/environment.cc	(revision 6141)
+++ /trunk/src/world_entities/environment.cc	(revision 6142)
@@ -62,4 +62,5 @@
 {
   this->setClassID(CL_ENVIRONMENT, "Environment");
+  this->toList(OM_ENVIRON);
 }
 
Index: /trunk/src/world_entities/npcs/npc.cc
===================================================================
--- /trunk/src/world_entities/npcs/npc.cc	(revision 6141)
+++ /trunk/src/world_entities/npcs/npc.cc	(revision 6142)
@@ -33,5 +33,5 @@
 {
   this->setClassID(CL_NPC, "NPC");
-
+  this->toList(OM_GROUP_00);
 }
 
@@ -50,5 +50,5 @@
       WorldEntity* powerUp = new TurretPowerUp();
       powerUp->setAbsCoor(this->getAbsCoor());
-      State::getWorldEntityList()->add(powerUp);
+//      powerUp->toList(OM_COMMON);
     }
     else if ((float)rand()/RAND_MAX < .3)
@@ -56,7 +56,7 @@
       WorldEntity* powerUp = new LaserPowerUp();
       powerUp->setAbsCoor(this->getAbsCoor());
-      State::getWorldEntityList()->add(powerUp);
+      powerUp->toList(OM_COMMON);
     }
-    State::getWorldEntityList()->remove(this);
+    this->toList(OM_DEAD);
     this->removeNode();
 
@@ -68,5 +68,5 @@
   {
     this->setVisibiliy(false);
-    State::getWorldEntityList()->remove(this);
+    this->toList(OM_DEAD);
     this->removeNode();
   }
Index: /trunk/src/world_entities/playable.cc
===================================================================
--- /trunk/src/world_entities/playable.cc	(revision 6141)
+++ /trunk/src/world_entities/playable.cc	(revision 6142)
@@ -46,4 +46,5 @@
   PRINTF(4)("PLAYABLE INIT\n");
 
+  this->toList(OM_GROUP_01);
   this->weaponMan = new WeaponManager(this);
 
Index: /trunk/src/world_entities/power_ups/laser_power_up.cc
===================================================================
--- /trunk/src/world_entities/power_ups/laser_power_up.cc	(revision 6141)
+++ /trunk/src/world_entities/power_ups/laser_power_up.cc	(revision 6142)
@@ -80,5 +80,5 @@
  // PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassName(), entity->getClassName(), location.x, location.y, location.z);
  if (entity->isA(CL_PLAYABLE))
-  State::getWorldEntityList()->remove(this);
+  this->toList(OM_DEAD);
 }
 
Index: /trunk/src/world_entities/power_ups/power_up.cc
===================================================================
--- /trunk/src/world_entities/power_ups/power_up.cc	(revision 6141)
+++ /trunk/src/world_entities/power_ups/power_up.cc	(revision 6142)
@@ -38,4 +38,5 @@
 {
   delete this->sphereMaterial;
+  this->toList(OM_COMMON);
 }
 
Index: /trunk/src/world_entities/power_ups/turret_power_up.cc
===================================================================
--- /trunk/src/world_entities/power_ups/turret_power_up.cc	(revision 6141)
+++ /trunk/src/world_entities/power_ups/turret_power_up.cc	(revision 6142)
@@ -80,5 +80,5 @@
  // PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassName(), entity->getClassName(), location.x, location.y, location.z);
  if (entity->isA(CL_PLAYABLE))
-  State::getWorldEntityList()->remove(this);
+   this->toList(OM_DEAD);
 }
 
Index: /trunk/src/world_entities/skybox.cc
===================================================================
--- /trunk/src/world_entities/skybox.cc	(revision 6141)
+++ /trunk/src/world_entities/skybox.cc	(revision 6142)
@@ -65,5 +65,5 @@
 {
   this->setClassID(CL_SKYBOX, "SkyBox");
-
+  this->toList(OM_ENVIRON_NOTICK);
   this->size = 100.0;
 
Index: /trunk/src/world_entities/skysphere.cc
===================================================================
--- /trunk/src/world_entities/skysphere.cc	(revision 6141)
+++ /trunk/src/world_entities/skysphere.cc	(revision 6142)
@@ -42,5 +42,5 @@
 {
   this->setClassID(CL_SKYSPHERE, "SkySphere");
-
+  this->toList(OM_ENVIRON_NOTICK);
   if (fileName == NULL)
     this->initialize("pictures/sky-replace.jpg");
Index: /trunk/src/world_entities/terrain.cc
===================================================================
--- /trunk/src/world_entities/terrain.cc	(revision 6141)
+++ /trunk/src/world_entities/terrain.cc	(revision 6142)
@@ -93,4 +93,5 @@
 {
   this->setClassID(CL_TERRAIN, "Terrain");
+  this->toList(OM_ENVIRON_NOTICK);
 
   this->objectList = 0;
Index: /trunk/src/world_entities/test_entity.cc
===================================================================
--- /trunk/src/world_entities/test_entity.cc	(revision 6141)
+++ /trunk/src/world_entities/test_entity.cc	(revision 6142)
@@ -33,4 +33,5 @@
 {
   this->setClassID(CL_TEST_ENTITY, "TestEntity");
+  // TO SOME LIST!!
 
   this->md2Model = new MD2Model("models/droidika.md2", "models/droideka.pcx");
@@ -70,5 +71,5 @@
     PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getName(), entity->getName(), location.x, location.y, location.z);
   this->setVisibiliy(false);
-  State::getWorldEntityList()->remove(this);
+  this->toList(OM_DEAD);
   }
 }
Index: /trunk/src/world_entities/weapons/aim.cc
===================================================================
--- /trunk/src/world_entities/weapons/aim.cc	(revision 6141)
+++ /trunk/src/world_entities/weapons/aim.cc	(revision 6142)
@@ -104,5 +104,6 @@
 void Aim::searchTarget(float range)
 {
-  tIterator<WorldEntity>* iterator = State::getWorldEntityList()->getIterator();
+  //FIXME//
+/*  tIterator<WorldEntity>* iterator = State::getWorldEntityList()->getIterator();
   WorldEntity* entity = iterator->firstElement();
   while (likely(entity != NULL))
@@ -121,5 +122,5 @@
   }
 
-  delete iterator;
+  delete iterator;*/
 }
 
Index: /trunk/src/world_entities/weapons/bomb.cc
===================================================================
--- /trunk/src/world_entities/weapons/bomb.cc	(revision 6141)
+++ /trunk/src/world_entities/weapons/bomb.cc	(revision 6142)
@@ -174,5 +174,4 @@
 void Bomb::activate()
 {
-  State::getWorldEntityList()->add(this);
 
 }
@@ -180,5 +179,5 @@
 void Bomb::deactivate()
 {
-  State::getWorldEntityList()->remove(this);
+  this->toList(OM_DEAD);
   this->lifeCycle = 0.0f;
   Bomb::fastFactory->kill(this);
Index: /trunk/src/world_entities/weapons/ground_turret.cc
===================================================================
--- /trunk/src/world_entities/weapons/ground_turret.cc	(revision 6141)
+++ /trunk/src/world_entities/weapons/ground_turret.cc	(revision 6142)
@@ -89,4 +89,5 @@
   {
     this->left->setParent(this);
+    this->left->toList(this->getOMListNumber());
     this->left->setRelCoor(0,10,-5);
   }
@@ -98,4 +99,5 @@
   {
     this->right->setParent(this);
+    this->right->toList(this->getOMListNumber());
     this->right->setRelCoor(0,10,5);
   }
Index: /trunk/src/world_entities/weapons/guided_missile.cc
===================================================================
--- /trunk/src/world_entities/weapons/guided_missile.cc	(revision 6141)
+++ /trunk/src/world_entities/weapons/guided_missile.cc	(revision 6142)
@@ -85,5 +85,4 @@
 void GuidedMissile::activate()
 {
-  State::getWorldEntityList()->add(this);
   if (unlikely(GuidedMissile::trailParticles == NULL))
   {
@@ -129,6 +128,5 @@
   this->lifeCycle = 0.0;
 
-//  GarbageCollector::getInstance()->collect(this);
-  State::getWorldEntityList()->remove(this);
+  this->toList(OM_DEAD);
   this->removeNode();
   GuidedMissile::fastFactory->kill(this);
@@ -152,5 +150,4 @@
   if (this->target != NULL && this->target->getParent() != PNode::getNullParent())
    {
-     printf("========%s::%s\n", target->getParent()->getClassName(), target->getParent()->getName() );
      velocity += ((target->getAbsCoor() - this->getAbsCoor()).getNormalized())*agility;
      float speed = velocity.len();
Index: /trunk/src/world_entities/weapons/laser.cc
===================================================================
--- /trunk/src/world_entities/weapons/laser.cc	(revision 6141)
+++ /trunk/src/world_entities/weapons/laser.cc	(revision 6142)
@@ -77,5 +77,4 @@
 void Laser::activate()
 {
-  State::getWorldEntityList()->add(this);
   if (unlikely(Laser::explosionParticles == NULL))
   {
@@ -98,6 +97,5 @@
   this->lifeCycle = 0.0;
 
-//  GarbageCollector::getInstance()->collect(this);
-  State::getWorldEntityList()->remove(this);
+  this->toList(OM_NULL);
   this->removeNode();
   Laser::fastFactory->kill(this);
@@ -134,5 +132,4 @@
   this->lifeCycle = .95; //!< @todo calculate this usefully.
   ParticleEngine::getInstance()->addConnection(this->emitter, Laser::explosionParticles);
-
 }
 
Index: /trunk/src/world_entities/weapons/projectile.cc
===================================================================
--- /trunk/src/world_entities/weapons/projectile.cc	(revision 6141)
+++ /trunk/src/world_entities/weapons/projectile.cc	(revision 6142)
@@ -22,6 +22,4 @@
 #include "weapon.h"
 #include "model.h"
-
-#include "garbage_collector.h"
 
 using namespace std;
Index: /trunk/src/world_entities/weapons/rocket.cc
===================================================================
--- /trunk/src/world_entities/weapons/rocket.cc	(revision 6141)
+++ /trunk/src/world_entities/weapons/rocket.cc	(revision 6142)
@@ -82,5 +82,4 @@
 void Rocket::activate()
 {
-  State::getWorldEntityList()->add(this);
   if (unlikely(Rocket::trailParticles == NULL))
   {
@@ -125,7 +124,8 @@
   ParticleEngine::getInstance()->breakConnections(this->emitter);
   this->lifeCycle = 0.0;
+  this->toList(OM_NULL);
 
 //  GarbageCollector::getInstance()->collect(this);
-  State::getWorldEntityList()->remove(this);
+  this->toList(OM_DEAD);
   Rocket::fastFactory->kill(this);
 }
Index: /trunk/src/world_entities/weapons/test_bullet.cc
===================================================================
--- /trunk/src/world_entities/weapons/test_bullet.cc	(revision 6141)
+++ /trunk/src/world_entities/weapons/test_bullet.cc	(revision 6142)
@@ -82,5 +82,4 @@
 void TestBullet::activate()
 {
-  State::getWorldEntityList()->add(this);
   if (unlikely(TestBullet::trailParticles == NULL))
   {
@@ -119,7 +118,6 @@
   ParticleEngine::getInstance()->breakConnections(this->emitter);
   this->lifeCycle = 0.0;
+  this->toList(OM_NULL);
 
-//  GarbageCollector::getInstance()->collect(this);
-  State::getWorldEntityList()->remove(this);
   TestBullet::fastFactory->kill(this);
 }
Index: /trunk/src/world_entities/weapons/weapon.cc
===================================================================
--- /trunk/src/world_entities/weapons/weapon.cc	(revision 6141)
+++ /trunk/src/world_entities/weapons/weapon.cc	(revision 6142)
@@ -192,5 +192,9 @@
 {
   if (likely (this->projectileFactory != NULL))
-    return dynamic_cast<Projectile*>(this->projectileFactory->resurrect());
+  {
+    Projectile* pj = dynamic_cast<Projectile*>(this->projectileFactory->resurrect());
+    pj->toList((OM_LIST)(this->getOMListNumber()+1));
+    return pj;
+  }
   else
   {
Index: /trunk/src/world_entities/weapons/weapon_manager.cc
===================================================================
--- /trunk/src/world_entities/weapons/weapon_manager.cc	(revision 6141)
+++ /trunk/src/world_entities/weapons/weapon_manager.cc	(revision 6142)
@@ -35,5 +35,5 @@
  * @param number of weapon slots of the model/ship <= 8 (limitied)
  */
-WeaponManager::WeaponManager(PNode* parent)
+WeaponManager::WeaponManager(WorldEntity* parent)
 {
   this->init();
@@ -155,8 +155,6 @@
  * a PNode.
  */
-void WeaponManager::setParent(PNode* parent)
-{
-  if (parent == NULL)
-    parent = PNode::getNullParent();
+void WeaponManager::setParent(WorldEntity* parent)
+{
   this->parent = parent;
   if (this->parent != NULL)
@@ -247,5 +245,7 @@
   this->configs[configID][slotID] = weapon;
   if (this->parent != NULL)
-    weapon->setParent(parent);
+  {
+    this->parent->addChild(weapon);
+  }
   PRINTF(3)("Added a new Weapon to the WeaponManager: config %i/ slot %i\n", configID, slotID);
 }
@@ -373,4 +373,6 @@
       else
       {
+        if (this->currentSlotConfig[i].currentWeapon != NULL)
+          this->currentSlotConfig[i].currentWeapon->toList(OM_NULL);
         tickWeapon = this->currentSlotConfig[i].currentWeapon = this->currentSlotConfig[i].nextWeapon;
         if (tickWeapon != NULL)
@@ -378,4 +380,5 @@
           tickWeapon->requestAction(WA_ACTIVATE);
           tickWeapon->setParent(&this->currentSlotConfig[i].position);
+          tickWeapon->toList(this->parent->getOMListNumber());
           this->currentSlotConfig[i].position.activateNode();
         }
Index: /trunk/src/world_entities/weapons/weapon_manager.h
===================================================================
--- /trunk/src/world_entities/weapons/weapon_manager.h	(revision 6141)
+++ /trunk/src/world_entities/weapons/weapon_manager.h	(revision 6142)
@@ -45,5 +45,5 @@
 
   public:
-    WeaponManager(PNode* parent);
+    WeaponManager(WorldEntity* parent);
     WeaponManager(const TiXmlElement* root);
     ~WeaponManager();
@@ -63,5 +63,5 @@
     long getSlotCapability(int slot) const { return this->currentSlotConfig[slot].capability; };
 
-    void setParent(PNode* parent);
+    void setParent(WorldEntity* parent);
     /** @returns the Parent (carrier) of this WeaponManager */
     PNode* getParent() const { return this->parent; };
@@ -93,5 +93,5 @@
 
   private:
-    PNode*                  parent;                                   //!< The parent, this WeaponManager is connected to.
+    WorldEntity*            parent;                                   //!< The parent, this WeaponManager is connected to.
 
     int                     slotCount;                                //!< number of weapon slots the ship has.
Index: /trunk/src/world_entities/world_entity.cc
===================================================================
--- /trunk/src/world_entities/world_entity.cc	(revision 6141)
+++ /trunk/src/world_entities/world_entity.cc	(revision 6142)
@@ -53,4 +53,9 @@
 
   this->setVisibiliy(true);
+
+  this->objectListNumber = OM_INIT;
+  this->objectListIterator = NULL;
+
+  this->toList(OM_NULL);
 }
 
@@ -67,4 +72,6 @@
   for (unsigned int i = 0; i < this->models.size(); i++)
     this->setModel(NULL, i);
+
+  State::getObjectManager()->toList(this, OM_INIT);
 }
 
@@ -95,20 +102,20 @@
 {
   if (fileName != NULL)
-  { 
+  {
     // search for the special character # in the LoadParam
     if (strchr(fileName, '#') != NULL)
       {
-	PRINTF(4)("Found # in %s... searching for LOD's\n", fileName);
-	char* lodFile = new char[strlen(fileName)+1];
-	strcpy(lodFile, fileName);
-	char* depth = strchr(lodFile, '#');
-	for (unsigned int i = 0; i < 5; i++)
-	  {
-	    *depth = 48+(int)i;
-	    printf("-------%s\n", lodFile);
-	    if (ResourceManager::isInDataDir(lodFile))
-	      this->loadModel(lodFile, scaling, i);
-	  }
-	return;
+        PRINTF(4)("Found # in %s... searching for LOD's\n", fileName);
+        char* lodFile = new char[strlen(fileName)+1];
+        strcpy(lodFile, fileName);
+        char* depth = strchr(lodFile, '#');
+        for (unsigned int i = 0; i < 5; i++)
+          {
+            *depth = 48+(int)i;
+            printf("-------%s\n", lodFile);
+            if (ResourceManager::isInDataDir(lodFile))
+              this->loadModel(lodFile, scaling, i);
+          }
+        return;
       }
 
@@ -174,4 +181,19 @@
   }
 }
+
+/**
+ * @brief moves this entity to the List OM_List
+ * @param list the list to set this Entity to.
+ *
+ * this is the same as a call to State::getObjectManager()->toList(entity , list);
+ * directly, but with an easier interface.
+ *
+ * @todo inline this (peut etre)
+ */
+void WorldEntity::toList(OM_LIST list)
+{
+  State::getObjectManager()->toList(this, list);
+}
+
 
 
Index: /trunk/src/world_entities/world_entity.h
===================================================================
--- /trunk/src/world_entities/world_entity.h	(revision 6141)
+++ /trunk/src/world_entities/world_entity.h	(revision 6142)
@@ -11,4 +11,5 @@
 #include "model.h"
 
+#include "object_manager.h"
 #include "glincl.h"
 #include <vector>
@@ -65,14 +66,23 @@
   //  CharacterAttributes* getCharacterAttributes();
 
+  void toList(OM_LIST list);
 
+  /** @returns a Reference to the objectListNumber to set. */
+  OM_LIST& getOMListNumber() { return this->objectListNumber; }
+  /** @returns a Reference to the Iterator */
+  std::list<WorldEntity*>::iterator& getEntityIterator() { return this->objectListIterator; }
  protected:
   //  CharacterAttributes*    charAttr;         //!< the character attributes of a world_entity
 
  private:
-  std::vector<Model*>     models;            //!< The model that should be loaded for this entity.
-  BVTree*                 obbTree;          //!< this is the obb tree reference needed for collision detection
+  std::vector<Model*>     models;             //!< The model that should be loaded for this entity.
+  BVTree*                 obbTree;            //!< this is the obb tree reference needed for collision detection
 
-  bool                    bCollide;         //!< If it should be considered for the collisiontest.
-  bool                    bVisible;         //!< If it should be visible.
+  bool                    bCollide;           //!< If it should be considered for the collisiontest.
+  bool                    bVisible;           //!< If it should be visible.
+
+  OM_LIST                           objectListNumber;   //!< The ObjectList from ObjectManager this Entity is in.
+  std::list<WorldEntity*>::iterator objectListIterator; //!< The iterator position of this Entity in the given list of the ObjectManager.
+
 };
 
