Index: orxonox/trunk/src/defs/class_list.h
===================================================================
--- orxonox/trunk/src/defs/class_list.h	(revision 4596)
+++ orxonox/trunk/src/defs/class_list.h	(revision 4597)
@@ -108,5 +108,5 @@
 
 
-  // WorldEntities (range from 0x00000201 to 0x000005ff)
+  // WorldEntities (range from 0x00000201 to 0x000004ff)
   CL_CAMERA               =    0x00000201,
   CL_CAMERA_TARGET        =    0x00000202,
@@ -122,42 +122,56 @@
 
 
-  CL_EVENT                =    0x00000a08,
-  CL_KEY_MAPPER           =    0x00000a09,
+  // gamePlay (range from 0x00000500 0x000005ff)
+  CL_EVENT                =    0x00000501,
+  CL_KEY_MAPPER           =    0x00000502,
+
+  CL_WEAPON_MANAGER       =    0x00000503,
+
+  // Physics stuff (range from 0x00000600 to 0x000007ff)
+  CL_PHYSICS_CONNECTION   =    0x00000601,
+  // Collision
+  CL_COLLISION            =    0x00000611,
+  CL_BV_TREE              =    0x00000612,
+  CL_BV_TREE_NODE         =    0x00000613,
+  CL_OBB_TREE             =    0x00000614,
+  CL_OBB_TREE_NODE        =    0x00000615,
+  CL_BOUNDING_VOLUME      =    0x00000616,
+  CL_OBB                  =    0x00000617,
+  CL_BOUNDING_SPHERE      =    0x00000618,
 
   // graphical stuff (range from 0x00000800 to 0x000009ff)
   CL_TEXT                 =    0x00000801,
-  CL_MATERIAL             =    0x00000802,
-  CL_MODEL                =    0x00000803, //!< \todo make this a SUBCLASS maybe
-  CL_OBJMODEL             =    0x00000804,
-  CL_PROMITIVE_MODEL      =    0x00000805,
-  CL_MD2Model             =    0x00000806,
-  CL_LIGHT                =    0x00000807,
-  CL_PARTICLE_EMITTER     =    0x00000808,
-  CL_PARTICLE_SYSTEM      =    0x00000809,
+  CL_FONT                 =    0x00000802,
+  CL_MATERIAL             =    0x00000803,
+  CL_MODEL                =    0x00000804, //!< \todo make this a SUBCLASS maybe
+  CL_OBJMODEL             =    0x00000805,
+  CL_PROMITIVE_MODEL      =    0x00000806,
+  CL_MD2Model             =    0x00000807,
+  CL_LIGHT                =    0x00000808,
+  CL_PARTICLE_EMITTER     =    0x00000809,
+  CL_PARTICLE_SYSTEM      =    0x0000080a,
+  CL_ENVIRONMENT          =    0x00000810,
   // GL-menu
   CL_GLMENU_IMAGE_SCREEN  =    0x00000901,
 
-  // Collision
-  CL_COLLISION,
-  CL_BV_TREE,
-  CL_BV_TREE_NODE,
-  CL_OBB_TREE,
-  CL_OBB_TREE_NODE,
-  CL_BOUNDING_VOLUME,
-  CL_OBB,
-  CL_BOUNDING_SPHERE,
+  // sound stuff (range from 0x00000a00 to 0x00000aff)
+  CL_SOUND_BUFFER         =    0x00000a01,
+  CL_SOUND_SOURCE         =    0x00000a02,
 
-  // misc: (range from 0x00000a00 to 0x00000bff)
-  CL_ANIMATION            =    0x00000a01,
-  //  CL_ANIMATION3D          =    0x00000a02,
-  CL_FACTORY              =    0x00000a02,
-  CL_INI_PARSER           =    0x00000a03,
-  CL_LIST                 =    0x00000a04,
-  CL_SUBSTRING            =    0x00000a05,
-  CL_LOAD_PARAM           =    0x00000a06,
-  CL_CURVE                =    0x00000a07,
-  CL_VECTOR               =    0x00000a08,
-  CL_CHARACTER_ATTRIBUTES =    0x00000a09,
-  CL_NUMBER
+
+  // misc: (range from 0x00000b00 to 0x00000cff)
+  CL_ANIMATION            =    0x00000b01,
+  //  CL_ANIMATION3D          =    0x00000b02,
+  CL_QUICK_ANIMATION      =    0x00000b02,
+  CL_FACTORY              =    0x00000b03,
+  CL_INI_PARSER           =    0x00000b04,
+  CL_LIST                 =    0x00000b05,
+  CL_SUBSTRING            =    0x00000b06,
+  CL_LOAD_PARAM           =    0x00000b07,
+  CL_CURVE                =    0x00000b08,
+  CL_VECTOR               =    0x00000b09,
+  CL_CHARACTER_ATTRIBUTES =    0x00000b0a,
+  CL_TRACK_ELEMENT        =    0x00000b0b,
+  CL_NUMBER               =    0x00000b0c
 };
 
Index: orxonox/trunk/src/glmenu/glmenu_imagescreen.cc
===================================================================
--- orxonox/trunk/src/glmenu/glmenu_imagescreen.cc	(revision 4596)
+++ orxonox/trunk/src/glmenu/glmenu_imagescreen.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -13,5 +13,5 @@
    ### File Specific:
    main-programmer: Patrick Boenzli
-   co-programmer: 
+   co-programmer:
 */
 
@@ -28,59 +28,10 @@
 using namespace std;
 /**
-   \brief standard constructor
-*/
-GLMenuImageScreen::GLMenuImageScreen () 
-{
-   this->init();
-}
-
-/**
    \param root The Element to load the GLMenu from
 */
 GLMenuImageScreen::GLMenuImageScreen(const TiXmlElement* root)
 {
-  this->init();
-  this->loadParams(root);
-}
-
-/**
-   \brief Loads a GLMenu from an inputElement
-   \param root The Element to load the GLMenu from
-*/
-void GLMenuImageScreen::loadParams(const TiXmlElement* root)
-{
-  LoadParam<GLMenuImageScreen>(root, "BackgroundImage", this, &GLMenuImageScreen::setBackgroundImage)
-    .describe("sets the image to load onto the loadscreen");
-
-  LoadParam<GLMenuImageScreen>(root, "BackgroundPS", this, &GLMenuImageScreen::setPosScale)
-    .describe("The Position and Scale of the Background Image in %(0-1.0). PosX, PosY, SizeX, SizeY");
-
-  LoadParam<GLMenuImageScreen>(root, "BarImage", this, &GLMenuImageScreen::setBarImage)
-    .describe("sets the image of the LoadingBar");
-  
-  LoadParam<GLMenuImageScreen>(root, "BarPS", this, &GLMenuImageScreen::setBarPosScale)
-    .describe("The Position and Scale of the Loading Bar in %(0-1.0). PosX, PosY, SizeX, SizeY");
-
-  LoadParam<GLMenuImageScreen>(root, "ElementCount", this, &GLMenuImageScreen::setMaximum)
-    .describe("The Count of elements to load into the bar (this is only a maximum value)");
-}
-
-/**
-   \brief standard deconstructor
-   \todo this deconstructor is not jet implemented - do it
-*/
-GLMenuImageScreen::~GLMenuImageScreen() 
-{
-  delete this->backMat;
-  delete this->barMat;
-}
-
-/**
-   \brief function to init the screen
-*/
-void GLMenuImageScreen::init ()
-{
   this->setClassID(CL_GLMENU_IMAGE_SCREEN, "GLMenuImageScreen");
-
+  this->setName("GLMenuLoadScreen");
   // Select Our VU Meter Background Texture
   this->backMat = new Material("load_screen");
@@ -92,7 +43,42 @@
   this->setBarPosScale( .6, .75, .3, .1);
   // End of Background image code.
-}
-
-/** 
+
+  if (root)
+    this->loadParams(root);
+}
+
+/**
+   \brief Loads a GLMenu from an inputElement
+   \param root The Element to load the GLMenu from
+*/
+void GLMenuImageScreen::loadParams(const TiXmlElement* root)
+{
+  LoadParam<GLMenuImageScreen>(root, "BackgroundImage", this, &GLMenuImageScreen::setBackgroundImage)
+    .describe("sets the image to load onto the loadscreen");
+
+  LoadParam<GLMenuImageScreen>(root, "BackgroundPS", this, &GLMenuImageScreen::setPosScale)
+    .describe("The Position and Scale of the Background Image in %(0-1.0). PosX, PosY, SizeX, SizeY");
+
+  LoadParam<GLMenuImageScreen>(root, "BarImage", this, &GLMenuImageScreen::setBarImage)
+    .describe("sets the image of the LoadingBar");
+
+  LoadParam<GLMenuImageScreen>(root, "BarPS", this, &GLMenuImageScreen::setBarPosScale)
+    .describe("The Position and Scale of the Loading Bar in %(0-1.0). PosX, PosY, SizeX, SizeY");
+
+  LoadParam<GLMenuImageScreen>(root, "ElementCount", this, &GLMenuImageScreen::setMaximum)
+    .describe("The Count of elements to load into the bar (this is only a maximum value)");
+}
+
+/**
+   \brief standard deconstructor
+   \todo this deconstructor is not jet implemented - do it
+*/
+GLMenuImageScreen::~GLMenuImageScreen()
+{
+  delete this->backMat;
+  delete this->barMat;
+}
+
+/**
     \brief sets the background image name
     \param backImageName name of the backgroun-image
@@ -191,7 +177,7 @@
 
 
-/** 
+/**
     \brief call this to trigger a progress event
-    
+
     this has to redraw the progress bar and the whole image
  */
@@ -211,11 +197,11 @@
   glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
 
-  PRINTF(4)("GLMenuImagEscreen::draw() - drawing step %i/%i\n", 
-	    this->currentValue, this->maxValue);
+  PRINTF(4)("GLMenuImagEscreen::draw() - drawing step %i/%i\n",
+            this->currentValue, this->maxValue);
 
   /* screen size */
   int screenWidth = GraphicsEngine::getInstance()->getResolutionX();
   int screenHeight = GraphicsEngine::getInstance()->getResolutionY();
-  
+
   int imageWidth = (int)(screenWidth * this->scaleX);
   int imageHeight = (int)(screenHeight * this->scaleY);
@@ -229,7 +215,7 @@
   int barW = (int)(this->barW *screenWidth);
   int barH = (int)(this->barH *screenHeight);
-  
+
   float val = (float)this->currentValue/(float)this->maxValue;
-		  
+
   if( val > barW)
     val = barW;
@@ -245,5 +231,5 @@
   glTexCoord2i(1, 0); glVertex2i(offsetX + imageWidth, offsetY);
   glEnd();
-  
+
   glDisable(GL_TEXTURE_2D);
   /* draw white border */
@@ -256,5 +242,5 @@
   glColor3f(1.0, 1.0, 1.0);
   glEnd();
-  
+
   /* draw the progress bar */
   barMat->select();
@@ -275,6 +261,6 @@
     glColor3f(1.0, 1.0, 1.0);
     glEnd();
-    
-    /* draw black border 
+
+    /* draw black border
     glBegin(GL_QUADS);
     glColor3f(0.0, 0.0, 0.0);
@@ -285,11 +271,11 @@
     glColor3f(1.0, 1.0, 1.0);
     glEnd();
-    
+
   */
 
   GraphicsEngine::leave2DMode();
 
-  SDL_GL_SwapBuffers();              
-}
- 
-
+  SDL_GL_SwapBuffers();
+}
+
+
Index: orxonox/trunk/src/glmenu/glmenu_imagescreen.h
===================================================================
--- orxonox/trunk/src/glmenu/glmenu_imagescreen.h	(revision 4596)
+++ orxonox/trunk/src/glmenu/glmenu_imagescreen.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file glmenu_imagescreen.h
     \brief class to display a LoadScreen
@@ -16,13 +16,10 @@
 
  public:
-  GLMenuImageScreen ();
-  GLMenuImageScreen (const TiXmlElement* root);
+  GLMenuImageScreen (const TiXmlElement* root = NULL);
   void loadParams(const TiXmlElement* root);
   virtual ~GLMenuImageScreen ();
 
-  void init ();
+  void draw ();
 
-  void draw ();
-  
   void setBackgroundImage(const char* backImageName);
   void setPosition(float offsetX, float offsetY);
Index: orxonox/trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4596)
+++ orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -29,10 +29,11 @@
    \todo this constructor is not jet implemented - do it
 */
-GraphicsEngine::GraphicsEngine () 
-{
+GraphicsEngine::GraphicsEngine ()
+{
+  this->setClassID(CL_GRAPHICS_ENGINE, "GraphicsEngine");
+  this->setName("GraphicsEngine");
   this->bDisplayFPS = false;
   this->minFPS = 9999;
   this->maxFPS = 0;
-  this->setClassID(CL_GRAPHICS_ENGINE, "GraphicsEngine");
 
   this->fullscreen = false;
@@ -51,5 +52,5 @@
    \brief destructs the graphicsEngine.
 */
-GraphicsEngine::~GraphicsEngine () 
+GraphicsEngine::~GraphicsEngine ()
 {
   // delete what has to be deleted here
@@ -79,10 +80,10 @@
   if( videoInfo == NULL)
     {
-      PRINTF(1)("Failed getting Video Info :%s\n", SDL_GetError()); 
+      PRINTF(1)("Failed getting Video Info :%s\n", SDL_GetError());
       SDL_Quit ();
     }
   if( videoInfo->hw_available)
     this->videoFlags |= SDL_HWSURFACE;
-  else 
+  else
     this->videoFlags |= SDL_SWSURFACE;
   /*
@@ -93,12 +94,12 @@
   // setting up the Resolution
   this->setResolution(800, 600, 16);
-  
+
   // Set window labeling
   SDL_WM_SetCaption ("Orxonox " PACKAGE_VERSION, "Orxonox " PACKAGE_VERSION);
-  
+
   // TO DO: Create a cool icon and use it here
   char* loadPic = new char[strlen(ResourceManager::getInstance()->getDataDir())+ 100];
   sprintf(loadPic, "%s%s", ResourceManager::getInstance()->getDataDir(),  "pictures/orxonox-icon32x32.bmp");
-  SDL_WM_SetIcon(SDL_LoadBMP(loadPic), NULL);  
+  SDL_WM_SetIcon(SDL_LoadBMP(loadPic), NULL);
   delete loadPic;
   // Enable default GL stuff
@@ -117,9 +118,9 @@
   //SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
   //SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
-  
-
-  SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );   
-  SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16);    
-  SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 0);  
+
+
+  SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
+  SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16);
+  SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 0);
   SDL_GL_SetAttribute( SDL_GL_ACCUM_RED_SIZE, 0);
   SDL_GL_SetAttribute( SDL_GL_ACCUM_GREEN_SIZE, 0);
@@ -144,5 +145,5 @@
   else
     fullscreenFlag = 0;
-  
+
   printf ("ok\n");
   if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | fullscreenFlag)) == NULL)
@@ -195,5 +196,5 @@
 /**
    \brief entering 2D Mode
-   
+
    this is a GL-Projection-mode, that is orthogonal, for placing the font in fron of everything else
 */
@@ -202,5 +203,5 @@
   GraphicsEngine::storeMatrices();
   SDL_Surface *screen = SDL_GetVideoSurface();
-  
+
   /* Note, there may be other things you need to change,
      depending on how you have your OpenGL state set up.
@@ -215,17 +216,17 @@
   glEnable(GL_BLEND);
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-  
+
   glViewport(0, 0, screen->w, screen->h);
-  
+
   glMatrixMode(GL_PROJECTION);
   glPushMatrix();
   glLoadIdentity();
-  
+
   glOrtho(0.0, (GLdouble)screen->w, (GLdouble)screen->h, 0.0, 0.0, 1.0);
-  
+
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
   glLoadIdentity();
-  
+
   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 }
@@ -238,13 +239,13 @@
   glMatrixMode(GL_MODELVIEW);
   glPopMatrix();
-  
+
   glMatrixMode(GL_PROJECTION);
   glPopMatrix();
-  
+
   glPopAttrib();
 }
 
 /**
-   \brief stores the GL_matrices 
+   \brief stores the GL_matrices
 */
 void GraphicsEngine::storeMatrices(void)
@@ -271,5 +272,5 @@
   /* Get available fullscreen/hardware modes */
   this->videoModes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE);
-  
+
   /* Check is there are any modes available */
   if(this->videoModes == (SDL_Rect **)0){
@@ -277,5 +278,5 @@
     exit(-1);
   }
-  
+
   /* Check if our resolution is restricted */
   if(this->videoModes == (SDL_Rect **)-1){
@@ -301,5 +302,5 @@
       if( unlikely(this->currentFPS > this->maxFPS)) this->maxFPS = this->currentFPS;
       if( unlikely(this->currentFPS < this->minFPS)) this->minFPS = this->currentFPS;
-      
+
 #ifndef NO_TEXT
       char tmpChar1[20];
@@ -315,5 +316,5 @@
     }
 }
-  
+
 /**
    \brief displays the Frames per second
@@ -335,5 +336,5 @@
       this->geTextMinFPS = TextEngine::getInstance()->createText("fonts/druid.ttf", 35, TEXT_DYNAMIC, 0, 255, 0);
       this->geTextMinFPS->setAlignment(TEXT_ALIGN_LEFT);
-      this->geTextMinFPS->setPosition(5, 560);	
+      this->geTextMinFPS->setPosition(5, 560);
 #endif /* NO_TEXT */
     }
@@ -341,3 +342,3 @@
 }
 
-  
+
Index: orxonox/trunk/src/lib/graphics/light.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/light.cc	(revision 4596)
+++ orxonox/trunk/src/lib/graphics/light.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -36,6 +36,6 @@
 {
   this->setClassID(CL_LIGHT, "Light");
-  char tmpName[7];
-  sprintf(tmpName, "Light%d", lightNumber);
+  char tmpName[10];
+  sprintf(tmpName, "Light[%d]", lightNumber);
   this->setName(tmpName);
 
@@ -43,5 +43,5 @@
   // enable The light
   glEnable(lightsV[lightNumber]); // postSpawn
-  
+
   // set values (defaults)
   this->lightNumber = lightNumber;
@@ -179,5 +179,5 @@
 /**
    \brief draws this Light. Being a World-entity the possibility to do this lies at hand.
-*/ 
+*/
 void Light::draw()
 {
@@ -195,5 +195,5 @@
   PRINT(0)(":: %d ::  -- reference %p\n", this->lightNumber, this);
   PRINT(0)(" GL-state: ");
-  GLboolean param; 
+  GLboolean param;
   glGetBooleanv(lightsV[this->lightNumber], &param);
   if (param)
@@ -201,5 +201,5 @@
   else
     PRINT(0)("OFF\n");
-  
+
   PRINT(0)(" Position:      %f/%f/%f\n", this->lightPosition[0], this->lightPosition[1], this->lightPosition[2]);
   PRINT(0)(" DiffuseColor:  %f/%f/%f\n", this->diffuseColor[0], this->diffuseColor[1], this->diffuseColor[2]);
@@ -215,5 +215,5 @@
    \brief standard constructor for a Light
 */
-LightManager::LightManager () 
+LightManager::LightManager ()
 {
   this->setClassID(CL_LIGHT_MANAGER, "LightManager");
@@ -229,5 +229,5 @@
 /**
    \brief standard deconstructor
-   
+
    first disables Lighting
 
@@ -235,8 +235,8 @@
    and in the end sets the singleton Reference to zero.
 */
-LightManager::~LightManager () 
+LightManager::~LightManager ()
 {
   glDisable(GL_LIGHTING);
-  
+
   // this will be done either by worldEntity, or by pNode as each light is one of them
   //  for (int i = 0; i < NUMBEROFLIGHTS; i++)
@@ -270,5 +270,5 @@
   for (int i = 0; i < NUMBEROFLIGHTS; i++)
     if (!this->lights[i])
-      return addLight(i); 
+      return addLight(i);
   PRINTF(1)("no more light slots availiable. All %d already taken\n", NUMBEROFLIGHTS);
   return -1;
@@ -302,5 +302,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -316,5 +316,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(1)("no Light defined yet. So you cannot delete any Light right now.\n");
       return;
@@ -392,5 +392,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -409,5 +409,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -426,5 +426,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -443,5 +443,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -458,5 +458,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -473,5 +473,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -488,5 +488,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet\n");
       return Vector(.0, .0, .0);
@@ -498,5 +498,5 @@
 
 /**
-   \returns the Position of Light 
+   \returns the Position of Light
    \param lightNumber lightnumber
 */
@@ -539,5 +539,5 @@
     if (this->lights[i])
       {
-	this->lights[i]->debug();
+        this->lights[i]->debug();
       }
   PRINT(0)("--------------------------------\n");
Index: orxonox/trunk/src/lib/graphics/text_engine.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/text_engine.cc	(revision 4596)
+++ orxonox/trunk/src/lib/graphics/text_engine.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -16,5 +16,5 @@
 
    !! IMPORTANT !! When using ttf fonts clear the license issues prior to
-   adding them to orxonox. This is really important, because we do not 
+   adding them to orxonox. This is really important, because we do not
    want to offend anyone.
 */
@@ -46,5 +46,5 @@
    \param type The renderType to display this font in
 
-   this constructor is private, because the user should initialize 
+   this constructor is private, because the user should initialize
    a text with the TextEngine.
 */
@@ -68,5 +68,5 @@
 /**
    \brief deletes a Text out of memory
-   
+
    This also ereases the text from the textList of the TextEngine
 */
@@ -117,11 +117,11 @@
       char* tmpText = this->text;
       while (*tmpText != '\0')
-	{
-	  if(glyphArray[*tmpText])
-	    {
-	      width += glyphArray[*tmpText]->width;
-	    }
-	  tmpText++;
-	}
+        {
+          if(glyphArray[*tmpText])
+            {
+              width += glyphArray[*tmpText]->width;
+            }
+          tmpText++;
+        }
       this->posSize.w = width;
     }
@@ -174,6 +174,6 @@
   if (likely(this->font != NULL))
     tmpSurf = TTF_RenderText_Blended(this->font->font,
-				     this->text,
-				     this->color);
+                                     this->text,
+                                     this->color);
   if (tmpSurf)
     this->texture = loadTexture(tmpSurf, &this->texCoord);
@@ -208,5 +208,5 @@
       pos.z = tmp[2];
     }
-  else 
+  else
     {
       pos.x = this->posSize.x;
@@ -232,17 +232,17 @@
       glEnable(GL_TEXTURE_2D);
       glBegin(GL_QUADS);
-      
+
       glTexCoord2f(this->texCoord.minU, this->texCoord.minV);
       glVertex2f(pos.x,   pos.y  );
-      
+
       glTexCoord2f(this->texCoord.maxU, this->texCoord.minV);
       glVertex2f(pos.x + this->posSize.w, pos.y  );
-      
+
       glTexCoord2f(this->texCoord.maxU, this->texCoord.maxV);
       glVertex2f(pos.x + this->posSize.w, pos.y + this->posSize.h);
-      
+
       glTexCoord2f(this->texCoord.minU, this->texCoord.maxV);
       glVertex2f(pos.x, pos.y + this->posSize.h);
-      
+
       glEnd();
     }
@@ -257,12 +257,12 @@
       char* tmpText = this->text;
       while (*tmpText != '\0')
-	{
-	  if(glyphArray[*tmpText])
-	    {
-	      glCallList(glyphArray[*tmpText]->displayList);
-	      glTranslatef(glyphArray[*tmpText]->width, 0, 0);
-	    }
-	  tmpText++;
-	}
+        {
+          if(glyphArray[*tmpText])
+            {
+              glCallList(glyphArray[*tmpText]->displayList);
+              glTranslatef(glyphArray[*tmpText]->width, 0, 0);
+            }
+          tmpText++;
+        }
     }
   glPopMatrix();
@@ -299,5 +299,5 @@
   Uint32 saved_flags;
   Uint8  saved_alpha;
-  
+
   /* Use the surface width and height expanded to powers of 2 */
   w = powerOfTwo(surface->w);
@@ -311,22 +311,22 @@
     }
   image = SDL_CreateRGBSurface(SDL_SWSURFACE,
-			       w, h,
-			       32,
+                               w, h,
+                               32,
 #if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */
-			       0x000000FF, 
-			       0x0000FF00, 
-			       0x00FF0000, 
-			       0xFF000000
+                               0x000000FF,
+                               0x0000FF00,
+                               0x00FF0000,
+                               0xFF000000
 #else
-			       0xFF000000,
-			       0x00FF0000, 
-			       0x0000FF00, 
-			       0x000000FF
+                               0xFF000000,
+                               0x00FF0000,
+                               0x0000FF00,
+                               0x000000FF
 #endif
-			       );
+                               );
   if ( image == NULL ) {
     return 0;
   }
-  
+
   /* Save the alpha blending attributes */
   saved_flags = surface->flags&(SDL_SRCALPHA|SDL_RLEACCELOK);
@@ -335,5 +335,5 @@
     SDL_SetAlpha(surface, 0, 0);
   }
-  
+
   /* Copy the surface into the GL texture image */
   area.x = 0;
@@ -342,10 +342,10 @@
   area.h = surface->h;
   SDL_BlitSurface(surface, &area, image, &area);
-  
+
   /* Restore the alpha blending attributes */
   if ( (saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA ) {
     SDL_SetAlpha(surface, saved_flags, saved_alpha);
   }
-  
+
   /* Create an OpenGL texture for the image */
   glGenTextures(1, &texture);
@@ -354,18 +354,18 @@
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
   glTexImage2D(GL_TEXTURE_2D,
-	       0,
-	       GL_RGBA,
-	       w, h,
-	       0,
-	       GL_RGBA,
-	       GL_UNSIGNED_BYTE,
-	       image->pixels);
+               0,
+               GL_RGBA,
+               w, h,
+               0,
+               GL_RGBA,
+               GL_UNSIGNED_BYTE,
+               image->pixels);
   SDL_FreeSurface(image); /* No longer needed */
-  
+
   return texture;
 }
 
 /**
-   \brief Quick utility function for texture creation 
+   \brief Quick utility function for texture creation
    \param input an integer
    \returns the next bigger 2^n-integer than input
@@ -374,5 +374,5 @@
 {
   int value = 1;
-  
+
   while ( value < input ) {
     value <<= 1;
@@ -395,10 +395,11 @@
 Font::Font(const char* fontFile, unsigned int fontSize, Uint8 r, Uint8 g, Uint8 b)
 {
+  this->setClassID(CL_FONT, "Font");
   // setting default values.
   this->font = NULL;
   this->fontFile = NULL;
   this->glyphArray = NULL;
-  this->fastTextureID = 0;  
-  
+  this->fastTextureID = 0;
+
   this->setSize(fontSize);
 
@@ -423,5 +424,5 @@
     {
       for (int i = 0; i < FONT_HIGHEST_KNOWN_CHAR; i++)
-	delete this->glyphArray[i];
+        delete this->glyphArray[i];
       delete []this->glyphArray;
     }
@@ -441,15 +442,16 @@
   if (!this->fontFile)
     {
+      this->setName(fontFile);
       this->fontFile = new char[strlen(fontFile)+1];
       strcpy(this->fontFile, fontFile);
-      
+
       this->font = TTF_OpenFont(this->fontFile, this->fontSize);
       if(!this->font)
-	{
-	  PRINTF(1)("TTF_OpenFont: %s\n", TTF_GetError());
-	  return false;
-	}
+        {
+          PRINTF(1)("TTF_OpenFont: %s\n", TTF_GetError());
+          return false;
+        }
       else
-	  return true;
+          return true;
     }
   else
@@ -468,11 +470,11 @@
 {
   this->renderStyle = TTF_STYLE_NORMAL;
-  
+
   for (int i = 0; i < strlen(renderStyle); i++)
-    if (strncmp(renderStyle+i, "b", 1) == 0) 
+    if (strncmp(renderStyle+i, "b", 1) == 0)
       this->renderStyle |= TTF_STYLE_BOLD;
     else if (strncmp(renderStyle+i, "i", 1) == 0)
       this->renderStyle |= TTF_STYLE_ITALIC;
-    else if (strncmp(renderStyle+i, "u", 1) == 0) 
+    else if (strncmp(renderStyle+i, "u", 1) == 0)
       this->renderStyle |= TTF_STYLE_UNDERLINE;
 
@@ -547,5 +549,5 @@
    and MUST be deleted by the user..
 
-   This only works for horizontal fonts. see 
+   This only works for horizontal fonts. see
    http://freetype.sourceforge.net/freetype2/docs/tutorial/step2.html
    for more info about vertical Fonts
@@ -557,7 +559,7 @@
   if (likely (this->font!= NULL))
     TTF_GlyphMetrics(this->font, rg->character,
-		     &rg->minX, &rg->maxX,
-		     &rg->minY, &rg->maxY,
-		     &rg->advance);
+                     &rg->minX, &rg->maxX,
+                     &rg->minY, &rg->maxY,
+                     &rg->advance);
   rg->height = rg->maxY - rg->minY;
   rg->width = rg->maxX - rg->minX;
@@ -569,5 +571,5 @@
 GLuint Font::createFastTexture(void)
 {
-  /* interesting GLYPHS: 
+  /* interesting GLYPHS:
    *  32: space
    *  33-47: Special Characters.
@@ -589,18 +591,18 @@
   SDL_Rect tmpRect; // this represents a Rectangle for blitting.
   SDL_Surface* tmpSurf =  SDL_CreateRGBSurface(SDL_SWSURFACE,
-					       rectSize, rectSize,
-					       32,
+                                               rectSize, rectSize,
+                                               32,
 #if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */
-					       0x000000FF, 
-					       0x0000FF00, 
-					       0x00FF0000, 
-					       0xFF000000
+                                               0x000000FF,
+                                               0x0000FF00,
+                                               0x00FF0000,
+                                               0xFF000000
 #else
-					       0xFF000000,
-					       0x00FF0000, 
-					       0x0000FF00, 
-					       0x000000FF
+                                               0xFF000000,
+                                               0x00FF0000,
+                                               0x0000FF00,
+                                               0x000000FF
 #endif
-					       );
+                                               );
   tmpRect.x = 0; tmpRect.y = 0; tmpRect.w = tmpSurf->w; tmpRect.h = tmpSurf->h;
   SDL_SetClipRect(tmpSurf, &tmpRect);
@@ -614,64 +616,64 @@
 
       if (tmpGlyph = this->glyphArray[i])
-	{
-	  if (tmpGlyph->height > maxLineHeight)
-	    maxLineHeight = tmpGlyph->height;
-	  
-	  if (tmpRect.x+tmpGlyph->width > tmpSurf->w)
-	    {
-	      tmpRect.x = 0;
-	      tmpRect.y = tmpRect.y + maxLineHeight + 1;
-	      maxLineHeight = 0;
-	    }
-	  if (tmpRect.y + maxLineHeight > tmpSurf->h)
-	    {
-	      PRINTF(1)("Protection, so font cannot write over the boundraries error (this should not heappen\n");
-	      break;
-	    }
-	  // reading in the new Glyph
-	  if (likely(this->font != NULL))
-	    glyphSurf = TTF_RenderGlyph_Blended(this->font, i, this->fastColor);
-	  if( glyphSurf != NULL )
-	    {
-
-	      SDL_SetAlpha(glyphSurf, 0, 0);
-
-	      SDL_BlitSurface(glyphSurf, NULL, tmpSurf, &tmpRect);
-	      TexCoord tmpTexCoord;
-	      tmpTexCoord.minU = (float)tmpRect.x/(float)tmpSurf->w;
-	      tmpTexCoord.maxU = (float)(tmpRect.x+tmpGlyph->width)/(float)tmpSurf->w;
-	      tmpTexCoord.minV = (float)tmpRect.y/(float)tmpSurf->w;
-	      tmpTexCoord.maxV = (float)(tmpRect.y+tmpGlyph->height)/(float)tmpSurf->w;
-	      tmpGlyph->displayList = glGenLists(1);
-
-	      glNewList(tmpGlyph->displayList, GL_COMPILE);
-	      glBegin(GL_QUADS);
-	      glTexCoord2f(tmpTexCoord.minU, tmpTexCoord.minV);
-	      glVertex2d(0, 0);
-	      glTexCoord2f(tmpTexCoord.minU, tmpTexCoord.maxV);
-	      glVertex2d(0, tmpGlyph->height);
-	      glTexCoord2f(tmpTexCoord.maxU, tmpTexCoord.maxV);
-	      glVertex2d(tmpGlyph->width, tmpGlyph->height);
-	      glTexCoord2f(tmpTexCoord.maxU, tmpTexCoord.minV);
-	      glVertex2d(tmpGlyph->width, 0);
-	      glEnd();
-	      glEndList();
-	      SDL_FreeSurface(glyphSurf);
-
-	      tmpRect.x += tmpGlyph->width + 1;
-
-	      // Outputting Glyphs to BMP-files.
-	      /*
-		char outname[64];
-		if (i < 10)
-		sprintf( outname, "glyph-00%d.bmp", i );
-		else if (i <100)
-		sprintf( outname, "glyph-0%d.bmp", i );
-		else
-		sprintf( outname, "glyph-%d.bmp", i );
-		SDL_SaveBMP(tmpSurf, outname);
-	      */
-	    }
-	}
+        {
+          if (tmpGlyph->height > maxLineHeight)
+            maxLineHeight = tmpGlyph->height;
+
+          if (tmpRect.x+tmpGlyph->width > tmpSurf->w)
+            {
+              tmpRect.x = 0;
+              tmpRect.y = tmpRect.y + maxLineHeight + 1;
+              maxLineHeight = 0;
+            }
+          if (tmpRect.y + maxLineHeight > tmpSurf->h)
+            {
+              PRINTF(1)("Protection, so font cannot write over the boundraries error (this should not heappen\n");
+              break;
+            }
+          // reading in the new Glyph
+          if (likely(this->font != NULL))
+            glyphSurf = TTF_RenderGlyph_Blended(this->font, i, this->fastColor);
+          if( glyphSurf != NULL )
+            {
+
+              SDL_SetAlpha(glyphSurf, 0, 0);
+
+              SDL_BlitSurface(glyphSurf, NULL, tmpSurf, &tmpRect);
+              TexCoord tmpTexCoord;
+              tmpTexCoord.minU = (float)tmpRect.x/(float)tmpSurf->w;
+              tmpTexCoord.maxU = (float)(tmpRect.x+tmpGlyph->width)/(float)tmpSurf->w;
+              tmpTexCoord.minV = (float)tmpRect.y/(float)tmpSurf->w;
+              tmpTexCoord.maxV = (float)(tmpRect.y+tmpGlyph->height)/(float)tmpSurf->w;
+              tmpGlyph->displayList = glGenLists(1);
+
+              glNewList(tmpGlyph->displayList, GL_COMPILE);
+              glBegin(GL_QUADS);
+              glTexCoord2f(tmpTexCoord.minU, tmpTexCoord.minV);
+              glVertex2d(0, 0);
+              glTexCoord2f(tmpTexCoord.minU, tmpTexCoord.maxV);
+              glVertex2d(0, tmpGlyph->height);
+              glTexCoord2f(tmpTexCoord.maxU, tmpTexCoord.maxV);
+              glVertex2d(tmpGlyph->width, tmpGlyph->height);
+              glTexCoord2f(tmpTexCoord.maxU, tmpTexCoord.minV);
+              glVertex2d(tmpGlyph->width, 0);
+              glEnd();
+              glEndList();
+              SDL_FreeSurface(glyphSurf);
+
+              tmpRect.x += tmpGlyph->width + 1;
+
+              // Outputting Glyphs to BMP-files.
+              /*
+                char outname[64];
+                if (i < 10)
+                sprintf( outname, "glyph-00%d.bmp", i );
+                else if (i <100)
+                sprintf( outname, "glyph-0%d.bmp", i );
+                else
+                sprintf( outname, "glyph-%d.bmp", i );
+                SDL_SaveBMP(tmpSurf, outname);
+              */
+            }
+        }
     }
 
@@ -682,11 +684,11 @@
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
   glTexImage2D(GL_TEXTURE_2D,
-	       0,
-	       GL_RGBA,
-	       tmpSurf->w, tmpSurf->h,
-	       0,
-	       GL_RGBA,
-	       GL_UNSIGNED_BYTE,
-	       tmpSurf->pixels);
+               0,
+               GL_RGBA,
+               tmpSurf->w, tmpSurf->h,
+               0,
+               GL_RGBA,
+               GL_UNSIGNED_BYTE,
+               tmpSurf->pixels);
   SDL_FreeSurface(tmpSurf);
   return texture;
@@ -707,9 +709,9 @@
       this->glyphArray = new Glyph*[FONT_HIGHEST_KNOWN_CHAR];
       for (int i = 0; i < FONT_HIGHEST_KNOWN_CHAR; i++)
-	this->glyphArray[i] = NULL;
-    }
-  
+        this->glyphArray[i] = NULL;
+    }
+
   Uint16 lastGlyph = from + count;
-  
+
   for (int i = from; i <= lastGlyph; i++)
     {
@@ -723,8 +725,8 @@
    \returns the optimal size to use as the texture size
 
-   \todo: this algorithm can be a lot more faster, althought it does 
+   \todo: this algorithm can be a lot more faster, althought it does
    not really matter within the init-context, and 128 glyphs.
 
-   This function searches for a 2^n sizes texture-size, this is for 
+   This function searches for a 2^n sizes texture-size, this is for
    openGL-version < 1.2 compatibility ( and because it is realy easy like this :))
 */
@@ -743,27 +745,27 @@
       maxLineHeight = 0;
       for (i = 0; i < FONT_HIGHEST_KNOWN_CHAR; i++)
-	{
-	  if(tmpGlyph = this->glyphArray[i])
-	    {
-	      // getting the height of the highest Glyph in the Line.
-	      if (tmpGlyph->height > maxLineHeight)
-		maxLineHeight = tmpGlyph->height;
-
-	      if (x + tmpGlyph->width > size)
-		{
-		  x = 0;
-		  y = y + maxLineHeight;
-		  maxLineHeight = 0;
-		}
-	      if (y + maxLineHeight + 1 > size)
-		break;
-	      x += tmpGlyph->width + 1;
-
-	    }
-	}
+        {
+          if(tmpGlyph = this->glyphArray[i])
+            {
+              // getting the height of the highest Glyph in the Line.
+              if (tmpGlyph->height > maxLineHeight)
+                maxLineHeight = tmpGlyph->height;
+
+              if (x + tmpGlyph->width > size)
+                {
+                  x = 0;
+                  y = y + maxLineHeight;
+                  maxLineHeight = 0;
+                }
+              if (y + maxLineHeight + 1 > size)
+                break;
+              x += tmpGlyph->width + 1;
+
+            }
+        }
       if (i == FONT_HIGHEST_KNOWN_CHAR)
-	sizeOK = true;
+        sizeOK = true;
       else
-	size *= 2;
+        size *= 2;
     }
   return size;
@@ -801,7 +803,8 @@
    \brief standard constructor
 */
-TextEngine::TextEngine () 
+TextEngine::TextEngine ()
 {
    this->setClassID(CL_TEXT_ENGINE, "TextEngine");
+   this->setName("TextEngine");
    this->enableFonts();
 
@@ -818,8 +821,8 @@
 
 */
-TextEngine::~TextEngine () 
+TextEngine::~TextEngine ()
 {
   this->disableFonts();
-  
+
   delete this->textList;
 
@@ -835,5 +838,5 @@
     {
       if(TTF_Init()==-1)
-	PRINTF(1)("TTF_Init: %s\n", TTF_GetError());
+        PRINTF(1)("TTF_Init: %s\n", TTF_GetError());
 
       TextEngine::checkVersion();
@@ -932,5 +935,5 @@
 /**
    \brief outputs some nice Debug information
-   
+
    \todo there should also be something outputted about Font
 */
@@ -941,5 +944,5 @@
   PRINT(0)("+-------------------------------+\n");
   PRINT(0)("Reference: %p; Text Counts: %d\n", this, this->textList->getSize());
-  
+
   tIterator<Text>* textIterator = textList->getIterator();
   Text* text = textIterator->nextElement();
@@ -973,13 +976,13 @@
   else
     {
-      PRINTF(2)("compiled with SDL_ttf version: %d.%d.%d\n", 
-		compile_version.major,
-		compile_version.minor,
-		compile_version.patch);
-      
-      PRINTF(2)("running with SDL_ttf version: %d.%d.%d\n", 
-		link_version.major,
-		link_version.minor,
-		link_version.patch);
+      PRINTF(2)("compiled with SDL_ttf version: %d.%d.%d\n",
+                compile_version.major,
+                compile_version.minor,
+                compile_version.patch);
+
+      PRINTF(2)("running with SDL_ttf version: %d.%d.%d\n",
+                link_version.major,
+                link_version.minor,
+                link_version.patch);
       return false;
     }
Index: orxonox/trunk/src/lib/graphics/text_engine.h
===================================================================
--- orxonox/trunk/src/lib/graphics/text_engine.h	(revision 4596)
+++ orxonox/trunk/src/lib/graphics/text_engine.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file text_engine.h
     \brief Definition of textEngine, the Font and the Text
@@ -30,12 +30,15 @@
 
 //! An enumerator for the text alignment.
-enum TEXT_ALIGNMENT { TEXT_ALIGN_LEFT,
-		      TEXT_ALIGN_RIGHT,
-		      TEXT_ALIGN_CENTER,
-		      TEXT_ALIGN_SCREEN_CENTER };
+ enum TEXT_ALIGNMENT
+{
+  TEXT_ALIGN_LEFT,
+  TEXT_ALIGN_RIGHT,
+  TEXT_ALIGN_CENTER,
+  TEXT_ALIGN_SCREEN_CENTER
+};
 
 /* some default values */
 #define FONT_DEFAULT_SIZE       50                   //!< default size of the Text
-#define FONT_DEFAULT_TEXT	"orxonox 1234567890" //!< default text to display
+#define FONT_DEFAULT_TEXT       "orxonox 1234567890" //!< default text to display
 #define FONT_DEFAULT_COLOR_R    255                  //!< default red part (color) of the text
 #define FONT_DEFAULT_COLOR_G    255                  //!< default red green (color) of the text
@@ -86,5 +89,5 @@
   int      bearingY;          //!< How much is above the Origin
   int      advance;           //!< How big a Glyph would be in monospace-mode
-  
+
   // OpenGL-specific
   //  TexCoord texCoord;      //!< A Texture Coordinate for this glyph.
@@ -117,10 +120,10 @@
 
   void draw(void) const;
-  
+
   void debug(void) const;
 
  private:
   Text(Font* font, int type = TEXT_DYNAMIC);
-  
+
   static GLuint loadTexture(SDL_Surface* surface, TexCoord* texCoord);
   static int powerOfTwo(int input);
@@ -139,5 +142,5 @@
   TexCoord          texCoord;       //!< Texture-coordinates \todo fix this to have a struct
   SDL_Rect          posSize;        //!< An SDL-Rectangle representing the position and size of the Text on the screen.
-  
+
   PNode*            bindNode;       //!< A node the Text is bind to. (if NULL thr node will not be bound to anything.)
 };
@@ -147,5 +150,5 @@
 ////////////
 //! A class to handle a Font of a certain ttf-File, Size and Color.
-class Font
+class Font : public BaseObject
 {
   friend class Text;
@@ -170,5 +173,5 @@
   /** \returns the texture to the fast-texture */
   inline GLuint getFastTextureID(void) const {return fastTextureID;}
-  
+
  private:
   int getMaxHeight(void);
@@ -193,5 +196,5 @@
   unsigned int  fontSize;            //!< The size of the font in pixels. each Font has one size.
   int           renderStyle;         //!< The Renderstyle
-  
+
   Glyph**       glyphArray;          //!< An Array of all the Glyphs stored in the Array of Glyphs.
   GLuint        fastTextureID;       //!< The fast textureID.
@@ -205,5 +208,5 @@
 ///////////////////
 //! A singleton Class that operates as a Handler for generating and rendering Text in 2D
-class TextEngine : public BaseObject 
+class TextEngine : public BaseObject
 {
  public:
@@ -213,15 +216,15 @@
 
   Text* createText(const char* fontFile,
-		   unsigned int fontSize = FONT_DEFAULT_SIZE,
-		   int textType = TEXT_DYNAMIC,
-		   Uint8 r = FONT_DEFAULT_COLOR_R,
-		   Uint8 g = FONT_DEFAULT_COLOR_G,
-		   Uint8 b = FONT_DEFAULT_COLOR_B);
-  
+                   unsigned int fontSize = FONT_DEFAULT_SIZE,
+                   int textType = TEXT_DYNAMIC,
+                   Uint8 r = FONT_DEFAULT_COLOR_R,
+                   Uint8 g = FONT_DEFAULT_COLOR_G,
+                   Uint8 b = FONT_DEFAULT_COLOR_B);
+
   void deleteText(Text* text);
   void flush(void);
 
   void draw(void) const;
- 
+
   void debug(void) const;
 
Index: orxonox/trunk/src/lib/math/curve.h
===================================================================
--- orxonox/trunk/src/lib/math/curve.h	(revision 4596)
+++ orxonox/trunk/src/lib/math/curve.h	(revision 4597)
@@ -1,9 +1,9 @@
 
-/*! 
+/*!
     \file curve.h
     \brief A basic 3D curve framework
-    
+
     Contains classes to handle curves
-*/ 
+*/
 
 #ifndef _CURVE_H
@@ -49,5 +49,5 @@
   /** \param t the value on the curve [0-1] \returns quaternion of the rotation */
   virtual Quaternion calcQuat(float t) = 0;
- 
+
   // DEBUG
   void debug(void);
@@ -86,6 +86,6 @@
   virtual Vector calcAcc(float t);
   virtual Quaternion calcQuat(float t);
-  
-  
+
+
   Vector getPos(void) const;
 
Index: orxonox/trunk/src/lib/particles/particle_emitter.cc
===================================================================
--- orxonox/trunk/src/lib/particles/particle_emitter.cc	(revision 4596)
+++ orxonox/trunk/src/lib/particles/particle_emitter.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -31,7 +31,8 @@
    \brief standard constructor
 */
-ParticleEmitter::ParticleEmitter(const Vector& direction, float angle, float emissionRate, 
-		  float velocity)
-{
+ParticleEmitter::ParticleEmitter(const Vector& direction, float angle, float emissionRate,
+                  float velocity)
+{
+  this->setClassID(CL_PARTICLE_EMITTER, "ParticleEmitter");
   this->type = EMITTER_DOT;
   this->emitterSize = 1.0;
@@ -64,5 +65,5 @@
    removes the EmitterSystem from the ParticleEngine
 */
-ParticleEmitter::~ParticleEmitter () 
+ParticleEmitter::~ParticleEmitter ()
 {
   ParticleEngine::getInstance()->removeEmitter(this);
@@ -91,5 +92,5 @@
   LoadParam<ParticleEmitter>(root, "emission-velocity", this, &ParticleEmitter::setEmissionVelocity)
     .describe("How fast the particles are emittet (their initial speed)");
-  
+
   LoadParam<ParticleEmitter>(root, "spread", this, &ParticleEmitter::setSpread)
     .describe("The angle the particles are emitted from (angle, deviation)");
@@ -224,34 +225,34 @@
     float count = (dt+this->saveTime) * this->emissionRate;
     this->saveTime = modff(count, &count) / this->emissionRate;
-    PRINTF(5)("emitting %f particles, saving %f seconds for the next round\n", count, this->saveTime); 
-    
+    PRINTF(5)("emitting %f particles, saving %f seconds for the next round\n", count, this->saveTime);
+
     if (likely(count > 0))
       {
-	Vector inheritVelocity = this->getVelocity() * this->inheritSpeed;
-	for (int i = 0; i < count; i++)
-	  // emmits from EMITTER_DOT,
-	  {
-	    Vector randDir = Vector(rand()-RAND_MAX/2, rand()-RAND_MAX/2, rand()-RAND_MAX/2);
-	    randDir.normalize();
-	    randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)rand()/RAND_MAX -.5), randDir)).apply(this->direction);
-	    Vector velocityV = randDir.getNormalized()*this->velocity + inheritVelocity;
-
-	    // this should spread the Particles evenly. if the Emitter is moved around quickly
-	    Vector equalSpread = this->getVelocity() * rand()/RAND_MAX * dt;
-	    Vector extension; // the Vector for different fields.
-
-	    if (this->type & 2)
-	      {
-		extension = Vector(this->emitterSize * ((float)rand()/RAND_MAX -.5), 0, this->emitterSize * ((float)rand()/RAND_MAX - .5));
-		extension = this->getAbsDir().apply(extension);
-	      }
-	    else if (this->type & 8)
-	      {
-		extension = Vector((float)rand()/RAND_MAX -.5, (float)rand()/RAND_MAX -.5, (float)rand()/RAND_MAX -.5) * this->emitterSize;
-	      }
-
-	    system->addParticle(this->getAbsCoor() + extension - equalSpread, velocityV);
-	    
-	  }
+        Vector inheritVelocity = this->getVelocity() * this->inheritSpeed;
+        for (int i = 0; i < count; i++)
+          // emmits from EMITTER_DOT,
+          {
+            Vector randDir = Vector(rand()-RAND_MAX/2, rand()-RAND_MAX/2, rand()-RAND_MAX/2);
+            randDir.normalize();
+            randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)rand()/RAND_MAX -.5), randDir)).apply(this->direction);
+            Vector velocityV = randDir.getNormalized()*this->velocity + inheritVelocity;
+
+            // this should spread the Particles evenly. if the Emitter is moved around quickly
+            Vector equalSpread = this->getVelocity() * rand()/RAND_MAX * dt;
+            Vector extension; // the Vector for different fields.
+
+            if (this->type & 2)
+              {
+                extension = Vector(this->emitterSize * ((float)rand()/RAND_MAX -.5), 0, this->emitterSize * ((float)rand()/RAND_MAX - .5));
+                extension = this->getAbsDir().apply(extension);
+              }
+            else if (this->type & 8)
+              {
+                extension = Vector((float)rand()/RAND_MAX -.5, (float)rand()/RAND_MAX -.5, (float)rand()/RAND_MAX -.5) * this->emitterSize;
+              }
+
+            system->addParticle(this->getAbsCoor() + extension - equalSpread, velocityV);
+
+          }
       }
   }
Index: orxonox/trunk/src/lib/particles/particle_emitter.h
===================================================================
--- orxonox/trunk/src/lib/particles/particle_emitter.h	(revision 4596)
+++ orxonox/trunk/src/lib/particles/particle_emitter.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file particle_emitter.h
     \brief Definition of a ParticleEmitter
@@ -9,13 +9,16 @@
 #include "p_node.h"
 
-// FORWARD DEFINITION 
+// FORWARD DEFINITION
 class ParticleSystem;
 class TiXmlElement;
 
 //! The form of the Emitter to emit from
-typedef enum EMITTER_TYPE { EMITTER_DOT   = 1,
-			    EMITTER_PLANE = 2,
-			    EMITTER_SPHERE= 4,
-			    EMITTER_CUBE  = 8 };
+  typedef enum EMITTER_TYPE
+{
+  EMITTER_DOT     = 1,
+  EMITTER_PLANE   = 2,
+  EMITTER_SPHERE  = 4,
+  EMITTER_CUBE    = 8
+};
 
 //! A class to handle an Emitter.
@@ -24,8 +27,8 @@
  public:
   ParticleEmitter(const Vector& direction, float angle = .5,
-		  float emissionRate = 1.0, float velocity = 1.0);
+                  float emissionRate = 1.0, float velocity = 1.0);
   ParticleEmitter(const TiXmlElement* root);
   virtual ~ParticleEmitter(void);
-  
+
   void loadParams(const TiXmlElement* root);
 
Index: orxonox/trunk/src/lib/particles/particle_engine.cc
===================================================================
--- orxonox/trunk/src/lib/particles/particle_engine.cc	(revision 4596)
+++ orxonox/trunk/src/lib/particles/particle_engine.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -30,7 +30,8 @@
    \brief standard constructor
 */
-ParticleEngine::ParticleEngine () 
+ParticleEngine::ParticleEngine ()
 {
    this->setClassID(CL_PARTICLE_ENGINE, "ParticleEngine");
+   this->setName("ParticleEngine");
 
    this->systemList = new tList<ParticleSystem>;
@@ -47,5 +48,5 @@
    \brief deletes all the system, emitters, connections and Lists
 */
-ParticleEngine::~ParticleEngine () 
+ParticleEngine::~ParticleEngine ()
 {
   // delete all remaining systems
@@ -113,14 +114,14 @@
     {
       if (tmpConnection->emitter == emitter && tmpConnection->system == system)
-	{
-	  PRINTF(2)("Connection between Emitter and System already added\n");
-	  delete tmpConIt;
-	  return;
-	}
-      
+        {
+          PRINTF(2)("Connection between Emitter and System already added\n");
+          delete tmpConIt;
+          return;
+        }
+
       tmpConnection = tmpConIt->nextElement();
     }
   delete tmpConIt;
-  
+
 
 
@@ -144,5 +145,5 @@
     {
       if (tmpConnection->system == system)
-	this->breakConnection(tmpConnection);
+        this->breakConnection(tmpConnection);
       tmpConnection = tmpConIt->nextElement();
     }
@@ -165,5 +166,5 @@
     {
       if (tmpConnection->emitter == emitter)
-	this->breakConnection(tmpConnection);
+        this->breakConnection(tmpConnection);
       tmpConnection = tmpConIt->nextElement();
     }
@@ -191,7 +192,7 @@
     if (tmpConnection->emitter == emitter && tmpConnection->system == system)
       {
-	this->breakConnection(tmpConnection);
-	delete tmpConIt;
-	return true;
+        this->breakConnection(tmpConnection);
+        delete tmpConIt;
+        return true;
       }
     tmpConnection = tmpConIt->nextElement();
@@ -268,8 +269,8 @@
     {
       if (!strcmp(systemName, tmpSys->getName()))
-	{
-	  delete tmpIt;
-	  return tmpSys;
-	}
+        {
+          delete tmpIt;
+          return tmpSys;
+        }
       tmpSys = tmpIt->nextElement();
     }
@@ -291,8 +292,8 @@
       count++;
       if ( count == number)
-	{
-	  delete tmpIt;
-	  return tmpSys;
-	}
+        {
+          delete tmpIt;
+          return tmpSys;
+        }
       tmpSys = tmpIt->nextElement();
     }
@@ -312,8 +313,8 @@
     {
       if (!strcmp(emitterName, tmpEmit->getName()))
-	{
-	  delete tmpIt;
-	  return tmpEmit;
-	}
+        {
+          delete tmpIt;
+          return tmpEmit;
+        }
       tmpEmit = tmpIt->nextElement();
     }
@@ -336,8 +337,8 @@
       count++;
       if ( count == number)
-	{
-	  delete tmpIt;
-	  return tmpEmit;
-	}
+        {
+          delete tmpIt;
+          return tmpEmit;
+        }
       tmpEmit = tmpIt->nextElement();
     }
@@ -356,5 +357,5 @@
   PRINT(0)(" Reference: %p\n", ParticleEngine::singletonRef);
   PRINT(0)(" Count: Emitters: %d; Systems: %d, Connections: %d\n",
-	    this->emitterList->getSize(), this->systemList->getSize(), this->connectionList->getSize());
+            this->emitterList->getSize(), this->systemList->getSize(), this->connectionList->getSize());
   if (this->connectionList->getSize() > 0)
     {
@@ -365,8 +366,8 @@
       ParticleConnection* tmpConnection = tmpConIt->nextElement();
       while(tmpConnection)
-	{
-	  PRINT(0)(" Emitter '%s' emitts into System '%s'\n", tmpConnection->emitter->getName(), tmpConnection->system->getName());
-	  tmpConnection = tmpConIt->nextElement();
-	}
+        {
+          PRINT(0)(" Emitter '%s' emitts into System '%s'\n", tmpConnection->emitter->getName(), tmpConnection->system->getName());
+          tmpConnection = tmpConIt->nextElement();
+        }
       delete tmpConIt;
     }
@@ -376,8 +377,8 @@
       ParticleSystem* tmpSys = tmpIt->nextElement();
       while(tmpSys)
-	{
-	  tmpSys->debug();
-	  tmpSys = tmpIt->nextElement();
-	}
+        {
+          tmpSys->debug();
+          tmpSys = tmpIt->nextElement();
+        }
       delete tmpIt;
     }
Index: orxonox/trunk/src/lib/particles/particle_system.cc
===================================================================
--- orxonox/trunk/src/lib/particles/particle_system.cc	(revision 4596)
+++ orxonox/trunk/src/lib/particles/particle_system.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -41,4 +41,5 @@
 {
   this->setClassID(CL_PARTICLE_SYSTEM, "ParticleSystem");
+
   this->material = NULL;
   this->maxCount = maxCount;
@@ -125,5 +126,5 @@
 /**
    \brief Sets the lifespan of newly created particles
-*/   
+*/
 void ParticleSystem::setLifeSpan(float lifeSpan, float randomLifeSpan)
 {
@@ -197,19 +198,19 @@
 {
   Particle* tickPart = particles;  // the particle to Tick
-  Particle* prevPart = NULL;       // 
+  Particle* prevPart = NULL;       //
   while (likely(tickPart != NULL))
     {
       // applying force to the System.
       if (likely (tickPart->mass > 0.0))
-	tickPart->velocity += tickPart->extForce / tickPart->mass * dt;
+        tickPart->velocity += tickPart->extForce / tickPart->mass * dt;
 
       // rendering new position.
       tickPart->position = tickPart->position + tickPart->velocity * dt;
       tickPart->radius = radiusAnim.getValue(tickPart->lifeCycle)
-	+ randRadiusAnim.getValue(tickPart->lifeCycle) * tickPart->radiusRand;
+        + randRadiusAnim.getValue(tickPart->lifeCycle) * tickPart->radiusRand;
 
       tickPart->mass = massAnim.getValue(tickPart->lifeCycle)
-	+ randMassAnim.getValue(tickPart->lifeCycle) * tickPart->massRand;
-      
+        + randMassAnim.getValue(tickPart->lifeCycle) * tickPart->massRand;
+
       tickPart->extForce = Vector(0,0,0);
 
@@ -223,35 +224,35 @@
 
       if (this->conserve < 1.0)
-	tickPart->velocity = tickPart->velocity * this->conserve;
+        tickPart->velocity = tickPart->velocity * this->conserve;
       // find out if we have to delete tickPart
       if (unlikely((tickPart->lifeCycle += dt/tickPart->lifeTime) >= 1.0))
-	{
-	  // remove the particle from the list
-	  if (likely(prevPart != NULL))
-	    {
-	      prevPart->next = tickPart->next;
-	      tickPart->next = this->deadList;
-	      this->deadList = tickPart;
-	      tickPart = prevPart->next;
-	    }
-	  else
-	    {
-	      prevPart = NULL;
-	      this->particles = tickPart->next;
-	      tickPart->next = this->deadList;
-	      this->deadList = tickPart;
-	      tickPart = this->particles;
-	    }
-	  --this->count;
-	}
+        {
+          // remove the particle from the list
+          if (likely(prevPart != NULL))
+            {
+              prevPart->next = tickPart->next;
+              tickPart->next = this->deadList;
+              this->deadList = tickPart;
+              tickPart = prevPart->next;
+            }
+          else
+            {
+              prevPart = NULL;
+              this->particles = tickPart->next;
+              tickPart->next = this->deadList;
+              this->deadList = tickPart;
+              tickPart = this->particles;
+            }
+          --this->count;
+        }
       else
-	{      
-	  prevPart = tickPart;
-	  tickPart = tickPart->next;
-	}
-    }
-}
-
-/** 
+        {
+          prevPart = tickPart;
+          tickPart = tickPart->next;
+        }
+    }
+}
+
+/**
     \brief applies some force to a Particle.
     \param field the Field to apply.
@@ -281,5 +282,5 @@
 
   Particle* drawPart = particles;
-      
+
   switch (this->particleType)
     {
@@ -289,48 +290,48 @@
       glDepthMask(GL_FALSE);
 
-      material->select(); 
+      material->select();
       //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-      
+
 
       while (likely(drawPart != NULL))
-	{
-	  glColor4fv(drawPart->color);
-	  //! \todo implement a faster code for the look-at Camera algorithm.
-
-	  const PNode* camera = State::getInstance()->getCamera();  //!< \todo MUST be different
-	  Vector cameraPos = camera->getAbsCoor();
-	  Vector cameraTargetPos = State::getInstance()->getCameraTarget()->getAbsCoor();
-	  Vector view = cameraTargetPos - cameraPos;
-	  Vector up = Vector(0, 1, 0);
-	  up = camera->getAbsDir().apply(up);
-	  Vector h = up.cross(view);
-	  Vector v = h.cross(view);
-	  h.normalize();
-	  v.normalize();
-	  v *= .5 * drawPart->radius;
-	  h *= .5 * drawPart->radius;
-
-	  glBegin(GL_TRIANGLE_STRIP);
-	  glTexCoord2i(1, 1);
-	  glVertex3f(drawPart->position.x - h.x - v.x,
-		     drawPart->position.y - h.y - v.y,
-		     drawPart->position.z - h.z - v.z);
-	  glTexCoord2i(0, 1);
-	  glVertex3f(drawPart->position.x - h.x + v.x,
-		     drawPart->position.y - h.y + v.y,
-		     drawPart->position.z - h.z + v.z);
-	  glTexCoord2i(1, 0);
-	  glVertex3f(drawPart->position.x + h.x - v.x,
-		     drawPart->position.y + h.y - v.y,
-		     drawPart->position.z + h.z - v.z);
-	  glTexCoord2i(0, 0);
-	  glVertex3f(drawPart->position.x + h.x + v.x,
-		     drawPart->position.y + h.y + v.y,
-		     drawPart->position.z + h.z + v.z);
-
-	  glEnd();
-  
-	  drawPart = drawPart->next;
-	}
+        {
+          glColor4fv(drawPart->color);
+          //! \todo implement a faster code for the look-at Camera algorithm.
+
+          const PNode* camera = State::getInstance()->getCamera();  //!< \todo MUST be different
+          Vector cameraPos = camera->getAbsCoor();
+          Vector cameraTargetPos = State::getInstance()->getCameraTarget()->getAbsCoor();
+          Vector view = cameraTargetPos - cameraPos;
+          Vector up = Vector(0, 1, 0);
+          up = camera->getAbsDir().apply(up);
+          Vector h = up.cross(view);
+          Vector v = h.cross(view);
+          h.normalize();
+          v.normalize();
+          v *= .5 * drawPart->radius;
+          h *= .5 * drawPart->radius;
+
+          glBegin(GL_TRIANGLE_STRIP);
+          glTexCoord2i(1, 1);
+          glVertex3f(drawPart->position.x - h.x - v.x,
+                     drawPart->position.y - h.y - v.y,
+                     drawPart->position.z - h.z - v.z);
+          glTexCoord2i(0, 1);
+          glVertex3f(drawPart->position.x - h.x + v.x,
+                     drawPart->position.y - h.y + v.y,
+                     drawPart->position.z - h.z + v.z);
+          glTexCoord2i(1, 0);
+          glVertex3f(drawPart->position.x + h.x - v.x,
+                     drawPart->position.y + h.y - v.y,
+                     drawPart->position.z + h.z - v.z);
+          glTexCoord2i(0, 0);
+          glVertex3f(drawPart->position.x + h.x + v.x,
+                     drawPart->position.y + h.y + v.y,
+                     drawPart->position.z + h.z + v.z);
+
+          glEnd();
+
+          drawPart = drawPart->next;
+        }
       glDepthMask(GL_TRUE);
       break;
@@ -340,26 +341,26 @@
       glBegin(GL_LINES);
       while (likely(drawPart != NULL))
-	{
-	  glColor4fv(drawPart->color);
-	  glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
-	  glVertex3f(drawPart->position.x - drawPart->velocity.x,
-		     drawPart->position.y - drawPart->velocity.y,
-		     drawPart->position.z - drawPart->velocity.z);
-	  drawPart = drawPart->next;
-	}
+        {
+          glColor4fv(drawPart->color);
+          glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
+          glVertex3f(drawPart->position.x - drawPart->velocity.x,
+                     drawPart->position.y - drawPart->velocity.y,
+                     drawPart->position.z - drawPart->velocity.z);
+          drawPart = drawPart->next;
+        }
       glEnd();
       break;
-      
+
     case PARTICLE_DOT:
       glBegin(GL_POINTS);
       while (likely(drawPart != NULL))
-	{
-	  glColor4fv(drawPart->color);
-
-	  glLineWidth(drawPart->radius);
-
-	  glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
-	  drawPart = drawPart->next;
-	}
+        {
+          glColor4fv(drawPart->color);
+
+          glLineWidth(drawPart->radius);
+
+          glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
+          drawPart = drawPart->next;
+        }
       glEnd();
       break;
@@ -380,35 +381,35 @@
       // if it is the first Particle
       if (unlikely(particles == NULL))
-	{
-	  if (likely(deadList != NULL))
-	    {
-	      this->particles = this->deadList;
-	      deadList = deadList->next;
-	    }
-	  else
-	    {
-	      PRINTF(5)("Generating new Particle\n");
-	      this->particles = new Particle;
-	    }
-	  this->particles->next = NULL;
-	}
+        {
+          if (likely(deadList != NULL))
+            {
+              this->particles = this->deadList;
+              deadList = deadList->next;
+            }
+          else
+            {
+              PRINTF(5)("Generating new Particle\n");
+              this->particles = new Particle;
+            }
+          this->particles->next = NULL;
+        }
       // filling the List from the beginning
       else
-	{
-	  Particle* tmpPart;
-	  if (likely(deadList != NULL))
-	    {
-	      tmpPart = this->deadList;
-	      deadList = deadList->next;
-	    }
-	  else
-	    {
-	      PRINTF(5)("Generating new Particle\n");
-	      tmpPart = new Particle;
-	    }
-	  tmpPart->next = this->particles;
-	  this->particles = tmpPart;
-	}
-      
+        {
+          Particle* tmpPart;
+          if (likely(deadList != NULL))
+            {
+              tmpPart = this->deadList;
+              deadList = deadList->next;
+            }
+          else
+            {
+              PRINTF(5)("Generating new Particle\n");
+              tmpPart = new Particle;
+            }
+          tmpPart->next = this->particles;
+          this->particles = tmpPart;
+        }
+
       particles->lifeTime = this->lifeSpan + (float)(rand()/RAND_MAX)* this->randomLifeSpan;
       particles->lifeCycle = 0.0;
Index: orxonox/trunk/src/lib/particles/particle_system.h
===================================================================
--- orxonox/trunk/src/lib/particles/particle_system.h	(revision 4596)
+++ orxonox/trunk/src/lib/particles/particle_system.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file particle_system.h
 
@@ -23,10 +23,13 @@
 
 //! An enumerator for the different types of particles.
-typedef enum PARTICLE_TYPE { PARTICLE_DOT           =  PARTICLE_DOT_MASK,
-			     PARTICLE_SPARK         =  PARTICLE_SPARK_MASK,
-			     PARTICLE_SPRITE        =  PARTICLE_SPRITE_MASK,
-			     PARTICLE_MULTI_SPRITE  =  PARTICLE_SPRITE_MASK | PARTICLE_MULTI_MASK,
-			     PARTICLE_MODEL         =  PARTICLE_MODEL_MASK,
-			     PARTICLE_MULTI_MODE    =  PARTICLE_MODEL_MASK | PARTICLE_MULTI_MASK };
+typedef enum PARTICLE_TYPE
+{
+  PARTICLE_DOT           =  PARTICLE_DOT_MASK,
+  PARTICLE_SPARK         =  PARTICLE_SPARK_MASK,
+  PARTICLE_SPRITE        =  PARTICLE_SPRITE_MASK,
+  PARTICLE_MULTI_SPRITE  =  PARTICLE_SPRITE_MASK | PARTICLE_MULTI_MASK,
+  PARTICLE_MODEL         =  PARTICLE_MODEL_MASK,
+  PARTICLE_MULTI_MODE    =  PARTICLE_MODEL_MASK | PARTICLE_MULTI_MASK
+};
 
 #define PARTICLE_DEFAULT_MAX_COUNT    200               //!< A default count of particles in the system.
@@ -59,8 +62,8 @@
 //! A class to handle ParticleSystems
 class ParticleSystem : public WorldEntity, public PhysicsInterface {
-  
+
  public:
   ParticleSystem(unsigned int maxCount = PARTICLE_DEFAULT_MAX_COUNT,
-		 PARTICLE_TYPE type = PARTICLE_DEFAULT_TYPE);
+                 PARTICLE_TYPE type = PARTICLE_DEFAULT_TYPE);
   virtual ~ParticleSystem();
 
@@ -116,5 +119,5 @@
 
   GLuint*           glID;                //!< A List of different gl-List-ID's
-  GLuint            dialectCount;        //!< How many different types of particles are there in the Particle System  
+  GLuint            dialectCount;        //!< How many different types of particles are there in the Particle System
 
   // per particle attributes
Index: orxonox/trunk/src/lib/particles/quick_animation.cc
===================================================================
--- orxonox/trunk/src/lib/particles/quick_animation.cc	(revision 4596)
+++ orxonox/trunk/src/lib/particles/quick_animation.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -27,5 +27,4 @@
 using namespace std;
 
-
 /**
    \brief standard constructor
@@ -33,5 +32,5 @@
 QuickAnimation::QuickAnimation (void)
 {
-   this->setClassName("QuickAnimation");
+   this->setClassID(CL_QUICK_ANIMATION, "QuickAnimation");
 
    this->first = this->current = NULL;
@@ -47,5 +46,5 @@
   this->current = this->first;
   QuickKeyFrame delKF;
-  
+
   while (this->current != NULL)
     {
@@ -54,5 +53,4 @@
       this->current = this->first;
     }
-
 }
 
@@ -70,9 +68,9 @@
       // if it is between some keyframes
       if ((!this->current->next && this->current->position < position)
-	  || (this->current->position < position && this->current->next->position > position))
-	break;
+          || (this->current->position < position && this->current->next->position > position))
+        break;
       // if it is the same as an already existing keyframe
       else if (this->current->position == position)
-	return false;
+        return false;
       this->current = this->current->next;
     }
@@ -92,5 +90,5 @@
   newKey->value = value;
   newKey->position = position;
-  
+
   this->current = this->first;
 
@@ -110,9 +108,9 @@
     {
       if (this->current->position < position+region && this->current->position > position-region)
-	{
-	  this->current->value = value;
-	  return true;
-	}
-      this->current = this->current->next;  
+        {
+          this->current->value = value;
+          return true;
+        }
+      this->current = this->current->next;
     }
   this->current = this->first;
@@ -122,18 +120,18 @@
 /*
   \param position The position where to find the Node to kill
-  
+
   bool QuickAnimation::removeEntry(float position)
   {
   this->current = this->first;
-  QuickKeyFrame* last = 
-  
+  QuickKeyFrame* last =
+
   while (this->current)
   {
   if (this->current->position == position)
   {
-  
-  
+
+
   }
-  this->current = this->current->next;  
+  this->current = this->current->next;
   }
   this->current = this->first;
@@ -145,5 +143,5 @@
    \param position the position to get the value from :)
 */
-float QuickAnimation::getValue(float position) 
+float QuickAnimation::getValue(float position)
 {
   if (unlikely(this->first == NULL))
@@ -154,16 +152,16 @@
     {
       if (unlikely(position < this->current->position))
-	{
-	  if (position <= this->first->position)
-	    return this->first->value;
-	  this->current = this->first;
-	}
+        {
+          if (position <= this->first->position)
+            return this->first->value;
+          this->current = this->first;
+        }
       while (likely(this->current->next != NULL && position > this->current->next->position))
-	this->current = this->current->next;
+        this->current = this->current->next;
       if (this->current->next == NULL)
-	return this->current->value;
-	       
+        return this->current->value;
+
       return this->current->value + (this->current->next->value - this->current->value)
-	* ((position-this->current->position) / (this->current->next->position -this->current->position));
+        * ((position-this->current->position) / (this->current->next->position -this->current->position));
     }
 }
Index: orxonox/trunk/src/lib/particles/quick_animation.h
===================================================================
--- orxonox/trunk/src/lib/particles/quick_animation.h	(revision 4596)
+++ orxonox/trunk/src/lib/particles/quick_animation.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file quick_animation.h
     \brief Definition of the QuickAnimation-class
@@ -21,4 +21,5 @@
    this class is optimized for a raising value. eg. 100 particles sorted
    by age.
+  \todo speedUP this stuff (especially getValue)
 */
 class QuickAnimation : public BaseObject {
Index: orxonox/trunk/src/lib/physics/physics_connection.cc
===================================================================
--- orxonox/trunk/src/lib/physics/physics_connection.cc	(revision 4596)
+++ orxonox/trunk/src/lib/physics/physics_connection.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -31,4 +31,5 @@
 PhysicsConnection::PhysicsConnection(PhysicsInterface* subject, Field* field)
 {
+  this->setClassID(CL_PHYSICS_CONNECTION, "PhysicsConnection");
   this->type = PCON_PhysIField;
   this->subject = subject;
@@ -43,10 +44,10 @@
 
 */
-PhysicsConnection::~PhysicsConnection () 
+PhysicsConnection::~PhysicsConnection ()
 {
   PhysicsEngine::getInstance()->removeConnection(this);
 }
 
-/** 
+/**
     \brief applies the Force to some Object.
 */
Index: orxonox/trunk/src/lib/physics/physics_connection.h
===================================================================
--- orxonox/trunk/src/lib/physics/physics_connection.h	(revision 4596)
+++ orxonox/trunk/src/lib/physics/physics_connection.h	(revision 4597)
@@ -1,8 +1,8 @@
-/*! 
+/*!
     \file physics_connection.h
     \brief Definition of The Physical Connection Class.
 */
 
-#ifndef _PHYSICS_CONNECTION_H 
+#ifndef _PHYSICS_CONNECTION_H
 #define _PHYSICS_CONNECTION_H
 
@@ -14,6 +14,9 @@
 
 //! An enumerator for different ConnectionTypes
-typedef enum PCON_Type { PCON_PhysIPhysI = 0,
-			 PCON_PhysIField = 1};
+typedef enum PCON_Type
+{
+  PCON_PhysIPhysI = 1,
+  PCON_PhysIField = 2
+};
 
 
@@ -34,8 +37,8 @@
  private:
   PCON_Type type;                    //!< What kind of connection this is.
-  
+
   PhysicsInterface* subject;         //!< The main Subject of this Connection.
   PhysicsInterface* partner2;        //!< The second partner of this Connection.
-  
+
   Field* field;                      //!< The field to connect either subject of ParticleSystem to.
 };
Index: orxonox/trunk/src/lib/physics/physics_engine.cc
===================================================================
--- orxonox/trunk/src/lib/physics/physics_engine.cc	(revision 4596)
+++ orxonox/trunk/src/lib/physics/physics_engine.cc	(revision 4597)
@@ -30,9 +30,9 @@
 PhysicsEngine::PhysicsEngine()
 {
-   this->setClassName ("PhysicsEngine");
-
-   this->connections = new tList<PhysicsConnection>;
-   this->interfaces = new tList<PhysicsInterface>;
-   this->fields = new tList<Field>;
+  this->setClassID(CL_PHYSICS_ENGINE, "PhysicsEngine");
+  this->setName("PhysicsEngine");
+  this->connections = new tList<PhysicsConnection>;
+  this->interfaces = new tList<PhysicsInterface>;
+  this->fields = new tList<Field>;
 }
 
Index: orxonox/trunk/src/lib/physics/physics_interface.cc
===================================================================
--- orxonox/trunk/src/lib/physics/physics_interface.cc	(revision 4596)
+++ orxonox/trunk/src/lib/physics/physics_interface.cc	(revision 4597)
@@ -35,14 +35,14 @@
 /**
    \brief standard constructor
-*/
+ */
 PhysicsInterface::PhysicsInterface (void* objectPointer)
 {
+  this->setClassID(CL_PHYSICS_INTERFACE, "PhysicsInterface");
   this->objectPointer = objectPointer;
 
-  //   this->setClassName ("PhysicsInterface");
-   this->mass = 1;
-   this->massChildren = 0;
-   this->forceSum = Vector(0, 0, 0);
-   this->bForceApplied = false;
+  this->mass = 1;
+  this->massChildren = 0;
+  this->forceSum = Vector(0, 0, 0);
+  this->bForceApplied = false;
 
    PhysicsEngine::getInstance()->addPhysicsInterface(this);
Index: orxonox/trunk/src/lib/physics/physics_interface.h
===================================================================
--- orxonox/trunk/src/lib/physics/physics_interface.h	(revision 4596)
+++ orxonox/trunk/src/lib/physics/physics_interface.h	(revision 4597)
@@ -28,5 +28,4 @@
 class PhysicsInterface : virtual public BaseObject
 {
-
  public:
   PhysicsInterface(void* objectPointer);
Index: orxonox/trunk/src/lib/sound/sound_engine.cc
===================================================================
--- orxonox/trunk/src/lib/sound/sound_engine.cc	(revision 4596)
+++ orxonox/trunk/src/lib/sound/sound_engine.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -40,4 +40,7 @@
 SoundBuffer::SoundBuffer(const char* fileName)
 {
+  this->setClassID(CL_SOUND_BUFFER, "SoundBuffer");
+  this->setName(fileName);
+
   SoundEngine::getInstance()->addBuffer(this);
 
@@ -45,5 +48,5 @@
   ALvoid* data;
   ALsizei freq;
-  
+
   ALenum result;
 
@@ -57,5 +60,5 @@
   if ((result = alGetError()) != AL_NO_ERROR)
     SoundEngine::PrintALErrorString(result);
-  
+
   // send the loaded wav data to the buffer
   alBufferData(this->bufferID, format, data, this->size, freq);
@@ -83,4 +86,6 @@
 SoundSource::SoundSource(SoundBuffer* buffer, PNode* sourceNode)
 {
+  this->setClassID(CL_SOUND_SOURCE, "SoundSource");
+
   ALenum result;
 
@@ -161,8 +166,9 @@
    \brief standard constructor
 */
-SoundEngine::SoundEngine () 
-{
-  this->setClassName ("SoundEngine");
-  
+SoundEngine::SoundEngine ()
+{
+  this->setClassID(CL_SOUND_ENGINE, "SoundEngine");
+  this->setName("SoundEngine");
+
   this->listener = NULL;
   this->bufferList = new tList<SoundBuffer>;
@@ -179,5 +185,5 @@
 
 */
-SoundEngine::~SoundEngine () 
+SoundEngine::~SoundEngine ()
 {
   SoundEngine::singletonRef = NULL;
@@ -262,5 +268,5 @@
     {
       if (buffer == enumSource->getBuffer())
-	delete enumSource;
+        delete enumSource;
       enumSource = sourceIterator->nextElement();
     }
@@ -300,11 +306,11 @@
     {
       alListener3f(AL_POSITION,
-		   this->listener->getAbsCoor().x,
-		   this->listener->getAbsCoor().y,
-		   this->listener->getAbsCoor().z);
+                   this->listener->getAbsCoor().x,
+                   this->listener->getAbsCoor().y,
+                   this->listener->getAbsCoor().z);
       alListener3f(AL_VELOCITY,
-		   this->listener->getVelocity().x,
-		   this->listener->getVelocity().y,
-		   this->listener->getVelocity().z);
+                   this->listener->getVelocity().x,
+                   this->listener->getVelocity().y,
+                   this->listener->getVelocity().z);
       Vector absDirV = this->listener->getAbsDirV();
       ALfloat orientation [6] = {1,0,0, absDirV.x, absDirV.y, absDirV.z};
@@ -321,12 +327,12 @@
       if (likely(enumSource->getNode()!=NULL))
       {
-	alSource3f(enumSource->getID(), AL_POSITION,
-		   enumSource->getNode()->getAbsCoor().x,
-		   enumSource->getNode()->getAbsCoor().y,
-		   enumSource->getNode()->getAbsCoor().z);
-	alSource3f(enumSource->getID(), AL_VELOCITY,
-		   enumSource->getNode()->getVelocity().x,
-		   enumSource->getNode()->getVelocity().y,
-		   enumSource->getNode()->getVelocity().z);
+        alSource3f(enumSource->getID(), AL_POSITION,
+                   enumSource->getNode()->getAbsCoor().x,
+                   enumSource->getNode()->getAbsCoor().y,
+                   enumSource->getNode()->getAbsCoor().z);
+        alSource3f(enumSource->getID(), AL_VELOCITY,
+                   enumSource->getNode()->getVelocity().x,
+                   enumSource->getNode()->getVelocity().y,
+                   enumSource->getNode()->getVelocity().z);
       }
       enumSource = iterator->nextElement();
@@ -347,12 +353,12 @@
       SoundSource* enumSource = sourceIterator->nextElement();
       while (enumSource)
-	{
-	  if (enumBuffer == enumSource->getBuffer())
-	    break;
-	  enumSource = sourceIterator->nextElement();
-	}
+        {
+          if (enumBuffer == enumSource->getBuffer())
+            break;
+          enumSource = sourceIterator->nextElement();
+        }
       delete sourceIterator;
       if (enumSource == NULL)
-	ResourceManager::getInstance()->unload(enumBuffer);
+        ResourceManager::getInstance()->unload(enumBuffer);
       enumBuffer = bufferIterator->nextElement();
     }
@@ -402,5 +408,5 @@
       PRINTF(4)("AL_NO_ERROR\n");
       break;
-      
+
     case AL_INVALID_NAME:
       PRINTF(2)("AL_INVALID_NAME\n");
Index: orxonox/trunk/src/lib/sound/sound_engine.h
===================================================================
--- orxonox/trunk/src/lib/sound/sound_engine.h	(revision 4596)
+++ orxonox/trunk/src/lib/sound/sound_engine.h	(revision 4597)
@@ -1,5 +1,5 @@
-/*! 
+/*!
     \file sound_engine.h
-    \brief Definition of the SoundEngine singleton Class  
+    \brief Definition of the SoundEngine singleton Class
 */
 
@@ -20,5 +20,5 @@
 
 //! A class that represents a datastructure to play Sounds.
-class SoundBuffer
+class SoundBuffer : public BaseObject
 {
  public:
@@ -37,10 +37,10 @@
 
 //! A class that represents a SoundSource
-class SoundSource
+class SoundSource : virtual public BaseObject
 {
  public:
   SoundSource(SoundBuffer* buffer, PNode* sourceNode = NULL);
   ~SoundSource(void);
-  
+
   // user interaction
   void play();
@@ -48,10 +48,10 @@
   void pause();
   void rewind();
-  
+
   // development functions
   /** \returns The ID of this Source */
   inline ALuint getID(void) const { return this->sourceID; }
   /** \returns the SoundBuffer of this Source */
-  inline SoundBuffer* getBuffer(void) const { return this->buffer; } 
+  inline SoundBuffer* getBuffer(void) const { return this->buffer; }
   /** \returns the SourceNode of this Source */
   inline PNode* getNode(void) const { return this->sourceNode;}
Index: orxonox/trunk/src/lib/util/ini_parser.cc
===================================================================
--- orxonox/trunk/src/lib/util/ini_parser.cc	(revision 4596)
+++ orxonox/trunk/src/lib/util/ini_parser.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -28,4 +28,6 @@
 IniParser::IniParser (const char* filename)
 {
+  this->setClassID(CL_INI_PARSER, "IniParser");
+
   stream = NULL;
   bInSection = false;
@@ -50,5 +52,5 @@
   char* tmpName = ResourceManager::homeDirCheck(filename);
   if( filename == NULL) return -1;
-  if( stream != NULL)	fclose (stream);
+  if( stream != NULL)   fclose (stream);
   if( (stream = fopen (tmpName, "r")) == NULL)
     {
@@ -71,9 +73,9 @@
   bInSection = false;
   if( stream == NULL) return -1;
-  
+
   char linebuffer[PARSELINELENGHT];
   char secbuffer[PARSELINELENGHT];
   char* ptr;
-  
+
   rewind (stream);
   while( !feof( stream))
@@ -85,15 +87,15 @@
       // check for section identifyer
       if( sscanf (linebuffer, "[%s", secbuffer) == 1)
-	{
-	  if( (ptr = strchr( secbuffer, ']')) != NULL)
-	    {
-	      *ptr = 0;
-	      if( !strcmp( secbuffer, section))
-		{
-		  bInSection = true;
-		  return 0;
-		}
-	    }
-	}
+        {
+          if( (ptr = strchr( secbuffer, ']')) != NULL)
+            {
+              *ptr = 0;
+              if( !strcmp( secbuffer, section))
+                {
+                  bInSection = true;
+                  return 0;
+                }
+            }
+        }
     }
   return -1;
@@ -114,8 +116,8 @@
     }
   if( !bInSection) return -1;
-  
+
   char linebuffer[PARSELINELENGHT];
   char* ptr;
-  
+
   while( !feof( stream))
     {
@@ -125,22 +127,22 @@
       if( (ptr = strchr( linebuffer, '\n')) != NULL) *ptr = 0;
       if( linebuffer[0] == '[')
-	{
-	  bInSection = false;
-	  return -1;
-	}
+        {
+          bInSection = false;
+          return -1;
+        }
       sscanf(linebuffer, "%s = %s", name, value);
       return 0;
       /*
-	if( (ptr = strchr( tmpBuffer, '=')) != NULL)
-	{
-	if( ptr == linebuffer) continue;
-	strcpy (value, &ptr[1]);
-	strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1);
-	printf ("%s, %s\n", value, name);
-	return 0;
-	}
+        if( (ptr = strchr( tmpBuffer, '=')) != NULL)
+        {
+        if( ptr == linebuffer) continue;
+        strcpy (value, &ptr[1]);
+        strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1);
+        printf ("%s, %s\n", value, name);
+        return 0;
+        }
       */
     }
-  return -1;	
+  return -1;
 }
 
@@ -151,5 +153,5 @@
    \param defvalue: what should be returned in case the entry cannot be found
    \return a pointer to a buffer conatining the value of the specified entry. This buffer will contain the data specified in defvalue in case the entry wasn't found
-   
+
    The returned pointer points to an internal buffer, so do not free it on your own. Do not give a NULL pointer to defvalue, this will certainly
    lead to unwanted behaviour.
@@ -159,15 +161,15 @@
   strcpy (internbuf, defvalue);
   if( getSection (section) == -1) return internbuf;
-  
+
   char namebuf[PARSELINELENGHT];
   char valuebuf[PARSELINELENGHT];
-  
+
   while( nextVar (namebuf, valuebuf) != -1)
     {
       if( !strcmp (name, namebuf))
-	{
-	  strcpy (internbuf, valuebuf);
-	  return internbuf;
-	}
+        {
+          strcpy (internbuf, valuebuf);
+          return internbuf;
+        }
     }
   return internbuf;
Index: orxonox/trunk/src/lib/util/ini_parser.h
===================================================================
--- orxonox/trunk/src/lib/util/ini_parser.h	(revision 4596)
+++ orxonox/trunk/src/lib/util/ini_parser.h	(revision 4597)
@@ -2,5 +2,5 @@
     \file ini_parser.h
     \brief A small ini file parser
-    
+
     Can be used to find a defined [Section] in an ini file and get the VarName=Value entries
 */
@@ -12,4 +12,5 @@
 #include <string.h>
 #include <stdlib.h>
+#include "base_object.h"
 
 #define PARSELINELENGHT     512       //!< how many chars to read at once
@@ -17,11 +18,12 @@
 //! ini-file parser
 /**
-	This class can be used to load an initializer file and parse it's contents for variablename=value pairs.
+        This class can be used to load an initializer file and parse it's contents for variablename=value pairs.
 */
-class IniParser {
+class IniParser : public BaseObject
+{
  public:
   IniParser (const char* filename);
   ~IniParser ();
-  
+
   char* getVar(const char* name, char* section, char* defvalue);
   int openFile(const char* name);
@@ -33,5 +35,5 @@
   bool          bInSection;                   //!< if the requested parameter is in the section.
   char          internbuf[PARSELINELENGHT];   //!< a buffer
-	
+
 
 };
Index: orxonox/trunk/src/lib/util/substring.cc
===================================================================
--- orxonox/trunk/src/lib/util/substring.cc	(revision 4596)
+++ orxonox/trunk/src/lib/util/substring.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -11,5 +11,7 @@
    ### File Specific:
    main-programmer: Christian Meyer
-   co-programmer: ...
+   co-programmer: Benjamin Grauer
+
+   2005-06-10: some naming conventions
 */
 
@@ -28,18 +30,18 @@
 {
   n = 0;
-	
+
   assert( string != NULL);
-	
+
   for( int i = 0; i < strlen(string); i++) if( string[i] == ',') n++;
 
   n += 1;
-	
+
   strings = new char*[n];
 
   assert (strings != NULL);
-	
+
   int i = 0;
   int l = 0;
-	
+
   const char* offset = string;
   char* end = strchr( string, ',');
@@ -57,5 +59,5 @@
       end = strchr( offset, ',');
     }
-	
+
   strings[i] = new char[l + 1];
   l = strlen( offset);
@@ -73,5 +75,5 @@
       delete strings[i];
     }
-	
+
   delete strings;
 }
Index: orxonox/trunk/src/lib/util/substring.h
===================================================================
--- orxonox/trunk/src/lib/util/substring.h	(revision 4596)
+++ orxonox/trunk/src/lib/util/substring.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
   \file substring.h
   \brief a small class to get the parts of a string separated by commas
@@ -13,8 +13,8 @@
   SubString(const char* string);
   ~SubString();
-		
+
   int getCount();
   const char* getString( int i);
-		
+
  private:
   char**     strings;         //!< strings produced from a single string splitted in multiple strings
Index: orxonox/trunk/src/orxonox.cc
===================================================================
--- orxonox/trunk/src/orxonox.cc	(revision 4596)
+++ orxonox/trunk/src/orxonox.cc	(revision 4597)
@@ -56,4 +56,5 @@
 {
   this->setClassID(CL_ORXONOX, "Orxonox");
+  this->setName("orxonox");
 
   this->resourceManager = NULL;
Index: orxonox/trunk/src/story_entities/campaign.cc
===================================================================
--- orxonox/trunk/src/story_entities/campaign.cc	(revision 4596)
+++ orxonox/trunk/src/story_entities/campaign.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -13,5 +13,5 @@
    ### File Specific:
    main-programmer: Patrick Boenzli
-   co-programmer: 
+   co-programmer:
 */
 
@@ -32,24 +32,27 @@
 
 
-Campaign::Campaign () 
-{
+Campaign::Campaign ()
+{
+  this->setClassID(CL_CAMPAIGN, "Campaign");
   this->entities = new tList<StoryEntity>();
   this->isInit = false;
 }
 
-Campaign::Campaign ( TiXmlElement* root) 
-{
+Campaign::Campaign ( TiXmlElement* root)
+{
+  //! \todo loading with load_param....
+  this->setClassID(CL_CAMPAIGN, "Campaign");
   TiXmlElement* element;
   const char* string;
   int id;
-  
+
   PRINTF(3)("Loading Campaign...\n");
-  
+
   assert( root != NULL);
   GameLoader* loader = GameLoader::getInstance();
-  
+
   this->entities = new tList<StoryEntity>();
   this->isInit = false;
-  
+
   // grab all the necessary parameters
   string = grabParameter( root, "identifier");
@@ -60,5 +63,5 @@
     }
   else this->setStoryID( id);
-  
+
   // find WorldList
   element = root->FirstChildElement( "WorldList");
@@ -69,5 +72,5 @@
   else
     element = element->FirstChildElement();
-  
+
   // load Worlds/Subcampaigns/Whatever
   StoryEntity* lastCreated = NULL;
@@ -77,17 +80,17 @@
       StoryEntity* created = (StoryEntity*) loader->fabricate( element);
       /*
-      if( lastCreated != NULL) 
-	created->setNextStoryID( lastCreated->getStoryID());
+      if( lastCreated != NULL)
+        created->setNextStoryID( lastCreated->getStoryID());
       else
-	created->setNextStoryID( WORLD_ID_GAMEEND);
+        created->setNextStoryID( WORLD_ID_GAMEEND);
       */
       if( created != NULL)
-	{
-	  this->addEntity( created);	
-	  lastCreated = created;
-	}
+        {
+          this->addEntity( created);
+          lastCreated = created;
+        }
       element = element->NextSiblingElement();
     }
-  //if( lastCreated != NULL) 
+  //if( lastCreated != NULL)
   //lastCreated->setStoryID( WORLD_ID_GAMEEND);
 }
@@ -111,5 +114,5 @@
 {
   ErrorMessage errorCode;
-  if( !this->isInit) return errorCode; 
+  if( !this->isInit) return errorCode;
   if( storyID == WORLD_ID_GAMEEND) return errorCode;
   this->running = true;
@@ -126,5 +129,5 @@
       se->start();
       se->destroy();
-     
+
       delete se;
 
@@ -133,12 +136,12 @@
       se = this->getStoryEntity(nextWorldID);
       this->currentEntity = se;
-      if( ( nextWorldID == WORLD_ID_GAMEEND) ||( se == NULL) ) 
-	{
-	  PRINTF(0)("Quitting campaing story loop\n");
-	  if(se != NULL)
-	    delete se;
-	  return errorCode;
-	}
-      
+      if( ( nextWorldID == WORLD_ID_GAMEEND) ||( se == NULL) )
+        {
+          PRINTF(0)("Quitting campaing story loop\n");
+          if(se != NULL)
+            delete se;
+          return errorCode;
+        }
+
     }
 }
@@ -162,5 +165,5 @@
 {
   this->running = false;
-  if(this->currentEntity != NULL) 
+  if(this->currentEntity != NULL)
     {
       this->currentEntity->stop();
@@ -182,5 +185,5 @@
 
 
-/** 
+/**
     \brief adds an game stroy entity to the campaign
 
@@ -206,5 +209,5 @@
 {
   this->removeEntity(this->getStoryEntity(storyID));
-  
+
 }
 
@@ -251,7 +254,7 @@
   tList<StoryEntity>* l;
   StoryEntity* entity = NULL;
-  l = this->entities->getNext();  
-  while( l != NULL) 
-    { 
+  l = this->entities->getNext();
+  while( l != NULL)
+    {
       entity = l->getObject();
       l = l->getNext();
@@ -260,8 +263,8 @@
       //printf("Campaing::getStoryEntity() - now looping, found entity nr=%i\n", id);
       if(id == storyID)
-	{
-	  //printf("Campaing::getStoryEntity() - yea, this is what we where looking for: %id\n");
-	  return entity;
-	}
+        {
+          //printf("Campaing::getStoryEntity() - yea, this is what we where looking for: %id\n");
+          return entity;
+        }
 
     }
@@ -271,13 +274,13 @@
   tIterator<StoryEntity>* iterator = this->entities->getIterator();
   StoryEntity* entity = iterator->nextElement();
-  while( entity != NULL) 
-    { 
+  while( entity != NULL)
+    {
       int id = entity->getStoryID();
       //printf("Campaing::getStoryEntity() - now looping, found entity nr=%i\n", id);
       if(id == storyID)
-	{
-	  //printf("Campaing::getStoryEntity() - yea, this is what we where looking for: %id\n");
-	  return entity;
-	}
+        {
+          //printf("Campaing::getStoryEntity() - yea, this is what we where looking for: %id\n");
+          return entity;
+        }
       entity = iterator->nextElement();
     }
Index: orxonox/trunk/src/story_entities/campaign.h
===================================================================
--- orxonox/trunk/src/story_entities/campaign.h	(revision 4596)
+++ orxonox/trunk/src/story_entities/campaign.h	(revision 4597)
@@ -32,5 +32,5 @@
   void removeEntity(int storyID);
   void removeEntity(StoryEntity* se);
-  
+
   void nextLevel();
   void previousLevel();
Index: orxonox/trunk/src/story_entities/story_def.h
===================================================================
--- orxonox/trunk/src/story_entities/story_def.h	(revision 4596)
+++ orxonox/trunk/src/story_entities/story_def.h	(revision 4597)
@@ -20,5 +20,5 @@
 #define WORLD_ID_GAMEEND 999
 
-#define MAX_STORY_ENTITIES 99 //!> maximal StoryEntities in a Campaign
+#define MAX_STORY_ENTITIES 99 //!< maximal StoryEntities in a Campaign
 
 #endif /* _STORY_DEF_H */
Index: orxonox/trunk/src/story_entities/story_entity.cc
===================================================================
--- orxonox/trunk/src/story_entities/story_entity.cc	(revision 4596)
+++ orxonox/trunk/src/story_entities/story_entity.cc	(revision 4597)
@@ -26,5 +26,5 @@
 StoryEntity::StoryEntity ()
 {
-  this->setClassID(CL_STORY_ENTITY);
+  this->setClassID(CL_STORY_ENTITY, "StoryEntity");
 }
 StoryEntity::~StoryEntity () {}
Index: orxonox/trunk/src/story_entities/story_entity.h
===================================================================
--- orxonox/trunk/src/story_entities/story_entity.h	(revision 4596)
+++ orxonox/trunk/src/story_entities/story_entity.h	(revision 4597)
@@ -1,6 +1,6 @@
-/*! 
+/*!
     \file story_entity.h
     \brief holds the base class of everything that is playable - that is part of the story
-*/ 
+*/
 
 
Index: orxonox/trunk/src/story_entities/world.cc
===================================================================
--- orxonox/trunk/src/story_entities/world.cc	(revision 4596)
+++ orxonox/trunk/src/story_entities/world.cc	(revision 4597)
@@ -769,7 +769,5 @@
   //GLMenuImageScreen*
   this->glmis = new GLMenuImageScreen();
-  this->glmis->init();
   this->glmis->setMaximum(8);
-  //  this->glmis->draw();
 
   PRINTF(3)("World::displayLoadScreen - end\n");
Index: orxonox/trunk/src/util/animation/animation.cc
===================================================================
--- orxonox/trunk/src/util/animation/animation.cc	(revision 4596)
+++ orxonox/trunk/src/util/animation/animation.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -22,9 +22,11 @@
 /**
    \brief creates a new Animation
-   
+
    This also adds the Animation automatically to the AnimationPlayer's list
 */
 Animation::Animation(void)
-{  
+{
+  this->setClassID(CL_ANIMATION, "Animation");
+
   // initialize a beginning KeyFrame, that will be deleted afterwards
   this->keyFrameCount = 0;
@@ -43,5 +45,5 @@
 /**
    \brief destructs the Animation
-   
+
    this also takes the animation out of the AnimationPlayer's list (if it is there)
 */
@@ -54,5 +56,5 @@
    \brief tells the AnimationPlayer, that we do not wish to  handle this animation
    automatically.
-   
+
    This means that it will not be ticked, and not be deleted with the AnimationPlayer
 */
Index: orxonox/trunk/src/util/animation/animation.h
===================================================================
--- orxonox/trunk/src/util/animation/animation.h	(revision 4596)
+++ orxonox/trunk/src/util/animation/animation.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file animation.h
     A Subclass for all animations in orxonox
@@ -31,13 +31,17 @@
    deprecated QUADRATIC
 */
-typedef enum ANIM_FUNCTION {ANIM_CONSTANT,
-			    ANIM_LINEAR,
-			    ANIM_SINE,
-			    ANIM_COSINE,
-			    ANIM_EXP,
-			    ANIM_NEG_EXP,
-			    ANIM_QUADRATIC,
-			    ANIM_RANDOM,
-			    ANIM_NULL};
+typedef enum ANIM_FUNCTION
+{
+  ANIM_CONSTANT,
+  ANIM_LINEAR,
+  ANIM_SINE,
+  ANIM_COSINE,
+  ANIM_EXP,
+  ANIM_NEG_EXP,
+  ANIM_QUADRATIC,
+  ANIM_RANDOM,
+  ANIM_NULL
+};
+
 #define ANIM_DEFAULT_FUNCTION ANIM_LINEAR      //!< A default function to choose from the above set
 
@@ -49,12 +53,15 @@
    ANIM_INF_DELETE deletes the animation. !! THIS IS DANGEROUS !! only do this with non-class variables
 */
-typedef enum ANIM_INFINITY {ANIM_INF_CONSTANT,
-			    ANIM_INF_REPLAY,
-			    ANIM_INF_REWIND,
-			    ANIM_INF_DELETE};//, ANIM_INF_LINEAR, ANIM_INF_PINGPONG;
+typedef enum ANIM_INFINITY
+{
+  ANIM_INF_CONSTANT,
+  ANIM_INF_REPLAY,
+  ANIM_INF_REWIND,
+  ANIM_INF_DELETE
+}; //, ANIM_INF_LINEAR, ANIM_INF_PINGPONG};
 
 //! A Superclass for describing an animation (all animations will be derived from this one)
 /** implement in subclasses:
- * 
+ *
  * De-/Constructor
  * Animation Functions
@@ -65,5 +72,5 @@
  * virtual rewind, to go to the first Keyframe. (other functions will call this one)
 */
-class Animation
+class Animation : public BaseObject
 {
  public:
Index: orxonox/trunk/src/util/animation/animation3d.cc
===================================================================
--- orxonox/trunk/src/util/animation/animation3d.cc	(revision 4596)
+++ orxonox/trunk/src/util/animation/animation3d.cc	(revision 4597)
@@ -51,5 +51,5 @@
 /**
    \brief standard deconstructor
-   
+
    deletes all the Keyframes
 */
@@ -89,5 +89,5 @@
 */
 void Animation3D::addKeyFrame(Vector position, Quaternion direction, float duration,
-			      ANIM_FUNCTION animFuncMov, ANIM_FUNCTION animFuncRot)
+                              ANIM_FUNCTION animFuncMov, ANIM_FUNCTION animFuncRot)
 {
   // some small check
@@ -101,5 +101,5 @@
 
   KeyFrame3D* tmpKeyFrame;
-    
+
   // when adding the first frame
   if (this->keyFrameCount == 0)
@@ -114,5 +114,5 @@
       // when adding the second frame
       if (this->currentKeyFrame == this->nextKeyFrame)
-	this->nextKeyFrame = tmpKeyFrame;
+        this->nextKeyFrame = tmpKeyFrame;
       this->keyFrameList->add(tmpKeyFrame);
     }
@@ -136,25 +136,25 @@
 {
   if (this->bRunning)
-    { 
+    {
       this->localTime += dt;
       if (localTime >= this->currentKeyFrame->duration)
-	{
-	  if (likely(this->keyFramesToPlay != 0))
-	    {
-	      if (unlikely(this->keyFramesToPlay > 0))
-		--this->keyFramesToPlay;
-	      // switching to the next Key-Frame
-	      this->localTime -= this->currentKeyFrame->duration;
-	      this->currentKeyFrame = this->nextKeyFrame;
-	      // checking, if we should still Play the animation
-	      if (this->currentKeyFrame == this->keyFrameList->lastElement())
-		this->handleInfinity();
-	      this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame);
-	      this->setAnimFuncMov(this->currentKeyFrame->animFuncMov);
-	      this->setAnimFuncRot(this->currentKeyFrame->animFuncRot);
-	    }
-	  else
-	    this->pause();
-	}      
+        {
+          if (likely(this->keyFramesToPlay != 0))
+            {
+              if (unlikely(this->keyFramesToPlay > 0))
+                --this->keyFramesToPlay;
+              // switching to the next Key-Frame
+              this->localTime -= this->currentKeyFrame->duration;
+              this->currentKeyFrame = this->nextKeyFrame;
+              // checking, if we should still Play the animation
+              if (this->currentKeyFrame == this->keyFrameList->lastElement())
+                this->handleInfinity();
+              this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame);
+              this->setAnimFuncMov(this->currentKeyFrame->animFuncMov);
+              this->setAnimFuncRot(this->currentKeyFrame->animFuncRot);
+            }
+          else
+            this->pause();
+        }
       /* now animate it */
       (this->*animFuncMov)(this->localTime);
@@ -257,5 +257,5 @@
   else
     v = (this->nextKeyFrame->position - this->currentKeyFrame->position) * (2.0 + sin( M_PI * (- timePassed /this->currentKeyFrame->duration)) )/ 2.0;
-  
+
   this->object->shiftCoor(v - this->currentKeyFrame->lastPosition);
   this->currentKeyFrame->lastPosition = v;
@@ -279,6 +279,6 @@
   /*
   this->object->setRelCoor( this->nextKeyFrame->position -
-			    (this->nextKeyFrame->position - this->currentKeyFrame->position) *
-			    (1.0 + cos( M_PI * timePassed / this->currentKeyFrame->duration))/2.0);
+                            (this->nextKeyFrame->position - this->currentKeyFrame->position) *
+                            (1.0 + cos( M_PI * timePassed / this->currentKeyFrame->duration))/2.0);
   */
 }
@@ -309,6 +309,6 @@
   /*
   this->object->setRelCoor( this->currentKeyFrame->position +
-			    (this->nextKeyFrame->position - this->currentKeyFrame->position) * 
-			    (1.0 - expf(- timePassed * expFactorMov)) );
+                            (this->nextKeyFrame->position - this->currentKeyFrame->position) *
+                            (1.0 - expf(- timePassed * expFactorMov)) );
   */
 }
@@ -334,8 +334,8 @@
 {
   /*
-  this->object->setRelCoor(this->currentKeyFrame->position + 
-			   (this->nextKeyFrame->position - this->currentKeyFrame->position) * (float)rand()/(float)RAND_MAX);
+  this->object->setRelCoor(this->currentKeyFrame->position +
+                           (this->nextKeyFrame->position - this->currentKeyFrame->position) * (float)rand()/(float)RAND_MAX);
   this->object->setRelDir(this->currentKeyFrame->direction +
-			  (this->nextKeyFrame->direction - this->currentKeyFrame->direction)* (float)rand()/(float)RAND_MAX);
+                          (this->nextKeyFrame->direction - this->currentKeyFrame->direction)* (float)rand()/(float)RAND_MAX);
   */
 }
@@ -401,7 +401,7 @@
 void Animation3D::rLinear(float timePassed) const
 {
-  this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction, 
-				     this->currentKeyFrame->direction, 
-				     timePassed/this->currentKeyFrame->duration) );
+  this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction,
+                                     this->currentKeyFrame->direction,
+                                     timePassed/this->currentKeyFrame->duration) );
 }
 
@@ -420,7 +420,7 @@
     scale = 1.0 - sin( M_PI * timePassed / this->currentKeyFrame->duration);
 
-  this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction, 
-				     this->currentKeyFrame->direction, 
-				     scale) );
+  this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction,
+                                     this->currentKeyFrame->direction,
+                                     scale) );
 }
 
@@ -435,7 +435,7 @@
 {
   float scale = cos(M_PI * timePassed / this->currentKeyFrame->duration);
-  this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction, 
-				     this->currentKeyFrame->direction, 
-				     scale) );
+  this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction,
+                                     this->currentKeyFrame->direction,
+                                     scale) );
 }
 
@@ -458,7 +458,7 @@
 {
   float scale = (1.0 - expf(- timePassed * expFactorRot));
-  this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction, 
-				     this->currentKeyFrame->direction, 
-				     scale) );
+  this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction,
+                                     this->currentKeyFrame->direction,
+                                     scale) );
 }
 
Index: orxonox/trunk/src/util/animation/animation3d.h
===================================================================
--- orxonox/trunk/src/util/animation/animation3d.h	(revision 4596)
+++ orxonox/trunk/src/util/animation/animation3d.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file animation3d.h
 */
@@ -33,5 +33,5 @@
   Animation3D(PNode* object);
   virtual ~Animation3D(void);
-    
+
   virtual void rewind(void);
 
@@ -40,5 +40,5 @@
 
   virtual void tick(float dt);
- 
+
  private:
   // animation functions
Index: orxonox/trunk/src/util/animation/animation_player.cc
===================================================================
--- orxonox/trunk/src/util/animation/animation_player.cc	(revision 4596)
+++ orxonox/trunk/src/util/animation/animation_player.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -26,10 +26,11 @@
    \brief standard constructor
 */
-AnimationPlayer::AnimationPlayer () 
+AnimationPlayer::AnimationPlayer ()
 {
-   this->setClassID(CL_ANIMATION_PLAYER, "AnimationPlayer");
+  this->setClassID(CL_ANIMATION_PLAYER, "AnimationPlayer");
+  this->setName("AnimationPlayer");
 
-   this->animationList = new tList<Animation>();
-   this->play();
+  this->animationList = new tList<Animation>();
+  this->play();
 }
 
@@ -43,9 +44,9 @@
 
    !! DANGER !! when unloading the AnimationPlayer no other Function
-   should reference any Animations, from the animationList because it 
-   automatically deletes them. 
+   should reference any Animations, from the animationList because it
+   automatically deletes them.
    This usually happens when unloading a World.
 */
-AnimationPlayer::~AnimationPlayer () 
+AnimationPlayer::~AnimationPlayer ()
 {
   // deleting the Animation List AND all the elements of the List
@@ -61,5 +62,5 @@
 
    when adding a Animation the Animation will too be deleted when
-   the AnimationPlayer gets deleted. Consider not adding it, or 
+   the AnimationPlayer gets deleted. Consider not adding it, or
    unadding it with animation->notHandled();
 */
@@ -80,5 +81,5 @@
 /**
    \brief empties the list AND deletes all the Animations
-*/ 
+*/
 void AnimationPlayer::flush(void)
 {
@@ -99,5 +100,5 @@
 
 /**
-   \brief Ticks all the animations in animationList 
+   \brief Ticks all the animations in animationList
    \param timePassed the time passed since the last tick.
 */
@@ -110,13 +111,13 @@
       Animation* anim = animIt->nextElement();
       while( anim != NULL)
-	{
-	  anim->tick(timePassed);
-	  if(unlikely(anim->ifDelete()))
-	  {
-	    this->animationList->remove(anim);
-	    delete anim;
-	  }
-	  anim = animIt->nextElement();
-	}
+        {
+          anim->tick(timePassed);
+          if(unlikely(anim->ifDelete()))
+          {
+            this->animationList->remove(anim);
+            delete anim;
+          }
+          anim = animIt->nextElement();
+        }
       delete animIt;
     }
@@ -150,8 +151,8 @@
     {
       if(anim->getBaseObject() == baseObject)
-	{
-	  delete animIt;
-	  return anim;
-	}
+        {
+          delete animIt;
+          return anim;
+        }
       anim = animIt->nextElement();
     }
Index: orxonox/trunk/src/util/animation/animation_player.h
===================================================================
--- orxonox/trunk/src/util/animation/animation_player.h	(revision 4596)
+++ orxonox/trunk/src/util/animation/animation_player.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file animation_player.h
 */
@@ -15,5 +15,5 @@
    <b>AnimationPlayer usage:</b> \n
 
-   <b>Initialisation</b>: AnimationPlayer::getInstance() does the trick this is 
+   <b>Initialisation</b>: AnimationPlayer::getInstance() does the trick this is
    usually done when initializing a world \n
    <b>Adding Animations</b>: create an Animation the following Way:
@@ -21,5 +21,5 @@
    \li set some parameters: also see the specific classes for more info
    \n
-   if you do not want a specific Animation to be handled by the AnimationPlayer, you have to 
+   if you do not want a specific Animation to be handled by the AnimationPlayer, you have to
    unload it explicitely with animation->doNotHandle();
    \n
Index: orxonox/trunk/src/util/animation/t_animation.h
===================================================================
--- orxonox/trunk/src/util/animation/t_animation.h	(revision 4596)
+++ orxonox/trunk/src/util/animation/t_animation.h	(revision 4597)
@@ -14,5 +14,5 @@
 */
 
-/*! 
+/*!
     \file t_animation.h
 */
@@ -80,5 +80,5 @@
 */
 template<class T>
-tAnimation<T>::tAnimation (T* object, void (T::*funcToAnim)(float)) 
+tAnimation<T>::tAnimation (T* object, void (T::*funcToAnim)(float))
 {
   // create a new List
@@ -100,9 +100,9 @@
 /**
    \brief standard deconstructor
-   
+
    deletes all the Keyframes
 */
 template<class T>
-tAnimation<T>::~tAnimation () 
+tAnimation<T>::~tAnimation ()
 {
   // delete all the KeyFrames
@@ -158,5 +158,5 @@
 
   KeyFrameF* tmpKeyFrame;
-    
+
   // when adding the first frame
   if (this->keyFrameCount == 0)
@@ -170,5 +170,5 @@
       // when adding the second frame
       if (this->currentKeyFrame == this->nextKeyFrame)
-	this->nextKeyFrame = tmpKeyFrame;
+        this->nextKeyFrame = tmpKeyFrame;
       this->keyFrameList->add(tmpKeyFrame);
     }
@@ -191,25 +191,25 @@
       this->localTime += dt;
       if (localTime >= this->currentKeyFrame->duration)
-	{
-	  if (likely(this->keyFramesToPlay != 0))
-	    {
-	      if (unlikely(this->keyFramesToPlay > 0))
-		--this->keyFramesToPlay;
-	      // switching to the next Key-Frame
-	      this->localTime -= this->currentKeyFrame->duration;
-	      
-	      this->currentKeyFrame = this->nextKeyFrame;
-	      // checking, if we should still Play the animation
-	      if (this->currentKeyFrame == this->keyFrameList->lastElement())
-		this->handleInfinity();
-	      this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame);
-	      
-	      printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value);
-	      this->setAnimFunc(this->currentKeyFrame->animFunc);	  
-	    }
-	  else
-	    this->pause();
-	}
-      
+        {
+          if (likely(this->keyFramesToPlay != 0))
+            {
+              if (unlikely(this->keyFramesToPlay > 0))
+                --this->keyFramesToPlay;
+              // switching to the next Key-Frame
+              this->localTime -= this->currentKeyFrame->duration;
+
+              this->currentKeyFrame = this->nextKeyFrame;
+              // checking, if we should still Play the animation
+              if (this->currentKeyFrame == this->keyFrameList->lastElement())
+                this->handleInfinity();
+              this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame);
+
+              printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value);
+              this->setAnimFunc(this->currentKeyFrame->animFunc);
+            }
+          else
+            this->pause();
+        }
+
       (this->object->*(funcToAnim))((this->*animFunc)(this->localTime));
     }
@@ -243,7 +243,7 @@
     case ANIM_NEG_EXP:
       {
-	this->animFunc = &tAnimation<T>::negExp;
-	expFactor =  - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X);
-	break;
+        this->animFunc = &tAnimation<T>::negExp;
+        expFactor =  - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X);
+        break;
       }
     case ANIM_QUADRATIC:
@@ -273,5 +273,5 @@
 */
 template<class T>
-float tAnimation<T>::linear(float timePassed) const 
+float tAnimation<T>::linear(float timePassed) const
 {
   return this->currentKeyFrame->value + (this->nextKeyFrame->value - this->currentKeyFrame->value)
@@ -287,7 +287,7 @@
 {
   if (timePassed * 2.0 < this->currentKeyFrame->duration)
-    return this->currentKeyFrame->value + (this->nextKeyFrame->value - this->currentKeyFrame->value) 
+    return this->currentKeyFrame->value + (this->nextKeyFrame->value - this->currentKeyFrame->value)
       * sin( M_PI * timePassed / this->currentKeyFrame->duration)/2;
-  else 
+  else
     return this->nextKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)
       * sin( M_PI * (1.0 - timePassed / this->currentKeyFrame->duration))/2;
@@ -350,5 +350,5 @@
 float tAnimation<T>::random(float timePassed) const
 {
-  return this->currentKeyFrame->value + 
+  return this->currentKeyFrame->value +
     (this->nextKeyFrame->value - this->currentKeyFrame->value) *
     (float)rand()/(float)RAND_MAX;
Index: orxonox/trunk/src/util/garbage_collector.cc
===================================================================
--- orxonox/trunk/src/util/garbage_collector.cc	(revision 4596)
+++ orxonox/trunk/src/util/garbage_collector.cc	(revision 4597)
@@ -36,4 +36,6 @@
 {
    this->setClassID(CL_GARBAGE_COLLECTOR, "GarbageCollector");
+   this->setName("GarbageCollector");
+
    this->time = 0;
    this->delay = 1.5f; /* clean up all 5.0 seconds */
Index: orxonox/trunk/src/util/loading/factory.cc
===================================================================
--- orxonox/trunk/src/util/loading/factory.cc	(revision 4596)
+++ orxonox/trunk/src/util/loading/factory.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -21,5 +21,5 @@
 
 /*  --------------------------------------------------
- *		 Factory
+ *               Factory
  *   --------------------------------------------------
  */
@@ -27,13 +27,16 @@
 /**
    \brief constructor
-   
+
    set everything to zero and define factoryName
 */
 Factory::Factory (const char* factoryName)
 {
+  this->setClassID(CL_FACTORY, "Factory");
+  this->setName(factoryName);
+
   this->factoryName = NULL;
   this->setFactoryName(factoryName);
   next = NULL;
-  
+
   initialize();
 }
@@ -41,5 +44,5 @@
 /**
    \brief destructor
-   
+
    clear the Q
 */
Index: orxonox/trunk/src/util/loading/factory.h
===================================================================
--- orxonox/trunk/src/util/loading/factory.h	(revision 4596)
+++ orxonox/trunk/src/util/loading/factory.h	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -14,5 +14,5 @@
 */
 
-/*! 
+/*!
   \file factory.h
   \brief A loadable object handler
@@ -27,19 +27,21 @@
 #include "tinyxml.h"
 #include "load_param.h"
+#include "base_object.h"
 #include "debug.h"
 
-/** 
+/**
     Creates a factory to a Loadable Class.
     this should be used at the beginning of all the Classes that should be loadable (in the cc-file)
+  \todo make factoryName a BaseObject-parameter. (else it would be redundant)
 */
-#define CREATE_FACTORY(CLASS_NAME) tFactory<CLASS_NAME>* global_##CLASS_NAME##Factory = new tFactory<CLASS_NAME>(#CLASS_NAME)		
+#define CREATE_FACTORY(CLASS_NAME) tFactory<CLASS_NAME>* global_##CLASS_NAME##Factory = new tFactory<CLASS_NAME>(#CLASS_NAME)
 
 //! The Factory is a loadable object handler
-class Factory {
+class Factory : public BaseObject {
 
  public:
   Factory (const char* factoryName = NULL);
   ~Factory ();
-  
+
 
   virtual BaseObject* fabricate(const TiXmlElement* root);
@@ -53,5 +55,5 @@
   /** \returns the next factory */
   Factory* getNext(void) const { return this->next; };
-	
+
  protected:
   char*         factoryName;          //!< the name of the factory
@@ -69,5 +71,5 @@
   tFactory(const char* factoryName);
   virtual ~tFactory();
-  
+
   private:
   BaseObject* fabricate(const TiXmlElement* root);
@@ -83,5 +85,5 @@
   PRINTF(5)("fileName: %s loadable\n", this->factoryName);
 }
-  
+
 
 template<class T>
@@ -90,11 +92,11 @@
 
 template<class T>
-BaseObject* tFactory<T>::fabricate(const TiXmlElement* root) 
-{ 
+BaseObject* tFactory<T>::fabricate(const TiXmlElement* root)
+{
   if(!strcmp(root->Value(), getFactoryName()))
     return new T ( root);
-  else if( getNext() != NULL) 
+  else if( getNext() != NULL)
     return getNext()->fabricate( root);
-  else 
+  else
     return NULL;
 }
Index: orxonox/trunk/src/util/loading/game_loader.cc
===================================================================
--- orxonox/trunk/src/util/loading/game_loader.cc	(revision 4596)
+++ orxonox/trunk/src/util/loading/game_loader.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -39,6 +39,8 @@
    \brief simple constructor
 */
-GameLoader::GameLoader () 
-{
+GameLoader::GameLoader ()
+{
+  this->setClassID(CL_GAME_LOADER, "GameLoader");
+  this->setName("GameLoader");
   first = NULL;
 }
@@ -110,28 +112,28 @@
   switch(campaignID)
     {
-      /* 
-	 Debug Level 0: Debug level used to test the base frame work.
-	 As you can see, all storyentity data is allocated before game
-	 start. the storyentity will load themselfs shortly before start
-	 through the StoryEntity::init() funtion.
+      /*
+         Debug Level 0: Debug level used to test the base frame work.
+         As you can see, all storyentity data is allocated before game
+         start. the storyentity will load themselfs shortly before start
+         through the StoryEntity::init() funtion.
       */
     case DEBUG_CAMPAIGN_0:
       {
-	Campaign* debugCampaign = new Campaign();
-
-	World* world0 = new World(DEBUG_WORLD_0);
-	world0->setNextStoryID(WORLD_ID_1);
-	debugCampaign->addEntity(world0, WORLD_ID_0);
-
-	World* world1 = new World(DEBUG_WORLD_1);
-	world1->setNextStoryID(WORLD_ID_2);
-	debugCampaign->addEntity(world1, WORLD_ID_1);
-
-	World* world2 = new World(DEBUG_WORLD_2);
-	world2->setNextStoryID(WORLD_ID_GAMEEND);
-	debugCampaign->addEntity(world2, WORLD_ID_2);
-
-	this->currentCampaign = debugCampaign;
-	break;
+        Campaign* debugCampaign = new Campaign();
+
+        World* world0 = new World(DEBUG_WORLD_0);
+        world0->setNextStoryID(WORLD_ID_1);
+        debugCampaign->addEntity(world0, WORLD_ID_0);
+
+        World* world1 = new World(DEBUG_WORLD_1);
+        world1->setNextStoryID(WORLD_ID_2);
+        debugCampaign->addEntity(world1, WORLD_ID_1);
+
+        World* world2 = new World(DEBUG_WORLD_2);
+        world2->setNextStoryID(WORLD_ID_GAMEEND);
+        debugCampaign->addEntity(world2, WORLD_ID_2);
+
+        this->currentCampaign = debugCampaign;
+        break;
       }
     }
@@ -139,7 +141,7 @@
 
 
-/** 
+/**
     \brief starts the current entity
-    \returns error code if this action has caused a error    
+    \returns error code if this action has caused a error
 */
 ErrorMessage GameLoader::start()
@@ -150,5 +152,5 @@
 
 
-/** 
+/**
     \brief stops the current entity
     \returns error code if this action has caused a error
@@ -168,5 +170,5 @@
 
 
-/** 
+/**
     \brief pause the current entity
     \returns error code if this action has caused a error
@@ -182,5 +184,5 @@
 
 
-/** 
+/**
     \brief resumes a pause
     \returns error code if this action has caused a error
@@ -218,5 +220,5 @@
      can load everything it needs into memory then.
   */
-  
+
   if( fileName == NULL)
     {
@@ -224,5 +226,5 @@
       return NULL;
     }
-  
+
   TiXmlDocument* XMLDoc = new TiXmlDocument( fileName);
   // load the campaign document
@@ -234,9 +236,9 @@
       return NULL;
     }
-	
+
   // check basic validity
   TiXmlElement* root = XMLDoc->RootElement();
   assert( root != NULL);
-	
+
   if( strcmp( root->Value(), "Campaign"))
     {
@@ -246,8 +248,8 @@
       return NULL;
     }
-	
+
   // construct campaign
   Campaign* c = new Campaign( root);
-	
+
   // free the XML data
   delete XMLDoc;
@@ -258,5 +260,5 @@
 
 /**
-   \brief handle keyboard commands 
+   \brief handle keyboard commands
    \param event the event to handle
 */
@@ -265,25 +267,25 @@
   if( event.type == KeyMapper::PEV_NEXT_WORLD)
     {
-      if( likely(event.bPressed)) 
-	{
-	  this->nextLevel();
-	}
+      if( likely(event.bPressed))
+        {
+          this->nextLevel();
+        }
     }
   else if( event.type == KeyMapper::PEV_PREVIOUS_WORLD)
     {
       if( likely(event.bPressed))
-	{
-	  this->previousLevel();
-	}
+        {
+          this->previousLevel();
+        }
     }
   else if( event.type == KeyMapper::PEV_PAUSE)
     {
       if( likely(event.bPressed))
-	{
-	  if(this->isPaused)
-	    this->resume();
-	  else
-	    this->pause();
-	}
+        {
+          if(this->isPaused)
+            this->resume();
+          else
+            this->pause();
+        }
     }
   else if( event.type == KeyMapper::PEV_QUIT)
@@ -322,10 +324,10 @@
 void GameLoader::registerFactory( Factory* factory)
 {
-	assert( factory != NULL);
-	
-	PRINTF(4)("Registered factory for '%s'\n", factory->getFactoryName());
-	
-	if( first == NULL) first = factory;
-	else first->registerFactory( factory);
+        assert( factory != NULL);
+
+        PRINTF(4)("Registered factory for '%s'\n", factory->getFactoryName());
+
+        if( first == NULL) first = factory;
+        else first->registerFactory( factory);
 }
 
@@ -338,5 +340,5 @@
 {
   assert( element != NULL);
-	
+
   if( first == NULL)
     {
@@ -344,18 +346,18 @@
       return NULL;
     }
-	
+
   if( element->Value() != NULL)
     {
       PRINTF(4)("Attempting fabrication of a '%s'\n", element->Value());
       BaseObject* b = first->fabricate( element);
-      if( b == NULL) 
-	PRINTF(2)("Failed to fabricate a '%s'\n", element->Value());
-      else 
-	PRINTF(4)("Successfully fabricated a '%s'\n", element->Value());
+      if( b == NULL)
+        PRINTF(2)("Failed to fabricate a '%s'\n", element->Value());
+      else
+        PRINTF(4)("Successfully fabricated a '%s'\n", element->Value());
       return b;
     }
-	
+
   PRINTF(2)("Fabricate failed, TiXmlElement did not contain a value\n");
-	
+
   return NULL;
 }
Index: orxonox/trunk/src/util/loading/load_param.cc
===================================================================
--- orxonox/trunk/src/util/loading/load_param.cc	(revision 4596)
+++ orxonox/trunk/src/util/loading/load_param.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -30,6 +30,7 @@
 */
 BaseLoadParam::BaseLoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName,
-			     int paramCount, bool multi, ...)
-{
+                             int paramCount, bool multi, ...)
+{
+  this->setClassID(CL_LOAD_PARAM, "LoadParam");
   this->loadString = NULL;
 
@@ -39,14 +40,14 @@
     {
       if (likely(!multi))
-	this->loadString = grabParameter(root, paramName);
+        this->loadString = grabParameter(root, paramName);
       else
-	{
-	  if (!strcmp(root->Value(), paramName))
-	    {
-	      const TiXmlNode* val = root->FirstChild();
-	      if( val->ToText())
-		this->loadString = val->Value();
-	    }
-	}
+        {
+          if (!strcmp(root->Value(), paramName))
+            {
+              const TiXmlNode* val = root->FirstChild();
+              if( val->ToText())
+                this->loadString = val->Value();
+            }
+        }
     }
 
@@ -64,9 +65,9 @@
       va_start (types, multi);
       for(int i = 0; i < paramCount; i++)
-	{
-	  const char* tmpTypeName = va_arg (types, const char*);
-	  this->paramDesc->types[i] = new char[strlen(tmpTypeName)+1];
-	  strcpy(this->paramDesc->types[i], tmpTypeName);
-	}
+        {
+          const char* tmpTypeName = va_arg (types, const char*);
+          this->paramDesc->types[i] = new char[strlen(tmpTypeName)+1];
+          strcpy(this->paramDesc->types[i], tmpTypeName);
+        }
       va_end(types);
 
@@ -131,5 +132,5 @@
     {
       if (i > 0)
-	PRINT(3)(",");
+        PRINT(3)(",");
       PRINT(3)("%s", this->types[i]);
     }
@@ -194,8 +195,8 @@
     {
       if (!strcmp(enumClassDesc->className, className))
-	{
-	  delete iterator;
-	  return enumClassDesc;
-	}
+        {
+          delete iterator;
+          return enumClassDesc;
+        }
       enumClassDesc = iterator->nextElement();
     }
@@ -216,8 +217,8 @@
     {
       if (!strcmp(enumParamDesc->paramName, paramName))
-	{
-	  delete iterator;
-	  return enumParamDesc;
-	}
+        {
+          delete iterator;
+          return enumParamDesc;
+        }
       enumParamDesc = iterator->nextElement();
     }
@@ -243,8 +244,8 @@
       LoadParamDescription* enumParamDesc = paramIT->nextElement();
       while (enumParamDesc)
-	{
-	  enumParamDesc->print();
-	  enumParamDesc = paramIT->nextElement();
-	}
+        {
+          enumParamDesc->print();
+          enumParamDesc = paramIT->nextElement();
+        }
       delete paramIT;
 
@@ -267,12 +268,12 @@
   const TiXmlElement* element;
   const TiXmlNode* node;
-	
+
   if (root == NULL)
     return NULL;
   assert( parameterName != NULL);
-	
+
   element = root->FirstChildElement( parameterName);
   if( element == NULL) return NULL;
-	
+
   node = element->FirstChild();
   while( node != NULL)
Index: orxonox/trunk/src/util/loading/load_param.h
===================================================================
--- orxonox/trunk/src/util/loading/load_param.h	(revision 4596)
+++ orxonox/trunk/src/util/loading/load_param.h	(revision 4597)
@@ -22,4 +22,5 @@
 #define _LOAD_PARAM_H
 
+#include "base_object.h"
 #include "factory.h"
 #include "debug.h"
@@ -228,5 +229,5 @@
 
 //! abstract Base class for a Loadable parameter
-class BaseLoadParam
+class BaseLoadParam : public BaseObject
 {
  public:
Index: orxonox/trunk/src/util/object_manager.cc
===================================================================
--- orxonox/trunk/src/util/object_manager.cc	(revision 4596)
+++ orxonox/trunk/src/util/object_manager.cc	(revision 4597)
@@ -29,4 +29,5 @@
 {
   this->setClassID(CL_OBJECT_MANAGER, "ObjectManager");
+  this->setName("ObjectManager");
 
   this->managedObjectList = new tList<BaseObject>*[CL_NUMBER];
Index: orxonox/trunk/src/util/resource_manager.cc
===================================================================
--- orxonox/trunk/src/util/resource_manager.cc	(revision 4596)
+++ orxonox/trunk/src/util/resource_manager.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -47,11 +47,13 @@
    \brief standard constructor
 */
-ResourceManager::ResourceManager () 
-{
-   this->setClassID(CL_RESOURCE_MANAGER, "ResourceManager");
-   this->dataDir = NULL;
-   this->setDataDir("./");
-   this->imageDirs = new tList<char>();
-   this->resourceList = new tList<Resource>();
+ResourceManager::ResourceManager ()
+{
+  this->setClassID(CL_RESOURCE_MANAGER, "ResourceManager");
+  this->setName("ResourceManager");
+
+  this->dataDir = NULL;
+  this->setDataDir("./");
+  this->imageDirs = new tList<char>();
+  this->resourceList = new tList<Resource>();
 }
 
@@ -62,5 +64,5 @@
    \brief standard destructor
 */
-ResourceManager::~ResourceManager (void) 
+ResourceManager::~ResourceManager (void)
 {
   // deleting the Resources-List
@@ -106,5 +108,5 @@
 
 /**
-   \brief checks for the DataDirectory, by looking if 
+   \brief checks for the DataDirectory, by looking if
    \param fileInside is inisde??
 */
@@ -117,5 +119,5 @@
       return false;
     }
-  
+
   char* testFile = new char[strlen(this->dataDir)+strlen(fileInside)+1];
   sprintf(testFile, "%s%s", this->dataDir, fileInside);
@@ -141,13 +143,13 @@
       char* tmpDir = tmpImageDirs->nextElement();
       while(tmpDir)
-	{
-	  if (!strcmp(tmpDir, imageDir))
-	    {
-	      PRINTF(4)("Path %s already loaded\n", imageDir);
-	      delete tmpImageDirs;
-	      return true;
-	    }
-	  tmpDir = tmpImageDirs->nextElement();
-	}
+        {
+          if (!strcmp(tmpDir, imageDir))
+            {
+              PRINTF(4)("Path %s already loaded\n", imageDir);
+              delete tmpImageDirs;
+              return true;
+            }
+          tmpDir = tmpImageDirs->nextElement();
+        }
       delete tmpImageDirs;
 
@@ -185,5 +187,5 @@
   else if (!strcmp(fileName, "cube") ||
            !strcmp(fileName, "sphere") ||
-	   !strcmp(fileName, "plane") ||
+           !strcmp(fileName, "plane") ||
            !strcmp(fileName, "cylinder") ||
            !strcmp(fileName, "cone"))
@@ -203,5 +205,5 @@
 #endif /* NO_TEXT */
 #ifndef NO_TEXTURES
-  else 
+  else
     tmpType = IMAGE;
 #endif /* NO_TEXTURES */
@@ -221,5 +223,5 @@
 */
 void* ResourceManager::load(const char* fileName, ResourceType type, ResourcePriority prio,
-			    void* param1, void* param2, void* param3)
+                            void* param1, void* param2, void* param3)
 {
   // searching if the resource was loaded before.
@@ -230,5 +232,5 @@
       tmpResource->count++;
       if(tmpResource->prio < prio)
-	tmpResource->prio = prio;
+        tmpResource->prio = prio;
     }
   else
@@ -248,131 +250,131 @@
       // Checking for the type of resource \see ResourceType
       switch(type)
-	{
+        {
 #ifndef NO_MODEL
-	case OBJ:
-	  if (param1)
-	    tmpResource->modelSize = *(float*)param1;
-	  else
-	    tmpResource->modelSize = 1.0;
-
-	  if(ResourceManager::isFile(fullName))
-	    tmpResource->pointer = new OBJModel(fullName, tmpResource->modelSize);
-	  else
-	    {
-	      PRINTF(2)("Sorry, %s does not exist. Loading a cube-Model instead\n", fullName);
-	      tmpResource->pointer = ResourceManager::load("cube", PRIM, prio, &tmpResource->modelSize);
-	    }
-	  break;
-	case PRIM:
-	  if (param1)
-	    tmpResource->modelSize = *(float*)param1;
-	  else
-	    tmpResource->modelSize = 1.0;
-
-	  if (!strcmp(tmpResource->name, "cube"))
-	    tmpResource->pointer = new PrimitiveModel(PRIM_CUBE, tmpResource->modelSize);
-	  else if (!strcmp(tmpResource->name, "sphere"))
-	    tmpResource->pointer = new PrimitiveModel(PRIM_SPHERE, tmpResource->modelSize);
-	  else if (!strcmp(tmpResource->name, "plane"))
-	    tmpResource->pointer = new PrimitiveModel(PRIM_PLANE, tmpResource->modelSize);
-	  else if (!strcmp(tmpResource->name, "cylinder"))
-	    tmpResource->pointer = new PrimitiveModel(PRIM_CYLINDER, tmpResource->modelSize);
-	  else if (!strcmp(tmpResource->name, "cone"))
-	    tmpResource->pointer = new PrimitiveModel(PRIM_CONE, tmpResource->modelSize);
-	  break;
-	case MD2:
-	  if(ResourceManager::isFile(fullName))
-	    {
-	      if (param1)
-		{
-		  tmpResource->skinFileName = new char[strlen((const char*)param1)+1];
-		  strcpy(tmpResource->skinFileName, (const char*) param1);
-		}
-	      else
-		tmpResource->skinFileName = NULL;
-	      tmpResource->pointer = new MD2Data(fullName, tmpResource->skinFileName);
-	    }
-	      break;
+        case OBJ:
+          if (param1)
+            tmpResource->modelSize = *(float*)param1;
+          else
+            tmpResource->modelSize = 1.0;
+
+          if(ResourceManager::isFile(fullName))
+            tmpResource->pointer = new OBJModel(fullName, tmpResource->modelSize);
+          else
+            {
+              PRINTF(2)("Sorry, %s does not exist. Loading a cube-Model instead\n", fullName);
+              tmpResource->pointer = ResourceManager::load("cube", PRIM, prio, &tmpResource->modelSize);
+            }
+          break;
+        case PRIM:
+          if (param1)
+            tmpResource->modelSize = *(float*)param1;
+          else
+            tmpResource->modelSize = 1.0;
+
+          if (!strcmp(tmpResource->name, "cube"))
+            tmpResource->pointer = new PrimitiveModel(PRIM_CUBE, tmpResource->modelSize);
+          else if (!strcmp(tmpResource->name, "sphere"))
+            tmpResource->pointer = new PrimitiveModel(PRIM_SPHERE, tmpResource->modelSize);
+          else if (!strcmp(tmpResource->name, "plane"))
+            tmpResource->pointer = new PrimitiveModel(PRIM_PLANE, tmpResource->modelSize);
+          else if (!strcmp(tmpResource->name, "cylinder"))
+            tmpResource->pointer = new PrimitiveModel(PRIM_CYLINDER, tmpResource->modelSize);
+          else if (!strcmp(tmpResource->name, "cone"))
+            tmpResource->pointer = new PrimitiveModel(PRIM_CONE, tmpResource->modelSize);
+          break;
+        case MD2:
+          if(ResourceManager::isFile(fullName))
+            {
+              if (param1)
+                {
+                  tmpResource->skinFileName = new char[strlen((const char*)param1)+1];
+                  strcpy(tmpResource->skinFileName, (const char*) param1);
+                }
+              else
+                tmpResource->skinFileName = NULL;
+              tmpResource->pointer = new MD2Data(fullName, tmpResource->skinFileName);
+            }
+              break;
 #endif /* NO_MODEL */
 #ifndef NO_TEXT
-	case TTF:
-	    if (param1)
-	      tmpResource->ttfSize = *(int*)param1;
-	    else
-	      tmpResource->ttfSize = FONT_DEFAULT_SIZE;
-	    if (param2)
-	      {
-		Vector* tmpVec = (Vector*)param2;
-		tmpResource->ttfColorR = (int)tmpVec->x;
-		tmpResource->ttfColorG = (int)tmpVec->y;
-		tmpResource->ttfColorB = (int)tmpVec->z;
-	      }
-	    else
-	      {
-		tmpResource->ttfColorR = FONT_DEFAULT_COLOR_R;
-		tmpResource->ttfColorG = FONT_DEFAULT_COLOR_G;
-		tmpResource->ttfColorB = FONT_DEFAULT_COLOR_B;
-	      }
-	    
-	  if(isFile(fullName))
-	    tmpResource->pointer = new Font(fullName,
-					    tmpResource->ttfSize,
-					    tmpResource->ttfColorR,
-					    tmpResource->ttfColorG,
-					    tmpResource->ttfColorB);
-	  else
-	    PRINTF(2)("Sorry, %s does not exist. Not loading Font\n", fullName);
-	  break;
+        case TTF:
+            if (param1)
+              tmpResource->ttfSize = *(int*)param1;
+            else
+              tmpResource->ttfSize = FONT_DEFAULT_SIZE;
+            if (param2)
+              {
+                Vector* tmpVec = (Vector*)param2;
+                tmpResource->ttfColorR = (int)tmpVec->x;
+                tmpResource->ttfColorG = (int)tmpVec->y;
+                tmpResource->ttfColorB = (int)tmpVec->z;
+              }
+            else
+              {
+                tmpResource->ttfColorR = FONT_DEFAULT_COLOR_R;
+                tmpResource->ttfColorG = FONT_DEFAULT_COLOR_G;
+                tmpResource->ttfColorB = FONT_DEFAULT_COLOR_B;
+              }
+
+          if(isFile(fullName))
+            tmpResource->pointer = new Font(fullName,
+                                            tmpResource->ttfSize,
+                                            tmpResource->ttfColorR,
+                                            tmpResource->ttfColorG,
+                                            tmpResource->ttfColorB);
+          else
+            PRINTF(2)("Sorry, %s does not exist. Not loading Font\n", fullName);
+          break;
 #endif /* NO_TEXT */
 #ifndef NO_AUDIO
-	case WAV:
-	  if(isFile(fullName))
-	    tmpResource->pointer = new SoundBuffer(fullName);
-	  break;
+        case WAV:
+          if(isFile(fullName))
+            tmpResource->pointer = new SoundBuffer(fullName);
+          break;
 #endif /* NO_AUDIO */
 #ifndef NO_TEXTURES
-	case IMAGE:
-	  if(isFile(fullName))
-	    {
-	      PRINTF(4)("Image %s resides to %s\n", fileName, fullName);
-	      tmpResource->pointer = new Texture(fullName);
-	    }
-	  else
-	    {
-	      tIterator<char>* iterator = imageDirs->getIterator();
-	      tmpDir = iterator->nextElement();
-	      //tmpDir = imageDirs->enumerate();
-	      while(tmpDir)
-		{
-		  char* imgName = new char[strlen(tmpDir)+strlen(fileName)+1];
-		  sprintf(imgName, "%s%s", tmpDir, fileName);
-		  if(isFile(imgName))
-		    {
-		      PRINTF(4)("Image %s resides to %s\n", fileName, imgName);
-		      tmpResource->pointer = new Texture(imgName);
-		      delete []imgName;
-		      break;
-		    }
-		  delete []imgName;
-		  tmpDir = iterator->nextElement();
-		}
-	      delete iterator;
-	    }
-	  if(!tmpResource)
-	     PRINTF(2)("!!Image %s not Found!!\n", fileName);
-	  break;
+        case IMAGE:
+          if(isFile(fullName))
+            {
+              PRINTF(4)("Image %s resides to %s\n", fileName, fullName);
+              tmpResource->pointer = new Texture(fullName);
+            }
+          else
+            {
+              tIterator<char>* iterator = imageDirs->getIterator();
+              tmpDir = iterator->nextElement();
+              //tmpDir = imageDirs->enumerate();
+              while(tmpDir)
+                {
+                  char* imgName = new char[strlen(tmpDir)+strlen(fileName)+1];
+                  sprintf(imgName, "%s%s", tmpDir, fileName);
+                  if(isFile(imgName))
+                    {
+                      PRINTF(4)("Image %s resides to %s\n", fileName, imgName);
+                      tmpResource->pointer = new Texture(imgName);
+                      delete []imgName;
+                      break;
+                    }
+                  delete []imgName;
+                  tmpDir = iterator->nextElement();
+                }
+              delete iterator;
+            }
+          if(!tmpResource)
+             PRINTF(2)("!!Image %s not Found!!\n", fileName);
+          break;
 #endif /* NO_TEXTURES */
-	default:
-	  tmpResource->pointer = NULL;
-	  PRINTF(1)("No type found for %s.\n   !!This should not happen unless the Type is not supported yet.!!\n", tmpResource->name);
-	  break;
-	}
+        default:
+          tmpResource->pointer = NULL;
+          PRINTF(1)("No type found for %s.\n   !!This should not happen unless the Type is not supported yet.!!\n", tmpResource->name);
+          break;
+        }
       if (tmpResource->pointer)
-	this->resourceList->add(tmpResource);
+        this->resourceList->add(tmpResource);
       delete []fullName;
     }
   if (tmpResource->pointer)
     return tmpResource->pointer;
-  else 
+  else
     {
       PRINTF(2)("Resource %s could not be loaded\n", fileName);
@@ -413,44 +415,44 @@
     {
       if (resource->count <= 0)
-	{
-	  // deleting the Resource
-	  switch(resource->type)
-	    {
+        {
+          // deleting the Resource
+          switch(resource->type)
+            {
 #ifndef NO_MODEL
-	    case OBJ:
-	    case PRIM:
-	      delete (Model*)resource->pointer;
-	      break;
-	    case MD2:
-	      delete (MD2Data*)resource->pointer;
-	      break;
+            case OBJ:
+            case PRIM:
+              delete (Model*)resource->pointer;
+              break;
+            case MD2:
+              delete (MD2Data*)resource->pointer;
+              break;
 #endif /* NO_MODEL */
 #ifndef NO_AUDIO
-	    case WAV:
-	      delete (SoundBuffer*)resource->pointer;
-	      break;
+            case WAV:
+              delete (SoundBuffer*)resource->pointer;
+              break;
 #endif /* NO_AUDIO */
 #ifndef NO_TEXT
-	    case TTF:
-	      delete (Font*)resource->pointer;
-	      break;
+            case TTF:
+              delete (Font*)resource->pointer;
+              break;
 #endif /* NO_TEXT */
 #ifndef NO_TEXTURES
-	    case IMAGE:
-	      delete (Texture*)resource->pointer;
-	      break;
+            case IMAGE:
+              delete (Texture*)resource->pointer;
+              break;
 #endif /* NO_TEXTURES */
-	    default:
-	      PRINTF(1)("NOT YET IMPLEMENTED !!FIX FIX!!\n");
-	      return false;
-	      break;
-	    }
-	  // deleting the List Entry:
-	  PRINTF(4)("Resource %s safely removed.\n", resource->name);
-	  delete []resource->name;
-	  this->resourceList->remove(resource);
-	}
+            default:
+              PRINTF(1)("NOT YET IMPLEMENTED !!FIX FIX!!\n");
+              return false;
+              break;
+            }
+          // deleting the List Entry:
+          PRINTF(4)("Resource %s safely removed.\n", resource->name);
+          delete []resource->name;
+          this->resourceList->remove(resource);
+        }
       else
-	PRINTF(4)("Resource %s not removed, because there are still %d References to it.\n", resource->name, resource->count);
+        PRINTF(4)("Resource %s not removed, because there are still %d References to it.\n", resource->name, resource->count);
     }
   else
@@ -471,9 +473,9 @@
     {
       if (enumRes->prio <= prio)
-	if (enumRes->count == 0)
-	  unload(enumRes, prio);
-	else
-	  PRINTF(2)("unable to unload %s because there are still %d references to it\n",
-		   enumRes->name, enumRes->count);
+        if (enumRes->count == 0)
+          unload(enumRes, prio);
+        else
+          PRINTF(2)("unable to unload %s because there are still %d references to it\n",
+                   enumRes->name, enumRes->count);
       //enumRes = resourceList->nextElement();
       enumRes = iterator->nextElement();
@@ -492,5 +494,5 @@
 */
 Resource* ResourceManager::locateResourceByInfo(const char* fileName, ResourceType type,
-						void* param1, void* param2, void* param3)
+                                                void* param1, void* param2, void* param3)
 {
   //  Resource* enumRes = resourceList->enumerate();
@@ -500,67 +502,67 @@
     {
       if (enumRes->type == type && !strcmp(fileName, enumRes->name))
-	{
-	  bool match = false;
-	  bool subMatch = false;
-
-	  switch (type)
-	    {
+        {
+          bool match = false;
+          bool subMatch = false;
+
+          switch (type)
+            {
 #ifndef NO_MODEL
-	    case PRIM:
-	    case OBJ:
-	      if (!param1)
-		{
-		  if (enumRes->modelSize == 1.0)
-		    match = true;
-		}
-	      else if (enumRes->modelSize == *(float*)param1)
-		match = true;
-	      break;
-	    case MD2:
-	      if (!param1)
-		{
-		  if (enumRes->skinFileName == NULL)
-		    match = true;
-		}
-	      else if (!strcmp(enumRes->skinFileName, (const char*) param1))
-		match = true;
-	      break;
+            case PRIM:
+            case OBJ:
+              if (!param1)
+                {
+                  if (enumRes->modelSize == 1.0)
+                    match = true;
+                }
+              else if (enumRes->modelSize == *(float*)param1)
+                match = true;
+              break;
+            case MD2:
+              if (!param1)
+                {
+                  if (enumRes->skinFileName == NULL)
+                    match = true;
+                }
+              else if (!strcmp(enumRes->skinFileName, (const char*) param1))
+                match = true;
+              break;
 #endif /* NO_MODEL */
 #ifndef NO_TEXT
-	    case TTF:
-	      if (!param1)
-		{
-		  if (enumRes->ttfSize == FONT_DEFAULT_SIZE)
-		    subMatch = true;
-		}
-	      else if (enumRes->modelSize =- *(int*)param1)
-		subMatch = true;
-	      if(subMatch)
-		{
-		  Vector* tmpVec = (Vector*)param2;
-		  if (!param2)
-		    {
-		      if(enumRes->ttfColorR == FONT_DEFAULT_COLOR_R &&
-			 enumRes->ttfColorG == FONT_DEFAULT_COLOR_G &&
-			 enumRes->ttfColorB == FONT_DEFAULT_COLOR_B )
-			match = true;
-		    }
-		  else if (enumRes->ttfColorR == (int)tmpVec->x &&
-			   enumRes->ttfColorG == (int)tmpVec->y &&
-			   enumRes->ttfColorB == (int)tmpVec->z )
-		    match = true;
-		}
-	      break;
+            case TTF:
+              if (!param1)
+                {
+                  if (enumRes->ttfSize == FONT_DEFAULT_SIZE)
+                    subMatch = true;
+                }
+              else if (enumRes->modelSize =- *(int*)param1)
+                subMatch = true;
+              if(subMatch)
+                {
+                  Vector* tmpVec = (Vector*)param2;
+                  if (!param2)
+                    {
+                      if(enumRes->ttfColorR == FONT_DEFAULT_COLOR_R &&
+                         enumRes->ttfColorG == FONT_DEFAULT_COLOR_G &&
+                         enumRes->ttfColorB == FONT_DEFAULT_COLOR_B )
+                        match = true;
+                    }
+                  else if (enumRes->ttfColorR == (int)tmpVec->x &&
+                           enumRes->ttfColorG == (int)tmpVec->y &&
+                           enumRes->ttfColorB == (int)tmpVec->z )
+                    match = true;
+                }
+              break;
 #endif /* NO_TEXT */
-	    default:
-	      match = true;
-	      break;
-	    }
-	  if (match)
-	    {
-	      delete iterator;
-	      return enumRes;
-	    }
-	}
+            default:
+              match = true;
+              break;
+            }
+          if (match)
+            {
+              delete iterator;
+              return enumRes;
+            }
+        }
       enumRes = iterator->nextElement();
     }
@@ -582,8 +584,8 @@
     {
       if (pointer == enumRes->pointer)
-	{
-	  delete iterator;
-	  return enumRes;
-	}
+        {
+          delete iterator;
+          return enumRes;
+        }
       enumRes = iterator->nextElement();
     }
@@ -622,16 +624,16 @@
       if (status.st_mode & (S_IFDIR
 #ifndef __WIN32__
-			    | S_IFLNK
+                            | S_IFLNK
 #endif
-			    ))
-	{
-	  delete tmpDirName;
-	  return true;
-	}
+                            ))
+        {
+          delete tmpDirName;
+          return true;
+        }
       else
-	{
-	  delete tmpDirName;
-	  return false;
-	}
+        {
+          delete tmpDirName;
+          return false;
+        }
     }
   else
@@ -653,20 +655,20 @@
   if (!stat(tmpFileName, &status))
     {
-      if (status.st_mode & (S_IFREG 
+      if (status.st_mode & (S_IFREG
 #ifndef __WIN32__
-			    | S_IFLNK
+                            | S_IFLNK
 #endif
-			    ))
-	{
-	  delete tmpFileName;
-	  return true;
-	}
+                            ))
+        {
+          delete tmpFileName;
+          return true;
+        }
       else
-	{
-	  delete tmpFileName;
-	  return false;
-	}
-    }
-  else 
+        {
+          delete tmpFileName;
+          return false;
+        }
+    }
+  else
     {
       delete tmpFileName;
@@ -691,6 +693,6 @@
     }
   fclose(stream);
-    
-  delete tmpName; 
+
+  delete tmpName;
 }
 
@@ -708,5 +710,5 @@
 }
 
-/** 
+/**
     \param name the Name of the file to check
     \returns The name of the file, including the HomeDir
@@ -737,5 +739,5 @@
 }
 
-/** 
+/**
     \param fileName the Name of the File to check
     \returns The full name of the file, including the DataDir, and NULL if the file does not exist
@@ -748,5 +750,5 @@
 
   char* retName = new char[strlen(ResourceManager::getInstance()->getDataDir())
-			   + strlen(fileName) + 1];
+                           + strlen(fileName) + 1];
   sprintf(retName, "%s%s", ResourceManager::getInstance()->getDataDir(), fileName);
   if (ResourceManager::isFile(retName) || ResourceManager::isDir(retName))
@@ -790,35 +792,35 @@
       PRINT(0)("Name: %s; References: %d; Type:", enumRes->name, enumRes->count);
       switch (enumRes->type)
-	{
-	case OBJ:
-	  PRINT(0)("ObjectModel\n");
-	  break;
-	case PRIM:
-	  PRINT(0)("PrimitiveModel\n");
-	  break;
-	case IMAGE:
-	  PRINT(0)("ImageFile (Texture)\n");
-	  break;
-	default:
-	  PRINT(0)("SoundFile\n");
-	  break;
-	}
+        {
+        case OBJ:
+          PRINT(0)("ObjectModel\n");
+          break;
+        case PRIM:
+          PRINT(0)("PrimitiveModel\n");
+          break;
+        case IMAGE:
+          PRINT(0)("ImageFile (Texture)\n");
+          break;
+        default:
+          PRINT(0)("SoundFile\n");
+          break;
+        }
       PRINT(0)("gets deleted at ");
       switch(enumRes->prio)
-	{
-	default:
-	case RP_NO:
-	  PRINT(0)("first posibility (0)\n");
-	  break;
-	case RP_LEVEL:
-	  PRINT(0)("the end of the Level (1)\n");
-	  break;
-	case RP_CAMPAIGN:
-	  PRINT(0)("the end of the campaign (2)\n");
-	  break;
-	case RP_GAME:
-	  PRINT(0)("when leaving the game (3)\n");
-	  break;
-	}
+        {
+        default:
+        case RP_NO:
+          PRINT(0)("first posibility (0)\n");
+          break;
+        case RP_LEVEL:
+          PRINT(0)("the end of the Level (1)\n");
+          break;
+        case RP_CAMPAIGN:
+          PRINT(0)("the end of the campaign (2)\n");
+          break;
+        case RP_GAME:
+          PRINT(0)("when leaving the game (3)\n");
+          break;
+        }
       enumRes = iterator->nextElement();
     }
Index: orxonox/trunk/src/util/resource_manager.h
===================================================================
--- orxonox/trunk/src/util/resource_manager.h	(revision 4596)
+++ orxonox/trunk/src/util/resource_manager.h	(revision 4597)
@@ -1,7 +1,7 @@
-/*! 
+/*!
     \file resource_manager.h
     \brief The Resource Manager checks if a file/resource is loaded.
 
-    If a file/resource was already loaded the resourceManager will 
+    If a file/resource was already loaded the resourceManager will
     return a void pointer to the desired resource.
     Otherwise it will instruct the coresponding resource-loader to load,
@@ -9,5 +9,5 @@
 
     it is possible to compile the resource Manager without some modules by
-    just adding the compile flag -D.... 
+    just adding the compile flag -D....
     (NO_MODEL)
     (NO_AUDIO)
@@ -23,9 +23,10 @@
 #include "stdlibincl.h"
 
-// FORWARD DEFINITION 
+// FORWARD DEFINITION
 template<class T> class tList;
 
 //! An eumerator for different fileTypes the resourceManager supports
-typedef enum ResourceType { 
+typedef enum ResourceType
+{
 #ifndef NO_MODEL
   OBJ,                  //!< loading .obj file
@@ -46,5 +47,5 @@
 };
 
-//! An enumerator for different UNLOAD-types. 
+//! An enumerator for different UNLOAD-types.
 /**
    RP_NO:        will be unloaded on request
@@ -53,8 +54,11 @@
    RP_GAME:      will be unloaded at the end of the whole Game (when closing orxonox)
 */
-typedef enum ResourcePriority { RP_NO        =   0,
-				RP_LEVEL     =   1,
-				RP_CAMPAIGN  =   2,
-				RP_GAME      =   4 };
+typedef enum ResourcePriority
+{
+  RP_NO        =   0,
+  RP_LEVEL     =   1,
+  RP_CAMPAIGN  =   2,
+  RP_GAME      =   4
+};
 
 //! A Struct that keeps track about A resource its name its Type, and so on
@@ -63,5 +67,5 @@
   void*             pointer;           //!< Pointer to the Resource.
   int               count;             //!< How many times this Resource has been loaded.
-  
+
   char*             name;              //!< Name of the Resource.
   ResourceType      type;              //!< ResourceType of this Resource.
@@ -84,5 +88,5 @@
 //! The ResourceManager is a class, that decides if a file/resource should be loaded
 /**
-   If a file/resource was already loaded the resourceManager will 
+   If a file/resource was already loaded the resourceManager will
    return a void pointer to the desired resource.
    Otherwise it will instruct the corresponding resource-loader to load,
@@ -91,5 +95,5 @@
    It does it by looking, if a desired file has already been loaded.
 */
-class ResourceManager : public BaseObject 
+class ResourceManager : public BaseObject
 {
  public:
@@ -105,13 +109,13 @@
   bool addImageDir(const char* imageDir);
   void* load(const char* fileName, ResourcePriority prio = RP_NO,
-	     void* param1 = NULL, void* param2 = NULL, void* param3 = NULL);
+             void* param1 = NULL, void* param2 = NULL, void* param3 = NULL);
   void* load(const char* fileName, ResourceType type, ResourcePriority prio = RP_NO,
-	     void* param1 = NULL, void* param2 = NULL, void* param3 = NULL);
+             void* param1 = NULL, void* param2 = NULL, void* param3 = NULL);
   bool unload(void* pointer, ResourcePriority prio = RP_NO);
   bool unload(Resource* resource, ResourcePriority = RP_NO);
   bool unloadAllByPriority(ResourcePriority prio);
-  
+
   void debug(void);
-  
+
 
   // utility functions of this class
@@ -127,5 +131,5 @@
 
   Resource* locateResourceByInfo(const char* fileName, ResourceType type, void* param1, void* param2, void* param3);
-  Resource* locateResourceByPointer(const void* pointer);  
+  Resource* locateResourceByPointer(const void* pointer);
 
  private:
Index: orxonox/trunk/src/util/state.cc
===================================================================
--- orxonox/trunk/src/util/state.cc	(revision 4596)
+++ orxonox/trunk/src/util/state.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -28,7 +28,8 @@
    \brief standard constructor
 */
-State::State () 
+State::State ()
 {
-   this->setClassName ("State");
+   this->setClassID(CL_STATE, "State");
+   this->setName("State");
 
    this->camera = NULL;
@@ -44,5 +45,5 @@
    \brief standard deconstructor
 */
-State::~State () 
+State::~State ()
 {
   State::singletonRef = NULL;
Index: orxonox/trunk/src/util/state.h
===================================================================
--- orxonox/trunk/src/util/state.h	(revision 4596)
+++ orxonox/trunk/src/util/state.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file state.h
     \brief Definition of the States-singleton Class
Index: orxonox/trunk/src/util/track/pilot_node.cc
===================================================================
--- orxonox/trunk/src/util/track/pilot_node.cc	(revision 4596)
+++ orxonox/trunk/src/util/track/pilot_node.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -28,7 +28,8 @@
    \brief standard constructor
 */
-PilotNode::PilotNode () 
+PilotNode::PilotNode ()
 {
    this->setClassID(CL_PILOT_PARENT, "PilotNode");
+   this->setName("PilotNode");
 
    travelSpeed = 30.0;
@@ -40,12 +41,12 @@
    \brief standard deconstructor
 */
-PilotNode::~PilotNode () 
+PilotNode::~PilotNode ()
 {
 
 }
 
-/** 
+/**
     \brief ticks the node
-    \param time the time about whitch to tick						\
+    \param time the time about whitch to tick                                           \
 */
 void PilotNode::tick(float time)
@@ -73,9 +74,9 @@
    direction = q.apply(direction);
 
-   
+
 
    Vector orthDirection(0,0,1);
    orthDirection = q.apply(orthDirection);
-   
+
    if( this->bUp)
      accel = accel+(direction*acceleration);
@@ -83,11 +84,11 @@
      accel = accel -(direction*acceleration);
    if( this->bLeft)
-     accel = accel - (orthDirection*acceleration); 
+     accel = accel - (orthDirection*acceleration);
    if( this->bRight)
      accel = accel + (orthDirection*acceleration);
-   
+
    Vector move = accel * time;
    this->shiftCoor (move);
-   
+
    Quaternion q1(-M_PI/4 * this->roll/40000.0, Vector(0,0,1));
    Quaternion q2(-M_PI/4 * this->pitch/30000.0, Vector(0,1,0));
Index: orxonox/trunk/src/util/track/pilot_node.h
===================================================================
--- orxonox/trunk/src/util/track/pilot_node.h	(revision 4596)
+++ orxonox/trunk/src/util/track/pilot_node.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file pilot_node.h
     \brief Definition of a PilotNode
Index: orxonox/trunk/src/util/track/track_manager.cc
===================================================================
--- orxonox/trunk/src/util/track/track_manager.cc	(revision 4596)
+++ orxonox/trunk/src/util/track/track_manager.cc	(revision 4597)
@@ -40,4 +40,6 @@
 TrackElement::TrackElement(void)
 {
+  this->setClassID(CL_TRACK_ELEMENT, "TrackElement");
+
   this->isFresh = true;
   this->isHotPoint = false;
@@ -358,4 +360,5 @@
 {
   this->setClassID(CL_TRACK_MANAGER, "TrackManager");
+  this->setName("TrackManager");
 
   TrackManager::singletonRef = this; // do this because otherwise the TrackNode cannot get The instance of the TrackManager
Index: orxonox/trunk/src/util/track/track_node.cc
===================================================================
--- orxonox/trunk/src/util/track/track_node.cc	(revision 4596)
+++ orxonox/trunk/src/util/track/track_node.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -28,8 +28,8 @@
    \brief standard constructor
 */
-TrackNode::TrackNode () 
+TrackNode::TrackNode ()
 {
   this->setClassID(CL_TRACK_NODE, "TrackNode");
-  this->setName("TrackNode"); /* absolete but still used... */
+  this->setName("TrackNode");
 
   NullParent::getInstance()->addChild(this);
@@ -38,9 +38,8 @@
 }
 
-
 /**
    \brief standard deconstructor
 */
-TrackNode::~TrackNode () 
+TrackNode::~TrackNode ()
 {
 
Index: orxonox/trunk/src/world_entities/environment.cc
===================================================================
--- orxonox/trunk/src/world_entities/environment.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/environment.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -13,5 +13,5 @@
    ### File Specific
    main-programmer: Patrick Boenzli
-   co-programmer: 
+   co-programmer:
 */
 
@@ -31,5 +31,5 @@
 Environment::Environment () : WorldEntity()
 {
-
+  this->setClassID(CL_ENVIRONMENT, "Environment");
 }
 
@@ -38,5 +38,5 @@
    \brief deletes an environment
 */
-Environment::~Environment () 
+Environment::~Environment ()
 {
 
@@ -67,5 +67,5 @@
    \brief draws the Environment
 */
-void Environment::draw () 
+void Environment::draw ()
 {
   //this->getRelCoor().debug();
@@ -74,10 +74,10 @@
   glPushMatrix();
   float matrix[4][4];
-  
+
   glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
   //rotate
   this->getAbsDir().matrix (matrix);
   glMultMatrixf((float*)matrix);
-  
+
   this->model->draw();
 
Index: orxonox/trunk/src/world_entities/npc.cc
===================================================================
--- orxonox/trunk/src/world_entities/npc.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/npc.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -27,7 +27,7 @@
 
 
-NPC::NPC()
-  : WorldEntity()
+NPC::NPC() : WorldEntity()
 {
+  this->setClassID(CL_NPC, "NPC");
   hasDied = 0;
 }
@@ -41,17 +41,17 @@
 }
 
-void NPC::getPosition(float* x, float* y, float* z) 
+void NPC::getPosition(float* x, float* y, float* z)
 {
-  *x = xCor; 
-  *y = yCor; 
+  *x = xCor;
+  *y = yCor;
   *z = zCor;
 }
 
-void NPC::setCollisionRadius(float r) 
+void NPC::setCollisionRadius(float r)
 {
   collisionRadius = r;
 }
 
-float NPC::getCollisionRadius() 
+float NPC::getCollisionRadius()
 {
   return collisionRadius;
@@ -64,5 +64,5 @@
 void NPC::paint()
 {
-  //cout << "WorldEntity::WorldEntity();" << endl;  
+  //cout << "WorldEntity::WorldEntity();" << endl;
   /* fix: died flag approach is very stupid, just to show @ convention */
   if( hasDied == 0 ) {
@@ -75,5 +75,5 @@
 }
 
-void NPC::drawNPC() 
+void NPC::drawNPC()
 {
 
Index: orxonox/trunk/src/world_entities/player.cc
===================================================================
--- orxonox/trunk/src/world_entities/player.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/player.cc	(revision 4597)
@@ -49,4 +49,5 @@
   */
   this->setClassID(CL_PLAYER, "Player");
+
   this->model = (Model*)ResourceManager::getInstance()->load("models/reaplow.obj", OBJ, RP_CAMPAIGN);
   travelSpeed = 15.0;
@@ -90,4 +91,5 @@
 {
   this->setClassID(CL_PLAYER, "Player");
+
   this->weapons = new tList<Weapon>();
   this->activeWeapon = NULL;
Index: orxonox/trunk/src/world_entities/power_up.cc
===================================================================
--- orxonox/trunk/src/world_entities/power_up.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/power_up.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -24,5 +24,8 @@
 
 
-PowerUp::PowerUp () {}
+PowerUp::PowerUp ()
+{
+  this->setClassID(CL_POWER_UP, "PowerUp");
+}
 
 
Index: orxonox/trunk/src/world_entities/projectile.cc
===================================================================
--- orxonox/trunk/src/world_entities/projectile.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/projectile.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -13,5 +13,5 @@
    ### File Specific
    main-programmer: Patrick Boenzli
-   co-programmer: 
+   co-programmer:
 */
 
@@ -34,4 +34,5 @@
 {
   this->setClassID(CL_PROJECTILE, "Projectile");
+
   this->weapon = weapon;
   this->flightDirection = NULL;
@@ -45,9 +46,9 @@
    \brief standard deconstructor
 */
-Projectile::~Projectile () 
+Projectile::~Projectile ()
 {
-  /* 
-     do not delete the test projectModel, since it is pnode 
-     and will be cleaned out by world 
+  /*
+     do not delete the test projectModel, since it is pnode
+     and will be cleaned out by world
   */
   //delete this->projectileModel;
@@ -110,5 +111,5 @@
    \param time since last tick
 */
-void Projectile::tick (float time) 
+void Projectile::tick (float time)
 {
   Vector v = this->velocity * (time);
@@ -131,5 +132,5 @@
    \param place where it is hit
 */
-void Projectile::hit (WorldEntity* entity, Vector* place) 
+void Projectile::hit (WorldEntity* entity, Vector* place)
 {}
 
@@ -138,17 +139,17 @@
    \brief the function gets called, when the projectile is destroyed
 */
-void Projectile::destroy () 
+void Projectile::destroy ()
 {}
 
 
-void Projectile::draw () 
+void Projectile::draw ()
 {
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
 
-  float matrix[4][4];  
+  float matrix[4][4];
   glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
   this->getAbsDir().matrix (matrix);
-  glMultMatrixf((float*)matrix);  
+  glMultMatrixf((float*)matrix);
   this->model->draw();
 
Index: orxonox/trunk/src/world_entities/projectile.h
===================================================================
--- orxonox/trunk/src/world_entities/projectile.h	(revision 4596)
+++ orxonox/trunk/src/world_entities/projectile.h	(revision 4597)
@@ -1,8 +1,8 @@
-/*! 
+/*!
     \projectile.h
     \brief a projectile, that is been shooted by a weapon
 
     You can use this class to make some shoots, but this isn't the real idea. If you want to just test, if the
-    shooting funcions work, use the Projectile class. But if you want to implement your own shoots its 
+    shooting funcions work, use the Projectile class. But if you want to implement your own shoots its
     different:<br>
     Make a new class and derive it from Projectile. To have a weapon work well, reimplement the functions
@@ -10,6 +10,6 @@
     - void draw()
     - void hit() (only if you have working collision detection)
-    When you have implemented these functions you have just to add the projectiles to your weapon. You ll want 
-    to make this by looking into the function 
+    When you have implemented these functions you have just to add the projectiles to your weapon. You ll want
+    to make this by looking into the function
     - Weapon::fire()
     there you just change the line:
@@ -27,5 +27,5 @@
 class Weapon;
 
-class Projectile : public WorldEntity 
+class Projectile : public WorldEntity
 {
   friend class World;
@@ -48,12 +48,12 @@
  protected:
   //physical attriutes like: force, speed, acceleration etc.
-  float speed;                         //!< this is the speed of the projectile
-  float currentLifeTime;               //!< this is the time, the projectile exists in this world (incremented by tick)
-  float ttl;                           //!< time to life, after this time, the projectile will garbage collect itself
-  Vector* flightDirection;             //!< direction in which the shoot flights
-  Weapon* weapon;                      //!< weapon the shoot belongs to
-  
-  Vector velocity;                     //!< velocity of the projectile
-  Vector offsetVel;                    //!< offset velocity TEMP
+  float          speed;                     //!< this is the speed of the projectile
+  float          currentLifeTime;           //!< this is the time, the projectile exists in this world (incremented by tick)
+  float          ttl;                       //!< time to life, after this time, the projectile will garbage collect itself
+  Vector*        flightDirection;           //!< direction in which the shoot flights
+  Weapon*        weapon;                    //!< weapon the shoot belongs to
+
+  Vector         velocity;                  //!< velocity of the projectile
+  Vector         offsetVel;                 //!< offset velocity TEMP
 };
 
Index: orxonox/trunk/src/world_entities/satellite.cc
===================================================================
--- orxonox/trunk/src/world_entities/satellite.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/satellite.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -13,5 +13,5 @@
    ### File Specific:
    main-programmer: Patrick Boenzli
-   co-programmer: 
+   co-programmer:
 */
 
@@ -32,4 +32,5 @@
 {
   this->setClassID(CL_SATELLITE, "Satellite");
+
   this->model = (Model*) ResourceManager::getInstance()->load("cube", RP_LEVEL);
   this->speed = speed;
@@ -52,14 +53,14 @@
    \brief this method is called every frame
    \param time: the time in seconds that has passed since the last tick
-   
+
    Handle all stuff that should update with time inside this method (movement, animation, etc.)
 */
-void Satellite::tick(float time) 
+void Satellite::tick(float time)
 {
   float w = this->speed * M_PI;
 
-  Quaternion rotation(w * time, *this->axis); 
+  Quaternion rotation(w * time, *this->axis);
   Quaternion v = this->getRelDir();
-  
+
   this->setRelDir(v * rotation);
 }
@@ -68,21 +69,21 @@
 /**
    \brief the entity is drawn onto the screen with this function
-   
+
    This is a central function of an entity: call it to let the entity painted to the screen. Just override this function with whatever you want to be drawn.
 */
-void Satellite::draw() 
+void Satellite::draw()
 {
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
   float matrix[4][4];
-  
+
   /* translate */
-  glTranslatef (this->getAbsCoor ().x, 
-		this->getAbsCoor ().y, 
-		this->getAbsCoor ().z);
+  glTranslatef (this->getAbsCoor ().x,
+                this->getAbsCoor ().y,
+                this->getAbsCoor ().z);
   /* rotate */
   this->getAbsDir ().matrix (matrix);
   glMultMatrixf((float*)matrix);
-  
+
   this->model->draw();
   glPopMatrix();
Index: orxonox/trunk/src/world_entities/satellite.h
===================================================================
--- orxonox/trunk/src/world_entities/satellite.h	(revision 4596)
+++ orxonox/trunk/src/world_entities/satellite.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file world_entity.h
     \brief Definition of the basic WorldEntity
@@ -18,5 +18,5 @@
 //! Basic class from which all interactive stuff in the world is derived from
 class Satellite : public WorldEntity
-{	
+{
   friend class World;
 
@@ -27,9 +27,9 @@
   virtual void draw ();
   virtual void tick (float time);
-  
+
  private:
-  Vector* axis;
-  float speed;
-  
+  Vector*       axis;
+  float         speed;
+
 
 };
Index: orxonox/trunk/src/world_entities/skybox.cc
===================================================================
--- orxonox/trunk/src/world_entities/skybox.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/skybox.cc	(revision 4597)
@@ -1,4 +1,4 @@
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -68,7 +68,8 @@
 {
   this->setClassID(CL_SKYBOX, "SkyBox");
+
   this->skyModel = NULL;
   this->material = new Material*[6];
-  for (int i = 0; i < 6; i++) 
+  for (int i = 0; i < 6; i++)
     {
       this->material[i] = new Material();
@@ -104,5 +105,5 @@
    usage: give this function an argument like
    setTexture("skybox", "jpg");
-   and it will convert this to 
+   and it will convert this to
    setTextures("skybox_top.jpg", "skybox_bottom.jpg", "skybox_left.jpg",
                "skybox_right.jpg", "skybox_front.jpg", "skybox_back.jpg");
@@ -123,5 +124,5 @@
   sprintf(front, "%s_front.%s", name, extension);
   sprintf(back, "%s_back.%s", name, extension);
-  
+
   this->setTextures(top, bottom, left, right, front, back);
 
@@ -180,5 +181,5 @@
 /**
    \brief rebuilds the SkyBox
-   
+
    this must be done, when changing the Size of the Skybox (runtime-efficency)
 */
@@ -189,5 +190,5 @@
   skyModel = new Model();
 
-  this->skyModel->addVertex (-0.5*size, -0.5*size, 0.5*size);  
+  this->skyModel->addVertex (-0.5*size, -0.5*size, 0.5*size);
   this->skyModel->addVertex (0.5*size, -0.5*size, 0.5*size);
   this->skyModel->addVertex (-0.5*size, 0.5*size, 0.5*size);
@@ -222,5 +223,5 @@
   this->skyModel->setMaterial(material[5]);
   this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,4, 0,1,4, 2,2,4, 4,3,4); // back
-  
+
   this->skyModel->finalize();
 }
Index: orxonox/trunk/src/world_entities/skybox.h
===================================================================
--- orxonox/trunk/src/world_entities/skybox.h	(revision 4596)
+++ orxonox/trunk/src/world_entities/skybox.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file skybox.h
     \brief Definition of the SkyBox, that handles the Display of an atmosphere for orxonox.
@@ -43,8 +43,8 @@
   void rebuild();
 
-  Model* skyModel;        //!< A Model for the Sky. This must not be the same as the Model from WorldEntity, because it is not alocated through the ResourceManager.
-  Material **material;    //!< Materials for the SkyBox. sorted by number (0-5) top, bottom, left, right, front, back
-  float size;             //!< Size of the SkyBox. This should match the frustum maximum range.
-    
+  Model*          skyModel;        //!< A Model for the Sky. This must not be the same as the Model from WorldEntity, because it is not alocated through the ResourceManager.
+  Material**      material;        //!< Materials for the SkyBox. sorted by number (0-5) top, bottom, left, right, front, back
+  float           size;            //!< Size of the SkyBox. This should match the frustum maximum range.
+
 };
 
Index: orxonox/trunk/src/world_entities/skysphere.cc
===================================================================
--- orxonox/trunk/src/world_entities/skysphere.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/skysphere.cc	(revision 4597)
@@ -1,4 +1,4 @@
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -13,9 +13,9 @@
    main-programmer: David Gruetter
    co-programmer: Benjamin Grauer
-   
-   Created by Dave: this file is actually quite similar to player.cc and so is 
+
+   Created by Dave: this file is actually quite similar to player.cc and so is
    skybox.h similar to player.h
    With that said, things should be clear:)
-   
+
    Edited:
    Bensch: more constructors, changeability, comments...
@@ -43,4 +43,6 @@
 Skysphere::Skysphere(char* fileName)
 {
+  this->setClassID(CL_SKYSPHERE, "SkySphere");
+
   if (fileName == NULL)
     this->initialize("pictures/sky-replace.jpg");
@@ -92,5 +94,5 @@
 /**
    \brief draws the Skysphere
-   
+
    This part is normally precessed in the "Painting Phase".
 */
@@ -105,5 +107,5 @@
   //glRotatef(95.0f, 0.0f, 0.0f, 1.0f);
   //glRotatef(-250.0f, 0.0, 1.0f, 0.0f);
-  
+
   skyMaterial->select();
   gluSphere(this->sphereObj, this->sphereRadius, 20, 20);
Index: orxonox/trunk/src/world_entities/skysphere.h
===================================================================
--- orxonox/trunk/src/world_entities/skysphere.h	(revision 4596)
+++ orxonox/trunk/src/world_entities/skysphere.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file skysphere.h
     \brief Definition of the Skysphere, that handles the Display of an atmosphere of orxonox.
@@ -34,10 +34,11 @@
   virtual void draw();
 
- private: 
-  GLUquadricObj *sphereObj; //!< A Placeholder for the SkySphere.
-  Material *skyMaterial;    //!< A Material for the SkySphere.
-  float sphereRadius;       //!< Radius of the SkySphere. This should match the frustum maximum range.
-    
-  void initialize(char* fileName);  
+  private:
+    void initialize(char* fileName);
+
+ private:
+  GLUquadricObj*    sphereObj;           //!< A Placeholder for the SkySphere.
+  Material*         skyMaterial;         //!< A Material for the SkySphere.
+  float             sphereRadius;        //!< Radius of the SkySphere. This should match the frustum maximum range.
 };
 
Index: orxonox/trunk/src/world_entities/terrain.cc
===================================================================
--- orxonox/trunk/src/world_entities/terrain.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/terrain.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -28,5 +28,5 @@
 
 */
-Terrain::Terrain () 
+Terrain::Terrain ()
 {
   this->init();
@@ -36,8 +36,8 @@
    \brief Constructor for loading a Terrain out of a file
    \param fileName The file to load data from.
- 
+
    this either loads out of an OBJ-file, or loads a heightmap if no .obj-extension is found.
 */
-Terrain::Terrain(char* fileName)
+Terrain::Terrain(const char* fileName)
 {
   this->init();
@@ -68,5 +68,5 @@
 
 */
-Terrain::~Terrain () 
+Terrain::~Terrain ()
 {
   if (objectList)
@@ -78,4 +78,5 @@
 {
   this->setClassID(CL_TERRAIN, "Terrain");
+
   this->objectList = 0;
 }
@@ -84,13 +85,13 @@
 
 void Terrain::draw ()
-{ 
+{
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
   float matrix[4][4];
-  
+
   /* translate */
-  glTranslatef (this->getAbsCoor ().x, 
-		this->getAbsCoor ().y, 
-		this->getAbsCoor ().z);
+  glTranslatef (this->getAbsCoor ().x,
+                this->getAbsCoor ().y,
+                this->getAbsCoor ().z);
   /* rotate */
   this->getAbsDir ().matrix (matrix);
@@ -112,7 +113,7 @@
       objectList = glGenLists(1);
       glNewList (objectList, GL_COMPILE);
-      
+
       glColor3f(1.0,0,0);
-      
+
       int sizeX = 100;
       int sizeZ = 80;
@@ -121,115 +122,115 @@
       float widthX = float (length /sizeX);
       float widthZ = float (width /sizeZ);
-      
+
       float height [sizeX][sizeZ];
       Vector normal_vectors[sizeX][sizeZ];
-      
-      
+
+
       for ( int i = 0; i<sizeX-1; i+=1)
-	for (int j = 0; j<sizeZ-1;j+=1)
-	  //height[i][j] = rand()/20046 + (j-25)*(j-25)/30;
+        for (int j = 0; j<sizeZ-1;j+=1)
+          //height[i][j] = rand()/20046 + (j-25)*(j-25)/30;
 #ifdef __WIN32__
-	  height[i][j]=(sin((float)j/3)*rand()*i/182400)*.5;
+          height[i][j]=(sin((float)j/3)*rand()*i/182400)*.5;
 #else
       height[i][j]=(sin((float)j/3)*rand()*(long)i/6282450500.0)*.5;
 #endif
-      
+
       //Die Huegel ein wenig glaetten
       for (int h=1; h<2;h++)
-	for (int i=1;i<sizeX-2 ;i+=1 )
-	  for(int j=1;j<sizeZ-2;j+=1)
-	    height[i][j]=(height[i+1][j]+height[i][j+1]+height[i-1][j]+height[i][j-1])/4;
-      
+        for (int i=1;i<sizeX-2 ;i+=1 )
+          for(int j=1;j<sizeZ-2;j+=1)
+            height[i][j]=(height[i+1][j]+height[i][j+1]+height[i-1][j]+height[i][j-1])/4;
+
       //Berechnung von normalen Vektoren
       for(int i=1;i<sizeX-2;i+=1)
-	for(int j=1;j<sizeZ-2 ;j+=1)
-	  {
-	    Vector v1 = Vector (widthX*(1),      height[i][j],      widthZ*(j) );
-	    Vector v2 = Vector (widthX*(i-1),    height[i-1][j],    widthZ*(j));
-	    Vector v3 = Vector (widthX*(i),      height[i][j+1],    widthZ*(j+1));
-	    Vector v4 = Vector (widthX*(i+1),    height[i+1][j],    widthZ*(j));
-	    Vector v5 = Vector (widthX*(i),      height[i][j-1],    widthZ*(j-1));
-	    
-	    Vector c1 = v2 - v1;
-	    Vector c2 = v3 - v1;
-	    Vector c3=  v4 - v1;
-	    Vector c4 = v5 - v1;
-	    Vector zero = Vector (0,0,0);
-	    normal_vectors[i][j]=c1.cross(v3-v5)+c2.cross(v4-v2)+c3.cross(v5-v3)+c4.cross(v2-v4);
-	    normal_vectors[i][j].normalize();
-	  }
-      
+        for(int j=1;j<sizeZ-2 ;j+=1)
+          {
+            Vector v1 = Vector (widthX*(1),      height[i][j],      widthZ*(j) );
+            Vector v2 = Vector (widthX*(i-1),    height[i-1][j],    widthZ*(j));
+            Vector v3 = Vector (widthX*(i),      height[i][j+1],    widthZ*(j+1));
+            Vector v4 = Vector (widthX*(i+1),    height[i+1][j],    widthZ*(j));
+            Vector v5 = Vector (widthX*(i),      height[i][j-1],    widthZ*(j-1));
+
+            Vector c1 = v2 - v1;
+            Vector c2 = v3 - v1;
+            Vector c3=  v4 - v1;
+            Vector c4 = v5 - v1;
+            Vector zero = Vector (0,0,0);
+            normal_vectors[i][j]=c1.cross(v3-v5)+c2.cross(v4-v2)+c3.cross(v5-v3)+c4.cross(v2-v4);
+            normal_vectors[i][j].normalize();
+          }
+
       glBegin(GL_QUADS);
       int snowheight=3;
       for ( int i = 0; i<sizeX; i+=1)
-	for (int j = 0; j<sizeZ;j+=1)
-	  {	  
-	    Vector v1 = Vector (widthX*(i),      height[i][j]-20,       widthZ*(j)  -width/2);
-	    Vector v2 = Vector (widthX*(i+1),    height[i+1][j]-20,     widthZ*(j)  -width/2);
-	    Vector v3 = Vector (widthX*(i+1),    height[i+1][j+1]-20,   widthZ*(j+1)-width/2);
-	    Vector v4 = Vector (widthX*(i),      height[i][j+1]-20,     widthZ*(j+1)-width/2);
-	    float a[3];
-	    if(height[i][j]<snowheight){
-	      a[0]=0;
-	      a[1]=1.0-height[i][j]/10-.3;
-	      a[2]=0;
-	      glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	    }
-	    else{
-	      a[0]=1.0;
-	      a[1]=1.0;
-	      a[2]=1.0;
-	      glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	      
-	    }
-	    glNormal3f(normal_vectors[i][j].x, normal_vectors[i][j].y, normal_vectors[i][j].z);
-	    glVertex3f(v1.x, v1.y, v1.z);
-	    if(height[i+1][j]<snowheight){
-	      a[0]=0;
-	      a[1] =1.0-height[i+1][j]/10-.3;
-	      a[2]=0;
-	      glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	    }
-	    else{
-	      a[0]=1.0;
-	      a[1]=1.0;
-	      a[2]=1.0;
-	      glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	      
-	    }
-	    glNormal3f(normal_vectors[i+1][j].x, normal_vectors[i+1][j].y, normal_vectors[i+1][j].z);
-	    glVertex3f(v2.x, v2.y, v2.z);
-	    if(height[i+1][j+1]<snowheight){
-	      a[0]=0;
-	      a[1] =1.0-height[i+1][j+1]/10-.3;
-	      a[2]=0;
-	      glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	    }
-	    else{
-	      a[0]=1.0;
-	      a[1]=1.0;
-	      a[2]=1.0;
-	      glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	      
-	      
-	    }
-	    glNormal3f(normal_vectors[i+1][j+1].x, normal_vectors[i+1][j+1].y, normal_vectors[i+1][j+1].z);
-	    glVertex3f(v3.x, v3.y, v3.z);
-	    if(height[i][j+1]<snowheight){
-	      a[0]=0;
-	      a[1] =1.0-height[i+1][j+1]/10-.3;
-	      a[2]=0;
-	      glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	    }
-	    else{
-	      a[0]=1.0;
-	      a[1]=1.0;
-	      a[2]=1.0;
-	      glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	    }
-	    glNormal3f(normal_vectors[i][j+1].x, normal_vectors[i][j+1].y, normal_vectors[i][j+1].z);
-	    glVertex3f(v4.x, v4.y, v4.z);
-	    
-	  }
+        for (int j = 0; j<sizeZ;j+=1)
+          {
+            Vector v1 = Vector (widthX*(i),      height[i][j]-20,       widthZ*(j)  -width/2);
+            Vector v2 = Vector (widthX*(i+1),    height[i+1][j]-20,     widthZ*(j)  -width/2);
+            Vector v3 = Vector (widthX*(i+1),    height[i+1][j+1]-20,   widthZ*(j+1)-width/2);
+            Vector v4 = Vector (widthX*(i),      height[i][j+1]-20,     widthZ*(j+1)-width/2);
+            float a[3];
+            if(height[i][j]<snowheight){
+              a[0]=0;
+              a[1]=1.0-height[i][j]/10-.3;
+              a[2]=0;
+              glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+            }
+            else{
+              a[0]=1.0;
+              a[1]=1.0;
+              a[2]=1.0;
+              glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+
+            }
+            glNormal3f(normal_vectors[i][j].x, normal_vectors[i][j].y, normal_vectors[i][j].z);
+            glVertex3f(v1.x, v1.y, v1.z);
+            if(height[i+1][j]<snowheight){
+              a[0]=0;
+              a[1] =1.0-height[i+1][j]/10-.3;
+              a[2]=0;
+              glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+            }
+            else{
+              a[0]=1.0;
+              a[1]=1.0;
+              a[2]=1.0;
+              glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+
+            }
+            glNormal3f(normal_vectors[i+1][j].x, normal_vectors[i+1][j].y, normal_vectors[i+1][j].z);
+            glVertex3f(v2.x, v2.y, v2.z);
+            if(height[i+1][j+1]<snowheight){
+              a[0]=0;
+              a[1] =1.0-height[i+1][j+1]/10-.3;
+              a[2]=0;
+              glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+            }
+            else{
+              a[0]=1.0;
+              a[1]=1.0;
+              a[2]=1.0;
+              glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+
+
+            }
+            glNormal3f(normal_vectors[i+1][j+1].x, normal_vectors[i+1][j+1].y, normal_vectors[i+1][j+1].z);
+            glVertex3f(v3.x, v3.y, v3.z);
+            if(height[i][j+1]<snowheight){
+              a[0]=0;
+              a[1] =1.0-height[i+1][j+1]/10-.3;
+              a[2]=0;
+              glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+            }
+            else{
+              a[0]=1.0;
+              a[1]=1.0;
+              a[2]=1.0;
+              glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+            }
+            glNormal3f(normal_vectors[i][j+1].x, normal_vectors[i][j+1].y, normal_vectors[i][j+1].z);
+            glVertex3f(v4.x, v4.y, v4.z);
+
+          }
       glEnd();
       glEndList();
@@ -239,5 +240,5 @@
     {
       /*
-	this->model = (OBJModel*) new Model();
+        this->model = (OBJModel*) new Model();
       this->model->setName("CUBE");
       this->model->addVertex (-0.5, -0.5, 0.5);
@@ -249,5 +250,5 @@
       this->model->addVertex (-0.5, -0.5, -0.5);
       this->model->addVertex (0.5, -0.5, -0.5);
-      
+
       this->model->addVertexTexture (0.0, 0.0);
       this->model->addVertexTexture (1.0, 0.0);
@@ -268,4 +269,4 @@
       */
     }
-  
-}
+
+}
Index: orxonox/trunk/src/world_entities/terrain.h
===================================================================
--- orxonox/trunk/src/world_entities/terrain.h	(revision 4596)
+++ orxonox/trunk/src/world_entities/terrain.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file terrain.h
     \brief Defines and handles the terrain of the World
@@ -20,14 +20,14 @@
 
 //! A Class to handle Terrain of orxonox
-class Terrain : public WorldEntity 
+class Terrain : public WorldEntity
 {
 
  public:
   Terrain();
-  Terrain(char* fileName);
+  Terrain(const char* fileName);
   Terrain(DebugTerrain debugTerrain);
   virtual ~Terrain();
   void init();
-  
+
   void buildDebugTerrain(DebugTerrain debugTerrain);
   virtual void draw();
Index: orxonox/trunk/src/world_entities/test_bullet.cc
===================================================================
--- orxonox/trunk/src/world_entities/test_bullet.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/test_bullet.cc	(revision 4597)
@@ -34,4 +34,5 @@
 {
   this->setClassID(CL_TEST_BULLET, "TestBullet");
+
   float modelSize = .5;
   this->model = (Model*)ResourceManager::getInstance()->load("models/Rocket1.obj", OBJ, RP_LEVEL, (void*) &modelSize);
Index: orxonox/trunk/src/world_entities/test_gun.cc
===================================================================
--- orxonox/trunk/src/world_entities/test_gun.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/test_gun.cc	(revision 4597)
@@ -43,8 +43,10 @@
    creates a new weapon
 */
-TestGun::TestGun (PNode* parent, const Vector& coordinate, const Quaternion& direction, int leftRight)
+TestGun::TestGun (PNode* parent, const Vector& coordinate,
+                  const Quaternion& direction, int leftRight)
   :  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;
Index: orxonox/trunk/src/world_entities/weapon.cc
===================================================================
--- orxonox/trunk/src/world_entities/weapon.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/weapon.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -13,5 +13,5 @@
    ### File Specific
    main-programmer: Patrick Boenzli
-   co-programmer: 
+   co-programmer:
 */
 
@@ -35,11 +35,13 @@
    \param number of weapon slots of the model/ship <= 8 (limitied)
 */
-WeaponManager::WeaponManager(int nrOfSlots) 
-{
+WeaponManager::WeaponManager(int nrOfSlots)
+{
+  this->setClassID(CL_WEAPON_MANAGER, "WeaponManager");
+
   for(int i = 0; i < W_MAX_CONFIGS; ++i)
     {
       this->configs[i].bUsed = false;
       for(int j = 0; j < W_MAX_SLOTS; ++j)
-	this->configs[i].slots[j] = NULL;
+        this->configs[i].slots[j] = NULL;
     }
   this->nrOfSlots = nrOfSlots;
@@ -48,8 +50,8 @@
 
 
-WeaponManager::~WeaponManager() 
-{
-  /* 
-     i dont have to delete the weapons itself, because they are 
+WeaponManager::~WeaponManager()
+{
+  /*
+     i dont have to delete the weapons itself, because they are
      worldentities and therefore in the entities list of the world.
      world will clean them up for me
@@ -59,5 +61,5 @@
       this->configs[i].bUsed = false;
       for(int j = 0; j < W_MAX_SLOTS; ++j)
-	this->configs[i].slots[j] = NULL;
+        this->configs[i].slots[j] = NULL;
     }
 }
@@ -72,8 +74,8 @@
    if you add explicitly a weapon at config:n, slot:m, the weapon placed at this location will be
    replaced by the weapon specified. if you use the W_FREE_SLOT, the manager will look for a free
-   slot in this weaponconfiguration. if there is non, the weapon won't be added and there will be 
+   slot in this weaponconfiguration. if there is non, the weapon won't be added and there will be
    a error message.
 */
-void WeaponManager::addWeapon(Weapon* weapon, int configID, int slotID) 
+void WeaponManager::addWeapon(Weapon* weapon, int configID, int slotID)
 {
   if( slotID == W_FREE_SLOT)
@@ -81,8 +83,8 @@
       int freeSlot = this->getNextFreeSlot( configID);
       if( freeSlot < 0 || freeSlot >= this->nrOfSlots)
-	{
-	  PRINTF(0)("There is no free slot in this WeaponConfig to dock this weapon at! Aborting\n");
-	  return;
-	}
+        {
+          PRINTF(0)("There is no free slot in this WeaponConfig to dock this weapon at! Aborting\n");
+          return;
+        }
       PRINTF(3)("Added new Weapon to Config:%i/Slot:%i\n", configID, freeSlot);
       this->configs[configID].bUsed = true;
@@ -108,5 +110,5 @@
    this function will deactivate the weapons first, change the config and reactivate them later
 */
-void WeaponManager::nextWeaponConf() 
+void WeaponManager::nextWeaponConf()
 {
   PRINTF(4)("Changing weapon configuration: from %i to next\n", this->currConfID);
@@ -116,7 +118,7 @@
   for(i = this->currConfID + 1; i < W_MAX_CONFIGS && !this->configs[i].bUsed; ++i);
   if( i == W_MAX_CONFIGS) this->currConfID = W_CONFIG0;
-  else this->currConfID = i;  
-
-  
+  else this->currConfID = i;
+
+
   Weapon *w1, *w2;
   for(int j = 0; j < W_MAX_SLOTS; ++j)
@@ -124,22 +126,22 @@
       w1 = this->configs[lastConfID].slots[j];
       w2 = this->configs[this->currConfID].slots[j];
-      
+
       if( w1 == w2)
-	{
-	  printf("no need for change\n");
-	}
+        {
+          printf("no need for change\n");
+        }
       else
-	{
-	if( w1 != NULL )
-	  {
-	    w1->deactivate();
-	    printf("deactivating %i,%i\n", j,lastConfID);
-	  }
-	if( w2 != NULL)
-	  {
-	    w2->activate();
-	    printf("activating %i,%i\n", j, this->currConfID);
-	  }
-	}
+        {
+        if( w1 != NULL )
+          {
+            w1->deactivate();
+            printf("deactivating %i,%i\n", j,lastConfID);
+          }
+        if( w2 != NULL)
+          {
+            w2->activate();
+            printf("activating %i,%i\n", j, this->currConfID);
+          }
+        }
     }
 }
@@ -199,5 +201,5 @@
     {
       if( this->configs[configID].slots[i] == NULL)
-	return i;
+        return i;
     }
   return -1;
@@ -214,5 +216,5 @@
    creates a new weapon
 */
-Weapon::Weapon (PNode* parent, const Vector& coordinate, const Quaternion& direction) 
+Weapon::Weapon (PNode* parent, const Vector& coordinate, const Quaternion& direction)
   : WorldEntity()
 {
@@ -236,9 +238,9 @@
    \brief standard deconstructor
 */
-Weapon::~Weapon () 
+Weapon::~Weapon ()
 {
   // model will be deleted from WorldEntity-destructor
   //this->worldEntities = NULL;
-  
+
   /* dont delete objectComponentsX here, they will be killed when the pnodes are cleaned out */
 
@@ -247,8 +249,8 @@
 
 
-/** 
+/**
     \brief enables the weapon
 
-    a weapon can be enabled/disabled because of various reasons. if a weapon is 
+    a weapon can be enabled/disabled because of various reasons. if a weapon is
     been enabled, it can interact in a world. elswhere it wont react to any
     action.
@@ -260,8 +262,8 @@
 
 
-/** 
+/**
     \brief disables the weapon
 
-    a weapon can be enabled/disabled because of various reasons. if a weapon is 
+    a weapon can be enabled/disabled because of various reasons. if a weapon is
     been enabled, it can interact in a world. elswhere it wont react to any
     action.
@@ -273,9 +275,9 @@
 
 
-/** 
+/**
     \brief checks if the weapon is enabled
     \returns true if enabled
 
-    a weapon can be ebabled/disabled because of various reasons. if a weapon is 
+    a weapon can be ebabled/disabled because of various reasons. if a weapon is
     been enabled, it can interact in a world. elswhere it wont react to any
     action.
@@ -314,7 +316,7 @@
    \brief this activates the weapon
 
-   This is needed, since there can be more than one weapon on a ship. the 
-   activation can be connected with an animation. for example the weapon is 
-   been armed out. 
+   This is needed, since there can be more than one weapon on a ship. the
+   activation can be connected with an animation. for example the weapon is
+   been armed out.
 */
 void Weapon::activate()
@@ -325,6 +327,6 @@
    \brief this deactivates the weapon
 
-   This is needed, since there can be more than one weapon on a ship. the 
-   activation can be connected with an animation. for example the weapon is 
+   This is needed, since there can be more than one weapon on a ship. the
+   activation can be connected with an animation. for example the weapon is
    been armed out.
 */
@@ -352,5 +354,5 @@
    can destroy the weapons of enemies or vice versa.
 */
-void Weapon::hit (WorldEntity* entity, Vector* position) 
+void Weapon::hit (WorldEntity* entity, Vector* position)
 {}
 
@@ -362,5 +364,5 @@
    hit, it can also be destoryed.
 */
-void Weapon::destroy () 
+void Weapon::destroy ()
 {}
 
@@ -369,5 +371,5 @@
    \brief tick signal for time dependent/driven stuff
 */
-void Weapon::tick (float time) 
+void Weapon::tick (float time)
 {}
 
@@ -383,5 +385,5 @@
    \brief this will draw the weapon
 */
-void Weapon::draw () 
-{}
-
+void Weapon::draw ()
+{}
+
Index: orxonox/trunk/src/world_entities/weapon.h
===================================================================
--- orxonox/trunk/src/world_entities/weapon.h	(revision 4596)
+++ orxonox/trunk/src/world_entities/weapon.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file weapon.h
     \brief a weapon that a player can use
@@ -12,10 +12,10 @@
      o slowdown-factor: this is a factor d: exp(-d*x), d is element of all positive R. it determines how fast the firing-rate will slow down. if no slowdown: d=0, the bigger d is, the faster the weapon will slow down!
      o energy-consumption: this determines the energy that has to be used to produce this projectile = costs per projectile
-    
+
     Furthermore there are some other attributes, that will help to represent a firing
     weapon in this world:
      o sound file/ressource: this is a pointer to the sound-file/ressource. however it may be represented
      o shooting animation
-     
+
 
      a player defines one or more weapon configurations. a player has got one to eight
@@ -31,4 +31,5 @@
 #define _WEAPON_H
 
+#include "base_object.h"
 #include "world_entity.h"
 
@@ -74,14 +75,14 @@
 //! this is a weapon Configuration: it has up to 8 slots
 typedef struct weaponConfig {
-  bool bUsed;                       //<! is set to true, if this configuration is 
+  bool bUsed;                       //<! is set to true, if this configuration is
   Weapon* slots[8];
 };
 
 
-class WeaponManager {
+class WeaponManager : public BaseObject {
  public:
   WeaponManager(int nrOfSlots = 2);
   ~WeaponManager();
-  
+
   void addWeapon(Weapon* weapon, int configID = W_CONFIG0, int slotID = W_FREE_SLOT);
   void removeWeapon(Weapon* weapon, int configID = W_CONFIG0);
@@ -96,9 +97,9 @@
   int currConfID;                       //<! the currently selected config
   weaponConfig configs[4];              //<! a list of four configurations
-  
+
   int getNextFreeSlot(int configID);
 };
 
-class Weapon : public WorldEntity 
+class Weapon : public WorldEntity
 {
   friend class World;
@@ -107,5 +108,5 @@
   Weapon (PNode* parent, const Vector& coordinate, const Quaternion& direction);
   virtual ~Weapon ();
-  
+
   void enable(void);
   void disable(void);
@@ -123,5 +124,5 @@
      \brief sets a weapon idle time
      \param idle time in ms
-     
+
      a weapon idle time is the time spend after a shoot until the weapon can
      shoot again
@@ -131,5 +132,5 @@
      \brief gets the weapon idle time
      \returns idle time in ms
-     
+
      a weapon idle time is the time spend after a shoot until the weapon can
      shoot again
@@ -139,5 +140,5 @@
      \brief checks if the idle time is elapsed
      \return true if time is elapsed
-     
+
      a weapon idle time is the time spend after a shoot until the weapon can
    shoot again
@@ -147,5 +148,5 @@
   /**
      \brief fires the weapon
-     
+
      this is called from the player.cc, when fire-button is been pushed
   */
@@ -153,5 +154,5 @@
   virtual void hit (WorldEntity* weapon, Vector* loc);
   virtual void destroy(void);
-  
+
   virtual void tick(float time);
   virtual void weaponIdle(void);
Index: orxonox/trunk/src/world_entities/world_entity.cc
===================================================================
--- orxonox/trunk/src/world_entities/world_entity.cc	(revision 4596)
+++ orxonox/trunk/src/world_entities/world_entity.cc	(revision 4597)
@@ -31,4 +31,5 @@
 {
   this->setClassID(CL_WORLD_ENTITY, "WorldEntity");
+
   this->model = NULL;
 
