Index: orxonox/branches/physics/src/Makefile.am
===================================================================
--- orxonox/branches/physics/src/Makefile.am	(revision 4331)
+++ orxonox/branches/physics/src/Makefile.am	(revision 4332)
@@ -81,4 +81,5 @@
 		 lib/coord/null_parent.cc \
 		 lib/coord/helper_parent.cc \
+		 lib/coord/pilot_node.cc \
 		 lib/graphics/graphics_engine.cc \
 		 lib/graphics/light.cc \
@@ -94,5 +95,4 @@
 		 lib/graphics/particles/particle_system.cc \
 		 lib/graphics/particles/particle_emitter.cc \
-		 lib/lang/base_entity.cc \
 		 lib/lang/base_object.cc \
 		 lib/util/ini_parser.cc \
@@ -107,4 +107,5 @@
 		 defs/keynames.h \
 		 command_node.h \
+		 action_listener.h \
 		 defs/message_structures.h \
 		 util/loading/game_loader.h \
@@ -151,4 +152,5 @@
 		 lib/coord/null_parent.h \
 		 lib/coord/helper_parent.h \
+		 lib/coord/pilot_node.h \
 		 lib/graphics/graphics_engine.h \
 		 lib/graphics/light.h \
@@ -165,5 +167,4 @@
 		 lib/graphics/particles/particle_system.h \
 		 lib/graphics/particles/particle_emitter.h \
-		 lib/lang/base_entity.h \
 		 lib/lang/base_object.h \
 		 util/common/list.h \
Index: orxonox/branches/physics/src/Makefile.in
===================================================================
--- orxonox/branches/physics/src/Makefile.in	(revision 4331)
+++ orxonox/branches/physics/src/Makefile.in	(revision 4332)
@@ -68,12 +68,11 @@
 	test_bullet.$(OBJEXT) test_entity.$(OBJEXT) p_node.$(OBJEXT) \
 	null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \
-	graphics_engine.$(OBJEXT) light.$(OBJEXT) \
+	pilot_node.$(OBJEXT) graphics_engine.$(OBJEXT) light.$(OBJEXT) \
 	text_engine.$(OBJEXT) array.$(OBJEXT) objModel.$(OBJEXT) \
 	md2Model.$(OBJEXT) primitive_model.$(OBJEXT) model.$(OBJEXT) \
 	material.$(OBJEXT) texture.$(OBJEXT) particle_engine.$(OBJEXT) \
 	particle_system.$(OBJEXT) particle_emitter.$(OBJEXT) \
-	base_entity.$(OBJEXT) base_object.$(OBJEXT) \
-	ini_parser.$(OBJEXT) substring.$(OBJEXT) vector.$(OBJEXT) \
-	curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) \
+	base_object.$(OBJEXT) ini_parser.$(OBJEXT) substring.$(OBJEXT) \
+	vector.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) \
 	benchmark.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
@@ -85,6 +84,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/animation3d.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/animation_player.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/array.Po ./$(DEPDIR)/base_entity.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/base_object.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/array.Po ./$(DEPDIR)/base_object.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/benchmark.Po ./$(DEPDIR)/camera.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/campaign.Po \
@@ -107,5 +105,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/particle_engine.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/particle_system.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/player.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/pilot_node.Po ./$(DEPDIR)/player.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/primitive_model.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/projectile.Po \
@@ -295,4 +293,5 @@
 		 lib/coord/null_parent.cc \
 		 lib/coord/helper_parent.cc \
+		 lib/coord/pilot_node.cc \
 		 lib/graphics/graphics_engine.cc \
 		 lib/graphics/light.cc \
@@ -308,5 +307,4 @@
 		 lib/graphics/particles/particle_system.cc \
 		 lib/graphics/particles/particle_emitter.cc \
-		 lib/lang/base_entity.cc \
 		 lib/lang/base_object.cc \
 		 lib/util/ini_parser.cc \
@@ -321,4 +319,5 @@
 		 defs/keynames.h \
 		 command_node.h \
+		 action_listener.h \
 		 defs/message_structures.h \
 		 util/loading/game_loader.h \
@@ -365,4 +364,5 @@
 		 lib/coord/null_parent.h \
 		 lib/coord/helper_parent.h \
+		 lib/coord/pilot_node.h \
 		 lib/graphics/graphics_engine.h \
 		 lib/graphics/light.h \
@@ -379,5 +379,4 @@
 		 lib/graphics/particles/particle_system.h \
 		 lib/graphics/particles/particle_emitter.h \
-		 lib/lang/base_entity.h \
 		 lib/lang/base_object.h \
 		 util/common/list.h \
@@ -476,5 +475,4 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/animation_player.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_entity.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_object.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/benchmark.Po@am__quote@
@@ -507,4 +505,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particle_engine.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particle_system.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pilot_node.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive_model.Po@am__quote@
@@ -1090,4 +1089,20 @@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o helper_parent.obj `if test -f 'lib/coord/helper_parent.cc'; then $(CYGPATH_W) 'lib/coord/helper_parent.cc'; else $(CYGPATH_W) '$(srcdir)/lib/coord/helper_parent.cc'; fi`
 
+pilot_node.o: lib/coord/pilot_node.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pilot_node.o -MD -MP -MF "$(DEPDIR)/pilot_node.Tpo" -c -o pilot_node.o `test -f 'lib/coord/pilot_node.cc' || echo '$(srcdir)/'`lib/coord/pilot_node.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/pilot_node.Tpo" "$(DEPDIR)/pilot_node.Po"; else rm -f "$(DEPDIR)/pilot_node.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/coord/pilot_node.cc' object='pilot_node.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/pilot_node.Po' tmpdepfile='$(DEPDIR)/pilot_node.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pilot_node.o `test -f 'lib/coord/pilot_node.cc' || echo '$(srcdir)/'`lib/coord/pilot_node.cc
+
+pilot_node.obj: lib/coord/pilot_node.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pilot_node.obj -MD -MP -MF "$(DEPDIR)/pilot_node.Tpo" -c -o pilot_node.obj `if test -f 'lib/coord/pilot_node.cc'; then $(CYGPATH_W) 'lib/coord/pilot_node.cc'; else $(CYGPATH_W) '$(srcdir)/lib/coord/pilot_node.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/pilot_node.Tpo" "$(DEPDIR)/pilot_node.Po"; else rm -f "$(DEPDIR)/pilot_node.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/coord/pilot_node.cc' object='pilot_node.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/pilot_node.Po' tmpdepfile='$(DEPDIR)/pilot_node.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pilot_node.obj `if test -f 'lib/coord/pilot_node.cc'; then $(CYGPATH_W) 'lib/coord/pilot_node.cc'; else $(CYGPATH_W) '$(srcdir)/lib/coord/pilot_node.cc'; fi`
+
 graphics_engine.o: lib/graphics/graphics_engine.cc
 @am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT graphics_engine.o -MD -MP -MF "$(DEPDIR)/graphics_engine.Tpo" -c -o graphics_engine.o `test -f 'lib/graphics/graphics_engine.cc' || echo '$(srcdir)/'`lib/graphics/graphics_engine.cc; \
@@ -1297,20 +1312,4 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particle_emitter.obj `if test -f 'lib/graphics/particles/particle_emitter.cc'; then $(CYGPATH_W) 'lib/graphics/particles/particle_emitter.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/particles/particle_emitter.cc'; fi`
-
-base_entity.o: lib/lang/base_entity.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT base_entity.o -MD -MP -MF "$(DEPDIR)/base_entity.Tpo" -c -o base_entity.o `test -f 'lib/lang/base_entity.cc' || echo '$(srcdir)/'`lib/lang/base_entity.cc; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/base_entity.Tpo" "$(DEPDIR)/base_entity.Po"; else rm -f "$(DEPDIR)/base_entity.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/lang/base_entity.cc' object='base_entity.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/base_entity.Po' tmpdepfile='$(DEPDIR)/base_entity.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o base_entity.o `test -f 'lib/lang/base_entity.cc' || echo '$(srcdir)/'`lib/lang/base_entity.cc
-
-base_entity.obj: lib/lang/base_entity.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT base_entity.obj -MD -MP -MF "$(DEPDIR)/base_entity.Tpo" -c -o base_entity.obj `if test -f 'lib/lang/base_entity.cc'; then $(CYGPATH_W) 'lib/lang/base_entity.cc'; else $(CYGPATH_W) '$(srcdir)/lib/lang/base_entity.cc'; fi`; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/base_entity.Tpo" "$(DEPDIR)/base_entity.Po"; else rm -f "$(DEPDIR)/base_entity.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/lang/base_entity.cc' object='base_entity.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/base_entity.Po' tmpdepfile='$(DEPDIR)/base_entity.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o base_entity.obj `if test -f 'lib/lang/base_entity.cc'; then $(CYGPATH_W) 'lib/lang/base_entity.cc'; else $(CYGPATH_W) '$(srcdir)/lib/lang/base_entity.cc'; fi`
 
 base_object.o: lib/lang/base_object.cc
Index: orxonox/branches/physics/src/action_listener.h
===================================================================
--- orxonox/branches/physics/src/action_listener.h	(revision 4332)
+++ orxonox/branches/physics/src/action_listener.h	(revision 4332)
@@ -0,0 +1,27 @@
+/*! 
+    \file proto_class.h
+    \brief Definition of ...
+
+*/
+
+#ifndef _ACTION_LISTENER_H
+#define _ACTION_LISTENER_H
+
+#include "base_object.h"
+
+
+
+//! an abstract class that stands for an action listener
+class ActionListener : public BaseObject {
+
+ public:
+  ActionListener();
+  virtual ~ActionListener();
+
+  void actionPerformed() {}
+
+  virtual void command(Command* cmd) = NULL;
+
+};
+
+#endif /* _ACTION_LISTENER_H */
Index: orxonox/branches/physics/src/class_list.h
===================================================================
--- orxonox/branches/physics/src/class_list.h	(revision 4331)
+++ orxonox/branches/physics/src/class_list.h	(revision 4332)
@@ -6,13 +6,80 @@
 */
 
+#ifndef _CLASS_LIST_H
+#define _CLASS_LIST_H
+
 
 //! list of all classes to be loadable in via the ObjectManager
 typedef enum classList 
 {
+  CL_PARENT,
+  CL_HELPER_PARENT,
+  CL_NULL_PARENT,
+  CL_CAMERA,
+  CL_CAMERA_TARGET,
+  CL_PILOT_PARENT,
+
+  CL_WORLD_ENTITY,
+  CL_ENVIRONEMENT,
+  CL_NPC,
+  CL_PLAYER,
+  CL_POWER_UP,
   CL_PROJECTILE,
+  CL_SATELLITE,
+  CL_SKYBOX,
+  CL_SKYSPHERE,
+  CL_TERRAIN,
   CL_TEST_BULLET,
+  CL_TEST_ENTITY,
+  CL_TEST_GUN,
+  CL_WEAPON,
+  CL_CHARACTER_ATTRIBUTES,
+
+  CL_STORY_ENTITY,
+  CL_CAMPAIGN,
+  CL_WORLD,
+  CL_TRACK_MANAGER,
+  CL_TRACK_NODE,
+
+  CL_ANIMATION,
+  CL_ANIMATION3D,
+  CL_ANIMATION_PLAYER,
+
+  CL_ARRAY,
+  CL_BASE_OBJECT,
+  CL_CURVE,
+  CL_VECTOR,
+  CL_FACTORY,
+  CL_INI_PARSER,
+  CL_LIST,
+  CL_SUBSTRING,
+  CL_LOAD_PARAM,
+
+  CL_OBJECT_MANAGER,
+  CL_RESOURCE_MANAGER,
+  CL_GARBAGE_COLLECTOR,
+  CL_GAME_LOADER,
+  CL_COMMAND_NODE,
+
+  CL_GRAPHICS_ENGINE,  
+  CL_TEXT_ENGINE,
+  CL_TEXT,
+  CL_GLMENU_IMAGE_SCREEN,
+  CL_LIGHT,
+  CL_LIGHT_MANAGER,
+  CL_MATERIAL,
+  CL_MD2Model,
+  CL_MODEL,
+  CL_OBJMODEL,
+  CL_PROMITIVE_MODEL,
+  
+  CL_PARTICLE_EMITTER,
+  CL_PARTICLE_ENGINE,
+  CL_PARTICLE_SYSTEM,
+  
 
   CL_NUMBER
 };
-  
 
+
+#endif /* _CLASS_LIST_H */
Index: orxonox/branches/physics/src/command_node.cc
===================================================================
--- orxonox/branches/physics/src/command_node.cc	(revision 4331)
+++ orxonox/branches/physics/src/command_node.cc	(revision 4332)
@@ -24,4 +24,5 @@
 #include "list.h"
 #include "orxonox.h"
+#include "p_node.h"
 
 #include <stdio.h>
@@ -37,5 +38,5 @@
 CommandNode::CommandNode (int ID)
 {
-  this->bound = new tList<WorldEntity>();
+  this->bound = new tList<PNode>();
   this->aliases = NULL;
   this->netID = ID;
@@ -54,5 +55,5 @@
   this->bLocalInput = true;
   this->netID = 0;
-  this->bound = new tList<WorldEntity>();
+  this->bound = new tList<PNode>();
   this->bEnabled = true;
   this->world = NULL;
@@ -194,5 +195,5 @@
    \param entity: Pointer to the entity to bind
 */
-void CommandNode::bind (WorldEntity* entity)
+void CommandNode::bind (PNode* entity)
 {
   bound->add (entity);
@@ -203,5 +204,5 @@
    \param entity: Pointer to the entity to relese
 */
-void CommandNode::unbind (WorldEntity* entity)
+void CommandNode::unbind (PNode* entity)
 {
   bound->remove (entity);
@@ -264,4 +265,5 @@
 	  cmd.xrel = event.motion.xrel;
 	  cmd.yrel = event.motion.yrel;
+	  if( strlen (cmd.cmd) > 0) relay(&cmd);
 	  break;
 	case SDL_MOUSEBUTTONUP:
@@ -308,9 +310,9 @@
   if( this->world->command(cmd)) return;
 
-  tIterator<WorldEntity>* iterator = bound->getIterator();
-  WorldEntity* entity = iterator->nextElement();
+  tIterator<PNode>* iterator = bound->getIterator();
+  PNode* entity = iterator->nextElement();
   while( entity != NULL)
     {
-      entity->command (cmd); /*no absorbtion of command! strange*/
+      ((WorldEntity*)entity)->command (cmd); /*no absorbtion of command! strange*/
       entity = iterator->nextElement();
     }
Index: orxonox/branches/physics/src/command_node.h
===================================================================
--- orxonox/branches/physics/src/command_node.h	(revision 4331)
+++ orxonox/branches/physics/src/command_node.h	(revision 4332)
@@ -15,4 +15,5 @@
 class WorldEntity;
 class World;
+class PNode;
 
 #define N_STD_KEYS SDLK_LAST
@@ -45,5 +46,5 @@
   int netID;	//!< Unique identifier that is used to determine between remote CommandNodes
   KeyBindings* aliases;
-  tList<WorldEntity>* bound;	//!< List of WorldEntites that recieve commands from this CommandNode
+  tList<PNode>* bound;	//!< List of WorldEntites that recieve commands from this CommandNode
   Sint32 coord[2];
   World* world;
@@ -64,6 +65,6 @@
   void enable (bool bEnabled);
   void loadBindings (char* filename);
-  void bind (WorldEntity* entity);
-  void unbind (WorldEntity* entity);
+  void bind (PNode* entity);
+  void unbind (PNode* entity);
   void addToWorld (World* world);
   void process ();
Index: orxonox/branches/physics/src/glmenu/glmenu_imagescreen.cc
===================================================================
--- orxonox/branches/physics/src/glmenu/glmenu_imagescreen.cc	(revision 4331)
+++ orxonox/branches/physics/src/glmenu/glmenu_imagescreen.cc	(revision 4332)
@@ -88,5 +88,5 @@
 void GLMenuImageScreen::init ()
 {
-  this->setClassName ("GLMenuImageScreen");
+  this->setClassID(CL_GLMENU_IMAGE_SCREEN, "GLMenuImageScreen");
 
   // Select Our VU Meter Background Texture
Index: orxonox/branches/physics/src/lib/coord/helper_parent.cc
===================================================================
--- orxonox/branches/physics/src/lib/coord/helper_parent.cc	(revision 4331)
+++ orxonox/branches/physics/src/lib/coord/helper_parent.cc	(revision 4332)
@@ -30,5 +30,5 @@
 HelperParent::HelperParent () 
 {
-   this->setClassName ("HelperParent");
+   this->setClassID(CL_HELPER_PARENT, "HelperParent");
 }
 
Index: orxonox/branches/physics/src/lib/coord/p_node.h
===================================================================
--- orxonox/branches/physics/src/lib/coord/p_node.h	(revision 4331)
+++ orxonox/branches/physics/src/lib/coord/p_node.h	(revision 4332)
@@ -93,5 +93,4 @@
   const char* getName ();
 
-
   void debug ();
 
Index: orxonox/branches/physics/src/lib/coord/pilot_node.cc
===================================================================
--- orxonox/branches/physics/src/lib/coord/pilot_node.cc	(revision 4332)
+++ orxonox/branches/physics/src/lib/coord/pilot_node.cc	(revision 4332)
@@ -0,0 +1,55 @@
+
+
+/* 
+   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: ...
+*/
+
+
+#include "pilot_node.h"
+#include "command_node.h"
+
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+
+   \todo this constructor is not jet implemented - do it
+*/
+PilotNode::PilotNode () 
+{
+   this->setClassID(CL_PILOT_PARENT, "PilotNode");
+}
+
+
+/**
+   \brief standard deconstructor
+
+   \todo this deconstructor is not jet implemented - do it
+*/
+PilotNode::~PilotNode () 
+{
+
+}
+
+
+void PilotNode::command(Command* cmd)
+{
+  printf("Mouse moved by %d,%d to (%d,%d)\n", 
+	 cmd->xrel, cmd->yrel,
+	 cmd->x, cmd->y);
+
+  //this->setAbsDir(Quaternion(M_PI * 0.4, Vector(1, 0, 0)));
+}
Index: orxonox/branches/physics/src/lib/coord/pilot_node.h
===================================================================
--- orxonox/branches/physics/src/lib/coord/pilot_node.h	(revision 4332)
+++ orxonox/branches/physics/src/lib/coord/pilot_node.h	(revision 4332)
@@ -0,0 +1,23 @@
+/*! 
+    \file helper_parent.h
+    \brief this is a parent class, that isn't visible in the real world itself
+*/
+
+
+#ifndef _PILOT_NODE_H
+#define _PILOT_NODE_H
+
+#include "comincl.h"
+#include "p_node.h"
+
+class PilotNode : public PNode {
+
+ public:
+  PilotNode ();
+  virtual ~PilotNode ();
+  
+  void command(Command* cmd);
+
+};
+
+#endif /* _PILOT_NODE_H */
Index: orxonox/branches/physics/src/lib/graphics/graphics_engine.cc
===================================================================
--- orxonox/branches/physics/src/lib/graphics/graphics_engine.cc	(revision 4331)
+++ orxonox/branches/physics/src/lib/graphics/graphics_engine.cc	(revision 4332)
@@ -34,5 +34,5 @@
   this->minFPS = 9999;
   this->maxFPS = 0;
-  this->setClassName ("GraphicsEngine");
+  this->setClassID(CL_GRAPHICS_ENGINE, "GraphicsEngine");
 
   this->fullscreen = false;
Index: orxonox/branches/physics/src/lib/graphics/light.cc
===================================================================
--- orxonox/branches/physics/src/lib/graphics/light.cc	(revision 4331)
+++ orxonox/branches/physics/src/lib/graphics/light.cc	(revision 4332)
@@ -34,5 +34,5 @@
 Light::Light(int lightNumber)
 {
-  this->setClassName("Light");
+  this->setClassID(CL_LIGHT, "Light");
   char tmpName[7];
   sprintf(tmpName, "Light%d", lightNumber);
@@ -205,5 +205,5 @@
 LightManager::LightManager () 
 {
-  this->setClassName ("LightManager");
+  this->setClassID(CL_LIGHT_MANAGER, "LightManager");
 
   glEnable (GL_LIGHTING);
Index: orxonox/branches/physics/src/lib/graphics/particles/particle_emitter.cc
===================================================================
--- orxonox/branches/physics/src/lib/graphics/particles/particle_emitter.cc	(revision 4331)
+++ orxonox/branches/physics/src/lib/graphics/particles/particle_emitter.cc	(revision 4332)
@@ -30,5 +30,5 @@
 		  float velocity)
 {
-   this->setClassName ("ParticleEmitter");
+   this->setClassID(CL_PARTICLE_EMITTER, "ParticleEmitter");
 
    this->type = EMITTER_DOT;
Index: orxonox/branches/physics/src/lib/graphics/particles/particle_engine.cc
===================================================================
--- orxonox/branches/physics/src/lib/graphics/particles/particle_engine.cc	(revision 4331)
+++ orxonox/branches/physics/src/lib/graphics/particles/particle_engine.cc	(revision 4332)
@@ -30,5 +30,5 @@
 ParticleEngine::ParticleEngine () 
 {
-   this->setClassName ("ParticleEngine");
+   this->setClassID(CL_PARTICLE_ENGINE, "ParticleEngine");
 
    this->systemList = new tList<ParticleSystem>;
Index: orxonox/branches/physics/src/lib/graphics/particles/particle_system.cc
===================================================================
--- orxonox/branches/physics/src/lib/graphics/particles/particle_system.cc	(revision 4331)
+++ orxonox/branches/physics/src/lib/graphics/particles/particle_system.cc	(revision 4332)
@@ -42,5 +42,5 @@
 ParticleSystem::ParticleSystem (unsigned int maxCount, PARTICLE_TYPE type)
 {
-  this->setClassName ("ParticleSystem");
+   this->setClassID(CL_PARTICLE_SYSTEM, "ParticleSystem");
   this->material = NULL;
   this->name = NULL;
Index: orxonox/branches/physics/src/lib/graphics/text_engine.cc
===================================================================
--- orxonox/branches/physics/src/lib/graphics/text_engine.cc	(revision 4331)
+++ orxonox/branches/physics/src/lib/graphics/text_engine.cc	(revision 4332)
@@ -51,5 +51,5 @@
 Text::Text(Font* font, int type)
 {
-  this->setClassName("Text");
+  this->setClassID(CL_TEXT, "Text");
 
   // initialize this Text
@@ -802,5 +802,5 @@
 TextEngine::TextEngine () 
 {
-   this->setClassName ("TextEngine");
+   this->setClassID(CL_TEXT_ENGINE, "TextEngine");
    this->enableFonts();
 
Index: orxonox/branches/physics/src/lib/lang/base_entity.cc
===================================================================
--- orxonox/branches/physics/src/lib/lang/base_entity.cc	(revision 4331)
+++ 	(revision )
@@ -1,32 +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: ...
-*/
-
-
-#include "base_entity.h"
-
-
-using namespace std;
-
-
-
-BaseEntity::BaseEntity () {}
-
-
-
-BaseEntity::~BaseEntity () {}
-
-
Index: orxonox/branches/physics/src/lib/lang/base_entity.h
===================================================================
--- orxonox/branches/physics/src/lib/lang/base_entity.h	(revision 4331)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/*! 
-  \file base_entity.h
-  \brief This includes the default values every entity should have.						\
-*/
-
-#ifndef _BASE_ENTITY_H
-#define _BASE_ENTITY_H
-
-#include "stdincl.h"
-
-//! The Base of each entity-Class
-class BaseEntity {
-
- public:
-  BaseEntity ();
-  ~BaseEntity ();
-
-};
-
-#endif /* _BASE_ENTITY_H */
Index: orxonox/branches/physics/src/lib/lang/base_object.cc
===================================================================
--- orxonox/branches/physics/src/lib/lang/base_object.cc	(revision 4331)
+++ orxonox/branches/physics/src/lib/lang/base_object.cc	(revision 4332)
@@ -30,4 +30,5 @@
 {
   this->className = NULL;
+  this->id = -1;
   this->finalized = false;
 }
@@ -42,9 +43,42 @@
 }
 
-void BaseObject::setClassName (const char* className)
+
+/**
+   \brief sets the class identifiers
+   \param a number for the class from class_list.h enumeration
+   \param the class name
+*/
+void BaseObject::setClassID(int id, const char* className)
+{
+  this->id = id;
+  this->className = className;
+}
+
+
+/**
+   \brief sets the class identifier
+   \param a number for the class from class_list.h enumeration
+*/
+void BaseObject::setClassID (int id)
+{
+  this->id = id;
+}
+
+
+/**
+   \brief sets the class identifiers
+   \param the class name
+*/
+void BaseObject::setClassName(const char* className)
 {
   this->className = className;
 }
 
+
+/**
+   \brief sets the class identifiers
+   \param a number for the class from class_list.h enumeration
+   \param the class name
+*/
 bool BaseObject::isA (char* className)
 {
@@ -54,11 +88,8 @@
 }
 
+
 /*
-bool BaseObject::isFinalized()
-{
-  
-}
+  \brief this finalizes an object and makes it ready to be garbage collected
 */
-
 void BaseObject::finalize()
 {
Index: orxonox/branches/physics/src/lib/lang/base_object.h
===================================================================
--- orxonox/branches/physics/src/lib/lang/base_object.h	(revision 4331)
+++ orxonox/branches/physics/src/lib/lang/base_object.h	(revision 4332)
@@ -9,5 +9,5 @@
 
 #include "stdincl.h"
-
+#include "class_list.h"
 
 class BaseObject {
@@ -17,6 +17,10 @@
   virtual ~BaseObject ();
 
-  void setClassName (const char* className);
+  void setClassID(int id);
+  void setClassName(const char* className);
+  void setClassID(int id, const char* className);
+
   inline const char* getClassName(void) const { return this->className;};
+  inline int getClassID(void) const { return this->id; }
   bool isA (char* className);
 
@@ -25,6 +29,7 @@
 
  private:
-  const char* className;
-  bool finalized;
+  const char*    className;                       //!< the name of the class 
+  int            id;                              //!< this is the id from the class_list.h enumeration
+  bool           finalized;                       //!< is true if the object is ready to be garbage collected
 };
 
Index: orxonox/branches/physics/src/proto/proto_class.cc
===================================================================
--- orxonox/branches/physics/src/proto/proto_class.cc	(revision 4331)
+++ orxonox/branches/physics/src/proto/proto_class.cc	(revision 4332)
@@ -27,5 +27,16 @@
 ProtoClass::ProtoClass () 
 {
-   this->setClassName ("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.
+   */
 }
 
Index: orxonox/branches/physics/src/proto/proto_singleton.cc
===================================================================
--- orxonox/branches/physics/src/proto/proto_singleton.cc	(revision 4331)
+++ orxonox/branches/physics/src/proto/proto_singleton.cc	(revision 4332)
@@ -26,6 +26,17 @@
 ProtoSingleton::ProtoSingleton () 
 {
-   this->setClassName ("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.
+   */
 }
 
Index: orxonox/branches/physics/src/story_entities/campaign.cc
===================================================================
--- orxonox/branches/physics/src/story_entities/campaign.cc	(revision 4331)
+++ orxonox/branches/physics/src/story_entities/campaign.cc	(revision 4332)
@@ -110,5 +110,4 @@
 ErrorMessage Campaign::start(int storyID = 0)
 {
-  printf("World::start() - starting new StoryEntity Nr:%i\n", storyID);
   ErrorMessage errorCode;
   if( !this->isInit) return errorCode; 
@@ -119,4 +118,5 @@
   while( se != NULL && this->running)
     {
+      PRINTF(0)("Starting new StoryEntity Nr:%i\n", se->getStoryID());
       se->displayLoadScreen();
       se->preLoad();
@@ -135,5 +135,5 @@
       if( ( nextWorldID == WORLD_ID_GAMEEND) ||( se == NULL) ) 
 	{
-	  printf("Campaign::start() - quitting campaing story loop\n");
+	  PRINTF(0)("Quitting campaing story loop\n");
 	  if(se != NULL)
 	    delete se;
Index: orxonox/branches/physics/src/story_entities/world.cc
===================================================================
--- orxonox/branches/physics/src/story_entities/world.cc	(revision 4331)
+++ orxonox/branches/physics/src/story_entities/world.cc	(revision 4332)
@@ -27,4 +27,5 @@
 #include "null_parent.h"
 #include "helper_parent.h"
+#include "pilot_node.h"
 #include "track_node.h"
 #include "world_entity.h"
@@ -201,5 +202,5 @@
 void World::constuctorInit(char* name, int worldID)
 {
-  this->setClassName ("World");
+  this->setClassID(CL_WORLD, "World");
 
   //this->worldName = name;
@@ -288,5 +289,5 @@
 
   this->localCamera = new Camera();
-  this->localCamera->setName ("camera");
+  this->localCamera->setName ("Camera");
 
   State::getInstance()->setCamera(this->localCamera, this->localCamera->getTarget());
@@ -308,4 +309,5 @@
     {
       PRINTF(1)("World has no path specified for loading");
+      this->loadDebugWorld(this->getStoryID());
       return (ErrorMessage){213,"Path not specified","World::load()"};
     }
@@ -500,6 +502,11 @@
 
 
+
+/**
+   \brief loads the debug world: only for experimental stuff
+*/
 void World::loadDebugWorld(int worldID)
 {
+  printf("ajsdflkajs;dlfaj;slfja;lsjf;lajsf;la;sdfkja;lskdjfashdfklajshdflkjasdfh\n");
   /*monitor progress*/
   this->glmis->step();
@@ -566,9 +573,4 @@
   lightMan->setAmbientColor(.1,.1,.1);
   lightMan->addLight();
-  //      lightMan->setAttenuation(1.0, .01, 0.0);
-  //      lightMan->setDiffuseColor(1,1,1);
-  //  lightMan->addLight(1);
-  //  lightMan->setPosition(20, 10, -20);
-  //  lightMan->setDiffuseColor(0,0,0);
   lightMan->debug();
 
@@ -585,136 +587,17 @@
 	lightMan->setPosition(-5.0, 10.0, -40.0);
 
-	// !\todo old track-system has to be removed
-
-	//create helper for player
-	//HelperParent* hp = new HelperParent ();
-	/* the player has to be added to this helper */
-
-	// create a player
+
 	this->localPlayer = new Player ();
 	this->localPlayer->setName ("player");
 	this->spawn (this->localPlayer);
 	/*monitor progress*/
-	//this->glmis->step();
 	this->glmis->step();
 
-	// bind input
-	Orxonox *orx = Orxonox::getInstance ();
-	orx->getLocalInput()->bind (this->localPlayer);
-	    
 	// bind camera
 	this->localCamera = new Camera();
 	this->localCamera->setName ("camera");
-	    
 	/*monitor progress*/
 	this->glmis->step();
 
-	sky = new SkyBox();
-	//	(SkyBox*)(sky)->setTexture("pictures/sky/skybox", "jpg");
-	sky->setParent(localCamera);
-	this->spawn(sky);
-
-	/*monitor progress*/
-	this->glmis->step();
-
-	    
-	WorldEntity* env = new Environment();
-	env->setName ("env");
-	this->spawn(env);
-
-	   
-	/*
-	  Vector* es = new Vector (10, 5, 0);
-	  Quaternion* qs = new Quaternion ();
-	  WorldEntity* pr = new Primitive(P_CYLINDER);
-	  pr->setName("primitive");
-	  this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT);
-	*/
-
-	/*monitor progress*/
-	this->glmis->step();
-
-	//	    trackManager->setBindSlave(env);
-	PNode* tn = trackManager->getTrackNode();
-	tn->addChild(this->localPlayer);
-	this->localCamera->lookAt(tn);
-
-	//localCamera->setParent(TrackNode::getInstance());
-	tn->addChild(this->localCamera);
-	//	    localCamera->lookAt(tn);
-	this->localPlayer->setMode(PNODE_ALL);
-	//Vector* cameraOffset = new Vector (0, 5, -10);
-	trackManager->condition(2, LEFTRIGHT, this->localPlayer);
-	this->glmis->step();
-	break;
-      }
-    case DEBUG_WORLD_1:
-      {
-	lightMan->setPosition(.0, .0, .0);
-	lightMan->setAttenuation(1.0, .01, 0.0);
-	lightMan->setSpecularColor(1,0,0);
-	this->nullParent = NullParent::getInstance ();
-	this->nullParent->setName ("NullParent");
-
-	// create a player
-	WorldEntity* myPlayer = new Player();
-	myPlayer->setName ("player");
-	this->spawn(myPlayer);
-	this->localPlayer = myPlayer;	    
-	    
-	// bind input
-	Orxonox *orx = Orxonox::getInstance();
-	orx->getLocalInput()->bind (myPlayer);
-	    
-	// bind camera
-	this->localCamera = new Camera ();
-	this->localCamera->setName ("camera");
-	this->localCamera->lookAt(LightManager::getInstance()->getLight(0));
-	this->localCamera->setParent(this->localPlayer);
-
-	// Create SkySphere
-	sky = new Skysphere("pictures/sky-replace.jpg");
-	this->localPlayer->addChild(this->sky);
-	this->spawn(this->sky);
-	Vector* es = new Vector (20, 0, 0);
-	Quaternion* qs = new Quaternion ();
-
-	lightMan->getLight(0)->setParent(trackManager->getTrackNode());
-	break;
-      }
-    case DEBUG_WORLD_2:
-      {
-	lightMan->setAmbientColor(.1,.1,.1);
-	lightMan->addLight();
-	lightMan->setPosition(-5.0, 10.0, -40.0);
-	this->nullParent = NullParent::getInstance ();
-	this->nullParent->setName ("NullParent");
-
-	// !\todo old track-system has to be removed
-
-	//create helper for player
-	//HelperParent* hp = new HelperParent ();
-	/* the player has to be added to this helper */
-
-	// create a player
-	this->localPlayer = new Player ();
-	this->localPlayer->setName ("player");
-	this->spawn (this->localPlayer);
-	/*monitor progress*/
-	//this->glmis->step();	    
-	this->glmis->step();
-
-	// bind input
-	Orxonox *orx = Orxonox::getInstance ();
-	orx->getLocalInput()->bind (this->localPlayer);
-	    
-	// bind camera
-	this->localCamera = new Camera();
-	this->localCamera->setName ("camera");
-	this->localCamera->lookAt(this->localPlayer);
-	this->localCamera->setParent(this->localPlayer);
-	    
-	/*monitor progress*/
-	this->glmis->step();
 
 	// Create SkySphere
@@ -728,110 +611,41 @@
 
 
-	WorldEntity* baseNode = new Satellite(Vector(1,0,1), 1.2);
-	this->localPlayer->addChild(baseNode);
-	baseNode->setRelCoor(Vector(10.0, 2.0, 1.0));
-	this->spawn(baseNode);
-
-	WorldEntity* secondNode = new Satellite(Vector(0,0,1), 2.0);
-	baseNode->addChild(secondNode);
-	secondNode->setRelCoor(Vector(0.0, 0.0, 3.0));
-	this->spawn(secondNode);
-
-
-	WorldEntity* thirdNode = new Satellite(Vector(0,0,1), 1.0);
-	secondNode->addChild(thirdNode);
-	thirdNode->setRelCoor(Vector(2.0, 0.0, 0.0));
-	this->spawn(thirdNode);
-
-	    
-   
-	WorldEntity* c = new Environment();
-	this->localPlayer->addChild(c);
-	c->setRelCoor(Vector(10.0, 2.0, -1.0));
-	this->spawn(c);
-
-
-	    
-	Animation3D* animation = new Animation3D(c);
-	animation->setInfinity(ANIM_INF_REPLAY);
-
-
-	animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_NEG_EXP, ANIM_LINEAR); 
-	animation->addKeyFrame(Vector(0, 2, 0), Quaternion(M_PI, Vector(0,1,0)), 1.0, ANIM_NEG_EXP, ANIM_LINEAR); 
-	animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_NEG_EXP, ANIM_LINEAR); 
-
-
-
-
-
-
-	/*	   
-	  KeyFrame* f1 = new KeyFrame;
-	  f1->position = new Vector(-1.1, 0.0, 2.6);
-	  f1->direction = new Quaternion();
-	  f1->time = 1.0;
-	  f1->mode = NEG_EXP;
-		  
-		  
-	  KeyFrame* f2 = new KeyFrame;
-	  f2->position = new Vector(-2.1, 0.0, 2.6);
-	  f2->direction = new Quaternion();
-	  f2->time = 0.1;
-	  f2->mode = NEG_EXP;
-		  
-	  KeyFrame* f3 = new KeyFrame;
-	  f3->position = new Vector(10.0, 2.0, -1.0);
-	  f3->direction = new Quaternion();
-	  f3->time = 0.2;
-	  f3->mode = NEG_EXP;
-		  
-	  KeyFrame* f4 = new KeyFrame;
-	  f4->position = new Vector(10.0, 5.0, -1.0);
-	  f4->direction = new Quaternion();
-	  f4->time = 1.0;
-	  f4->mode = NEG_EXP;
-		  
-		  
-		  
-	  this->simpleAnimation->animatorBegin();
-	  this->simpleAnimation->selectObject(b);
-	  this->simpleAnimation->setAnimationMode(SINGLE);
-	  this->simpleAnimation->addKeyFrame(f1);
-	  this->simpleAnimation->addKeyFrame(f2);
-	  this->simpleAnimation->start();
-	  this->simpleAnimation->selectObject(c);
-	  this->simpleAnimation->addKeyFrame(f3);
-	  this->simpleAnimation->addKeyFrame(f4);
-	  this->simpleAnimation->start();
-	  this->simpleAnimation->animatorEnd();
-	*/
-
-	/*
-	  Vector* es = new Vector (10, 5, 0);
-	  Quaternion* qs = new Quaternion ();
-	  WorldEntity* pr = new Primitive(P_CYLINDER);
-	  pr->setName("primitive");
-	  this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT);
-	*/
-
+	terrain = new Terrain("worlds/newGround.obj");
+	terrain->setRelCoor(Vector(0,-10,0));
+	this->spawn(terrain);
 	/*monitor progress*/
 	this->glmis->step();
 
-	//	    trackManager->setBindSlave(env);
+	this->pilotNode = new PilotNode();
+	this->pilotNode->addChild(this->localPlayer);
+	this->pilotNode->addChild(this->localCamera);
+	// bind input
+	Orxonox *orx = Orxonox::getInstance ();
+	//orx->getLocalInput()->bind (this->pilotNode);	    
+	
+	/*
 	PNode* tn = trackManager->getTrackNode();
 	tn->addChild(this->localPlayer);
-
-	//localCamera->setParent(TrackNode::getInstance());
+	this->localCamera->lookAt(tn);
+	
 	tn->addChild(this->localCamera);
-	//	    localCamera->lookAt(tn);
 	this->localPlayer->setMode(PNODE_ALL);
-	//Vector* cameraOffset = new Vector (0, 5, -10);
 	trackManager->condition(2, LEFTRIGHT, this->localPlayer);
+	*/
 	this->glmis->step();
+	break;
+      }
+    case DEBUG_WORLD_1:
+      {
+
+	break;
+      }
+    case DEBUG_WORLD_2:
+      {
 
 	break;
       }
     default:
-      printf("World::load() - no world with ID %i found", this->debugWorldNr );
+      break;
     }
 }
@@ -848,4 +662,5 @@
 {
   this->bPause = false;
+  this->pilotNode = NULL;
   CommandNode* cn = Orxonox::getInstance()->getLocalInput();
   cn->addToWorld(this);
@@ -1321,5 +1136,5 @@
   else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW4)) this->localCamera->setViewMode(VIEW_RIGHT);
   else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW5)) this->localCamera->setViewMode(VIEW_TOP);
-
+  else if(this->pilotNode != NULL) if( !strcmp( cmd->cmd, "cursor")) this->pilotNode->command(cmd);
   return false;
 }
Index: orxonox/branches/physics/src/story_entities/world.h
===================================================================
--- orxonox/branches/physics/src/story_entities/world.h	(revision 4331)
+++ orxonox/branches/physics/src/story_entities/world.h	(revision 4332)
@@ -24,4 +24,5 @@
 class Text;
 class TiXmlElement;
+class PilotNode;
 
 //! The game world Interface
@@ -123,4 +124,5 @@
   tList<WorldEntity>* entities;       //!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
   WorldEntity* localPlayer;           //!< The Player, you fly through the level.
+  PilotNode* pilotNode;               //!< THe pilot node to fly with the mouse
 
   GarbageCollector* garbageCollector; //!< reference to the garbage  collector
Index: orxonox/branches/physics/src/util/animation/animation_player.cc
===================================================================
--- orxonox/branches/physics/src/util/animation/animation_player.cc	(revision 4331)
+++ 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 4331)
+++ 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 4331)
+++ 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 4331)
+++ 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 4331)
+++ 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 4331)
+++ 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 4331)
+++ 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 4331)
+++ 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 4331)
+++ 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... */
 
Index: orxonox/branches/physics/src/world_entities/camera.cc
===================================================================
--- orxonox/branches/physics/src/world_entities/camera.cc	(revision 4331)
+++ orxonox/branches/physics/src/world_entities/camera.cc	(revision 4332)
@@ -33,5 +33,5 @@
 Camera::Camera(void)
 {
-  this->setClassName("Camera");
+  this->setClassID(CL_CAMERA, "Camera");
   this->target = new CameraTarget();
 
@@ -190,5 +190,5 @@
 CameraTarget::CameraTarget()
 {
-  this->setClassName("CameraTarget");
+  this->setClassID(CL_CAMERA_TARGET, "CameraTarget");
   this->setMode(PNODE_MOVEMENT);
 }
Index: orxonox/branches/physics/src/world_entities/character_attributes.cc
===================================================================
--- orxonox/branches/physics/src/world_entities/character_attributes.cc	(revision 4331)
+++ orxonox/branches/physics/src/world_entities/character_attributes.cc	(revision 4332)
@@ -29,5 +29,5 @@
 CharacterAttributes::CharacterAttributes () 
 {
-   this->setClassName ("CharacterAttributes");
+   this->setClassID(CL_CHARACTER_ATTRIBUTES, "CharacterAttributes");
 }
 
Index: orxonox/branches/physics/src/world_entities/projectile.cc
===================================================================
--- orxonox/branches/physics/src/world_entities/projectile.cc	(revision 4331)
+++ orxonox/branches/physics/src/world_entities/projectile.cc	(revision 4332)
@@ -33,4 +33,5 @@
 Projectile::Projectile (Weapon* weapon) : WorldEntity()
 {
+  this->setClassID(CL_PROJECTILE, "Projectile");
   this->weapon = weapon;
   this->flightDirection = NULL;
Index: orxonox/branches/physics/src/world_entities/satellite.cc
===================================================================
--- orxonox/branches/physics/src/world_entities/satellite.cc	(revision 4331)
+++ orxonox/branches/physics/src/world_entities/satellite.cc	(revision 4332)
@@ -31,5 +31,5 @@
 Satellite::Satellite (Vector axis, float speed)
 {
-  this->setClassName ("Satellite");
+  this->setClassID(CL_SATELLITE, "Satellite");
   this->model = (Model*) ResourceManager::getInstance()->load("cube", RP_LEVEL);
   this->speed = speed;
Index: orxonox/branches/physics/src/world_entities/skybox.cc
===================================================================
--- orxonox/branches/physics/src/world_entities/skybox.cc	(revision 4331)
+++ orxonox/branches/physics/src/world_entities/skybox.cc	(revision 4332)
@@ -62,5 +62,5 @@
 void SkyBox::preInit(void)
 {
-  this->setClassName("SkyBox");
+  this->setClassID(CL_SKYBOX, "SkyBox");
   this->skyModel = NULL;
   this->material = new Material*[6];
Index: orxonox/branches/physics/src/world_entities/terrain.cc
===================================================================
--- orxonox/branches/physics/src/world_entities/terrain.cc	(revision 4331)
+++ orxonox/branches/physics/src/world_entities/terrain.cc	(revision 4332)
@@ -77,6 +77,5 @@
 void Terrain::init(void)
 {
-  this->setClassName ("Terrain");
-  
+  this->setClassID(CL_TERRAIN, "Terrain");
   this->objectList = 0;
 }
Index: orxonox/branches/physics/src/world_entities/test_bullet.cc
===================================================================
--- orxonox/branches/physics/src/world_entities/test_bullet.cc	(revision 4331)
+++ orxonox/branches/physics/src/world_entities/test_bullet.cc	(revision 4332)
@@ -33,4 +33,5 @@
 TestBullet::TestBullet (Weapon* weapon) : Projectile(weapon)
 {
+  this->setClassID(CL_TEST_BULLET, "TestBullet");
   this->model = (Model*)ResourceManager::getInstance()->load("models/test_projectile.obj", OBJ, RP_LEVEL);
 }
Index: orxonox/branches/physics/src/world_entities/test_entity.cc
===================================================================
--- orxonox/branches/physics/src/world_entities/test_entity.cc	(revision 4331)
+++ orxonox/branches/physics/src/world_entities/test_entity.cc	(revision 4332)
@@ -28,4 +28,5 @@
 TestEntity::TestEntity () : WorldEntity()
 {  
+  this->setClassID(CL_TEST_ENTITY, "TestEntity");
   this->md2Model = new MD2Model();
   this->md2Model->loadModel(ResourceManager::getFullName("models/tris.md2"));
Index: orxonox/branches/physics/src/world_entities/test_gun.cc
===================================================================
--- orxonox/branches/physics/src/world_entities/test_gun.cc	(revision 4331)
+++ orxonox/branches/physics/src/world_entities/test_gun.cc	(revision 4332)
@@ -45,4 +45,5 @@
   :  Weapon (parent, coordinate, direction) 
 {
+  this->setClassID(CL_TEST_GUN, "TestGun");
   this->model = (Model*)ResourceManager::getInstance()->load("models/test_gun.obj", OBJ, RP_CAMPAIGN);
   this->idleTime = 0.2f;
@@ -89,6 +90,6 @@
     }
 
-  BaseObject* p = new TestBullet(this);
-  ObjectManager::getInstance()->cache(CL_TEST_BULLET, 100, *p);
+  Projectile* p = new TestBullet(this);
+  ObjectManager::getInstance()->cache(CL_TEST_BULLET, 100, p);
   ObjectManager::getInstance()->debug();
 }
@@ -143,5 +144,9 @@
     }
 
-  Projectile* pj = new TestBullet(this);
+  Projectile* pj = (TestBullet*)ObjectManager::getInstance()->getFromDeadList(CL_TEST_BULLET);
+
+  //printf( "object ref %p\n", ObjectManager::getInstance()->getFromDeadList(CL_TEST_BULLET));
+
+  //Projectile* pj = new TestBullet(this);
   pj->setAbsCoor(this->getAbsCoor() + this->projectileOffset);
   pj->setAbsDir(this->getAbsDir());
Index: orxonox/branches/physics/src/world_entities/world_entity.cc
===================================================================
--- orxonox/branches/physics/src/world_entities/world_entity.cc	(revision 4331)
+++ orxonox/branches/physics/src/world_entities/world_entity.cc	(revision 4332)
@@ -30,5 +30,5 @@
 WorldEntity::WorldEntity(const TiXmlElement* root)
 {
-  this->setClassName ("WorldEntity");
+  this->setClassID(CL_WORLD_ENTITY, "WorldEntity");
   this->model = NULL;
 
