Index: branches/std/src/world_entities/elements/text_element.cc
===================================================================
--- branches/std/src/world_entities/elements/text_element.cc	(revision 7214)
+++ branches/std/src/world_entities/elements/text_element.cc	(revision 7216)
@@ -70,10 +70,10 @@
 }
 
-void TextElement::setText(const char* text)
+void TextElement::setText(const std::string& text)
 {
   Text::setText(text);
 }
 
-void TextElement::setFont(const char* font)
+void TextElement::setFont(const std::string& font)
 {
   Text::setFont(font, (unsigned int)this->getSizeY2D());
Index: branches/std/src/world_entities/elements/text_element.h
===================================================================
--- branches/std/src/world_entities/elements/text_element.h	(revision 7214)
+++ branches/std/src/world_entities/elements/text_element.h	(revision 7216)
@@ -29,6 +29,6 @@
   virtual void loadParams(const TiXmlElement* root);
 
-  void setText(const char* text);
-  void setFont(const char* font);
+  void setText(const std::string& text);
+  void setFont(const std::string& font);
 
  private:
Index: branches/std/src/world_entities/planet.cc
===================================================================
--- branches/std/src/world_entities/planet.cc	(revision 7214)
+++ branches/std/src/world_entities/planet.cc	(revision 7216)
@@ -45,5 +45,4 @@
   this->toList(OM_GROUP_01);
 
-  this->material = new Material();
   //this->material->setIllum(20);
   //this->material->setAmbient(0.1, 0.1, 0.1);
@@ -71,6 +70,4 @@
 {
   PRINTF(5)("Deleting Planet\n");
-  if( this->material)
-    delete this->material;
 }
 
@@ -92,7 +89,7 @@
  * @param textureName the top texture.
 */
-void Planet::setTexture(const char* textureName)
+void Planet::setTexture(const std::string& textureName)
 {
-  this->material->setDiffuseMap(textureName);
+  this->material.setDiffuseMap(textureName);
 }
 
@@ -124,5 +121,5 @@
   glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
 
-  this->material->select();
+  this->material.select();
 
 //   /WorldEntity::draw();
Index: branches/std/src/world_entities/planet.h
===================================================================
--- branches/std/src/world_entities/planet.h	(revision 7214)
+++ branches/std/src/world_entities/planet.h	(revision 7216)
@@ -9,7 +9,6 @@
 /* INCLUDES */
 #include "world_entity.h"
-
+#include "material.h"
 /* FORWARD DECLARATION */
-class Material;
 class Texture;
 
@@ -26,5 +25,5 @@
   void setSize(float size);
   /** assumes jpg as input-format */
-  void setTexture(const char* textureName);
+  void setTexture(const std::string& textureName);
 
 
@@ -34,5 +33,5 @@
 
  private:
-  Material*       material;        //!< Materials for the Planet. sorted by number (0-5) top, bottom, left, right, front, back
+  Material        material;        //!< Materials for the Planet. sorted by number (0-5) top, bottom, left, right, front, back
   Texture*        texture;         //!< Textures for the CubeMap.
 
Index: branches/std/src/world_entities/power_ups/param_power_up.cc
===================================================================
--- branches/std/src/world_entities/power_ups/param_power_up.cc	(revision 7214)
+++ branches/std/src/world_entities/power_ups/param_power_up.cc	(revision 7216)
@@ -81,8 +81,8 @@
 }
 
-void ParamPowerUp::setType(const char* type)
+void ParamPowerUp::setType(const std::string& type)
 {
   for(int i = 0; i < POWERUP_PARAM_size; ++i) {
-    if(strcmp(type, paramTypes[i]) == 0) {
+    if(type == paramTypes[i]) {
       this->type = (EnumParamPowerUpType)i;
       break;
Index: branches/std/src/world_entities/power_ups/param_power_up.h
===================================================================
--- branches/std/src/world_entities/power_ups/param_power_up.h	(revision 7214)
+++ branches/std/src/world_entities/power_ups/param_power_up.h	(revision 7216)
@@ -28,5 +28,5 @@
   void setMaxValue(float value);
   void setMinValue(float value);
-  void setType(const char* type);
+  void setType(const std::string& type);
   EnumParamPowerUpType getType();
   float getValue();
@@ -43,9 +43,11 @@
 
 private:
-  static const char* paramTypes[];
-  EnumParamPowerUpType type;
-  float value;
-  float max_value;
-  float min_value;
+  EnumParamPowerUpType    type;
+  float                   value;
+  float                   max_value;
+  float                   min_value;
+
+  static const char*      paramTypes[];
+
 };
 
Index: branches/std/src/world_entities/power_ups/power_up.cc
===================================================================
--- branches/std/src/world_entities/power_ups/power_up.cc	(revision 7214)
+++ branches/std/src/world_entities/power_ups/power_up.cc	(revision 7216)
@@ -182,9 +182,10 @@
   };
 
-void PowerUp::setRespawnType(const char* type)
+
+void PowerUp::setRespawnType(const std::string& type)
 {
   for(int i = 0; i < RESPAWN_size; ++i)
   {
-    if(!strcmp(type, respawnTypes[i]))
+    if(type == respawnTypes[i])
     {
       this->respawnType = (PowerUpRespawn)i;
Index: branches/std/src/world_entities/power_ups/power_up.h
===================================================================
--- branches/std/src/world_entities/power_ups/power_up.h	(revision 7214)
+++ branches/std/src/world_entities/power_ups/power_up.h	(revision 7216)
@@ -31,5 +31,5 @@
   virtual void draw () const;
   virtual void tick(float dt);
-  void setRespawnType(const char* type);
+  void setRespawnType(const std::string& type);
   void setRespawnTime(const float respawn);
 
@@ -45,14 +45,14 @@
 
 private:
-  SoundSource    soundSource;
-  SoundBuffer*   pickupBuffer;
-  SoundBuffer*   respawnBuffer;
-  Material* sphereMaterial;
-  PowerUpRespawn respawnType;
-  float respawnTime;
-  float respawnStart;
-  static const char* respawnTypes[];
+  SoundSource         soundSource;
+  SoundBuffer*        pickupBuffer;
+  SoundBuffer*        respawnBuffer;
+  Material*           sphereMaterial;
+  PowerUpRespawn      respawnType;
+  float               respawnTime;
+  float               respawnStart;
+  static const char*  respawnTypes[];
 
-  WorldEntity* collider;
+  WorldEntity*        collider;
 };
 
Index: branches/std/src/world_entities/recorder.cc
===================================================================
--- branches/std/src/world_entities/recorder.cc	(revision 7214)
+++ branches/std/src/world_entities/recorder.cc	(revision 7216)
@@ -54,5 +54,7 @@
 
   LoadParam(root, "duration", this, Recorder, setStreamDuration);
+
   LoadParam(root, "fps", this, Recorder, setFPS);
+
   LoadParam(root, "name", this, Recorder, initVideo);
 }
@@ -71,5 +73,5 @@
 
 
-void Recorder::initVideo(const char* filename)
+void Recorder::initVideo(const std::string& filename)
 {
   frame_count = 0;
@@ -78,5 +80,5 @@
 
   // auto detect the output format from the name, default is mpeg
-  output_format = guess_format(NULL, filename, NULL);
+  output_format = guess_format(NULL, filename.c_str(), NULL);
   if (!output_format)
   {
@@ -93,5 +95,5 @@
 
   format_context->oformat = output_format;
-  snprintf(format_context->filename, sizeof(format_context->filename), "%s", filename);
+  snprintf(format_context->filename, sizeof(format_context->filename), "%s", filename.c_str());
 
   // add video stream using the default format codec and initialize the codec
@@ -104,5 +106,5 @@
 
   // print some information
-  dump_format(format_context, 0, filename, 1);
+  dump_format(format_context, 0, filename.c_str(), 1);
 
   // now that all the parameters are set, we can open the
@@ -110,14 +112,14 @@
   if(video_stream)
     this->openVideo();
-  
+
   // open the output file, if needed
   if(!(output_format->flags & AVFMT_NOFILE))
   {
-    if(url_fopen(&format_context->pb, filename, URL_WRONLY) < 0)
-      PRINTF(1)("Could not open %s\n", filename);
+    if(url_fopen(&format_context->pb, filename.c_str(), URL_WRONLY) < 0)
+      PRINTF(1)("Could not open %s\n", filename.c_str());
   }
 
   // write the stream header, if any
-  av_write_header(format_context); 
+  av_write_header(format_context);
 }
 
@@ -129,7 +131,7 @@
   av_free(buffer);
 
-  // write the trailer, if any 
+  // write the trailer, if any
   av_write_trailer(format_context);
-  
+
   // free the streams
   for(int i = 0; i < format_context->nb_streams; i++)
@@ -175,5 +177,5 @@
 
 void Recorder::allocPicture()
-{ 
+{
   picture = avcodec_alloc_frame();
   if(!picture)
@@ -189,5 +191,5 @@
       return;
   }
-  avpicture_fill((AVPicture *)picture, picture_buf, 
+  avpicture_fill((AVPicture *)picture, picture_buf,
                   codec_context->pix_fmt, width, height);
 
@@ -211,5 +213,5 @@
   if (!video_stream)
     PRINTF(1)("Could not alloc stream\n");
-  
+
   codec_context = video_stream->codec;
   codec_context->codec_id = output_format->video_codec;
@@ -219,5 +221,5 @@
   codec_context->bit_rate = 400000;
   // resolution must be a multiple of two
-  codec_context->width = State::getResX();  
+  codec_context->width = State::getResX();
   codec_context->height = State::getResY();
 
@@ -229,5 +231,5 @@
   // timebase should be 1/framerate and timestamp increments should be
   // identically 1
-  codec_context->time_base.den = (int)stream_frame_rate;  
+  codec_context->time_base.den = (int)stream_frame_rate;
   codec_context->time_base.num = 1;
   codec_context->gop_size = 12;  // emit one intra frame every twelve frames at most
@@ -235,6 +237,6 @@
 
   if (codec_context->codec_id == CODEC_ID_MPEG1VIDEO)
-      // needed to avoid using macroblocks in which some coeffs overflow 
-      // this doesnt happen with normal video, it just happens here as the 
+      // needed to avoid using macroblocks in which some coeffs overflow
+      // this doesnt happen with normal video, it just happens here as the
       // motion of the chroma plane doesnt match the luma plane
       codec_context->mb_decision=2;
@@ -275,7 +277,7 @@
 {
   int out_size, err;
-  
+
   codec_context = video_stream->codec;
-  
+
   if(frame_count >= stream_nb_frames)
   {
@@ -287,5 +289,5 @@
     this->fillYuvImage();
 
-  
+
   if(format_context->oformat->flags & AVFMT_RAWPICTURE)
   {
@@ -293,10 +295,10 @@
     // futur for that
     av_init_packet(&packet);
-    
+
     packet.flags |= PKT_FLAG_KEY;
     packet.stream_index= video_stream->index;
     packet.data= (uint8_t *)picture;
     packet.size= sizeof(AVPicture);
-    
+
     err = av_write_frame(format_context, &packet);
   }
@@ -309,5 +311,5 @@
     {
       av_init_packet(&packet);
-      
+
       packet.pts= av_rescale_q(codec_context->coded_frame->pts, codec_context->time_base, video_stream->time_base);
       if(codec_context->coded_frame->key_frame)
@@ -316,5 +318,5 @@
       packet.data= buffer;
       packet.size= out_size;
-      
+
       // write the compressed frame in the media file
       err = av_write_frame(format_context, &packet);
Index: branches/std/src/world_entities/recorder.h
===================================================================
--- branches/std/src/world_entities/recorder.h	(revision 7214)
+++ branches/std/src/world_entities/recorder.h	(revision 7216)
@@ -20,30 +20,4 @@
 class Recorder : public WorldEntity
 {
-  private:
-    AVFrame* picture;
-    uint8_t* buffer;
-    int frame_count;
-    int buffer_size;
-
-    AVOutputFormat* output_format;
-    AVFormatContext* format_context;
-    AVCodecContext* codec_context;
-    AVCodec *codec;
-    AVStream* video_stream;
-    AVPacket packet;
-    double video_pts;
-
-    uint8_t *picture_buf;
-    int size;
-
-    int height;
-    int width;
-    float time;
-
-    float stream_duration;
-    float stream_frame_rate;
-    int stream_nb_frames;
-
-AVFrame* RGB_frame;
   public:
     Recorder (const TiXmlElement* root = NULL);
@@ -56,5 +30,5 @@
 
   private:
-    void initVideo(const char* filename);
+    void initVideo(const std::string& filename);
     void addVideoStream();
     void openVideo();
@@ -66,4 +40,32 @@
     void setStreamDuration(float duration);
     void setFPS(float fps);
+
+
+  private:
+    AVFrame*            picture;
+    uint8_t*            buffer;
+    int                 frame_count;
+    int                 buffer_size;
+
+    AVOutputFormat*     output_format;
+    AVFormatContext*    format_context;
+    AVCodecContext*     codec_context;
+    AVCodec*            codec;
+    AVStream*           video_stream;
+    AVPacket            packet;
+    double              video_pts;
+
+    uint8_t*            picture_buf;
+    int                 size;
+
+    int                 height;
+    int                 width;
+    float               time;
+
+    float               stream_duration;
+    float               stream_frame_rate;
+    int                 stream_nb_frames;
+
+    AVFrame*            RGB_frame;
 };
 
Index: branches/std/src/world_entities/terrain.cc
===================================================================
--- branches/std/src/world_entities/terrain.cc	(revision 7214)
+++ branches/std/src/world_entities/terrain.cc	(revision 7216)
@@ -48,6 +48,6 @@
     this->loadParams(root);
 
-//  if (this->model != NULL)
-    //this->ssp = new SpatialSeparation((Model*)this->model, 10.0f);
+  //  if (this->model != NULL)
+  //this->ssp = new SpatialSeparation((Model*)this->model, 10.0f);
 }
 
@@ -64,11 +64,11 @@
 
   if (!strstr(fileName, ".obj") || !strstr(fileName, ".OBJ") )
-    {
-      this->loadModel(fileName);
-    }
+  {
+    this->loadModel(fileName);
+  }
   else
-    {
-      // load the hightMap here.
-    }
+  {
+    // load the hightMap here.
+  }
 }
 
@@ -98,5 +98,5 @@
 
   if(this->heightMap)
-        delete heightMap;
+    delete heightMap;
 }
 
@@ -122,14 +122,14 @@
 
   LoadParam(root, "scale", this, Terrain, setScale)
-      .describe("The scale in x,y,z direction");
+  .describe("The scale in x,y,z direction");
 
   LoadParam(root, "texture", this, Terrain, loadTexture)
-      .describe("The name of the Texture for this heightMap");
+  .describe("The name of the Texture for this heightMap");
 
   LoadParam(root, "vegetation", this, Terrain, loadVegetation)
-      .describe("the fileName of the vegetation, that should be loaded onto this terrain. (must be relative to the data-dir)") ;
+  .describe("the fileName of the vegetation, that should be loaded onto this terrain. (must be relative to the data-dir)") ;
 
   LoadParam(root, "height-map", this, Terrain, loadHeightMap)
-      .describe("The HeightMap, splitted into two strings seperated by ','. 1: HeighMap, 2: ColorMap");
+  .describe("The HeightMap, splitted into two strings seperated by ','. 1: HeighMap, 2: ColorMap");
 
 }
@@ -140,5 +140,5 @@
 }
 
-void Terrain::loadHeightMap(const char* heightMapFile, const char* colorMap)
+void Terrain::loadHeightMap(const std::string& heightMapFile, const std::string& colorMap)
 {
   if (this->heightMap != NULL)
@@ -151,5 +151,5 @@
 
   this->heightMap = new HeightMap(hmName, hmColorName);
-//   heightMap->scale(Vector(43.0f,4.7f,43.0f));
+  //   heightMap->scale(Vector(43.0f,4.7f,43.0f));
   heightMap->scale(this->terrainScale);
   heightMap->setAbsCoor(this->getAbsCoor());
@@ -158,17 +158,17 @@
 
 
-void Terrain::loadTexture(const char* textureName)
-{
-   PRINTF(0)("Load texture: %s\n", textureName);
-
-   heightMapMaterial->setDiffuse(1.0,1.0,1.0);
-   heightMapMaterial->setAmbient(1.0,1.0,1.0 );
-   heightMapMaterial->setSpecular(1.0,1.0,1.0);
-   heightMapMaterial->setShininess(.5);
-   heightMapMaterial->setTransparency(1.0);
-
-   heightMapMaterial->setDiffuseMap(textureName);
-   heightMapMaterial->setAmbientMap(textureName);
-   heightMapMaterial->setSpecularMap(textureName);
+void Terrain::loadTexture(const std::string& textureName)
+{
+  PRINTF(4)("Load texture: %s\n", textureName.c_str());
+
+  heightMapMaterial->setDiffuse(1.0,1.0,1.0);
+  heightMapMaterial->setAmbient(1.0,1.0,1.0 );
+  heightMapMaterial->setSpecular(1.0,1.0,1.0);
+  heightMapMaterial->setShininess(.5);
+  heightMapMaterial->setTransparency(1.0);
+
+  heightMapMaterial->setDiffuseMap(textureName);
+  //   heightMapMaterial->setAmbientMap(textureName);
+  //   heightMapMaterial->setSpecularMap(textureName);
 }
 
@@ -202,5 +202,5 @@
                 this->getAbsCoor ().z);
   /* rotate */
- // Vector tmpRot = this->getAbsDir().getSpacialAxis();
+  // Vector tmpRot = this->getAbsDir().getSpacialAxis();
   //glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
 
@@ -224,25 +224,25 @@
 
 
-/*
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-  glLoadIdentity();
-  Vector camera =   State::getCameraNode()->getAbsCoor(); // Go on here ..........!!!
-
-  float height =    heightMap->getHeight(camera.x, camera.z);
-
-  glEnable (GL_COLOR_MATERIAL) ;
-  glBegin(GL_QUADS);            // Draw The Cube Using quads
-  glColor3f(0.0f,1.0f,0.0f);  // Color Blue
-  glVertex3f(camera.x + 63.0f,Terrain->getHeight(camera.x+63.0f, camera.z-10.0f)+13.0f,camera.z-10.0f);      // Top Right Of The Quad (Top)
-  glVertex3f(camera.x-63.0f, getHeight(camera.x+63.0f, camera.z-10.0f)+13.0f,camera.z-10.0f);      // Top Left Of The Quad (Top)
-  glVertex3f(camera.x-63.0f, getHeight(camera.x+63.0f, camera.z+10.0f)+13.0f, camera.z+10.0f);      // Bottom Left Of The Quad (Top)
-  glVertex3f(camera.x+ 63.0f, getHeight(camera.x+63.0f, camera.z+10.0f)+13.0f, camera.z+10.0f);      // Bottom Right Of The Quad (Top)
-  glEnd();                      // End Drawing The Plan
-
-  glPopMatrix();*/
-
-
-/* THIS IS ONLY FOR DEBUGGING INFORMATION */
+  /*
+    glMatrixMode(GL_MODELVIEW);
+    glPushMatrix();
+    glLoadIdentity();
+    Vector camera =   State::getCameraNode()->getAbsCoor(); // Go on here ..........!!!
+
+    float height =    heightMap->getHeight(camera.x, camera.z);
+
+    glEnable (GL_COLOR_MATERIAL) ;
+    glBegin(GL_QUADS);            // Draw The Cube Using quads
+    glColor3f(0.0f,1.0f,0.0f);  // Color Blue
+    glVertex3f(camera.x + 63.0f,Terrain->getHeight(camera.x+63.0f, camera.z-10.0f)+13.0f,camera.z-10.0f);      // Top Right Of The Quad (Top)
+    glVertex3f(camera.x-63.0f, getHeight(camera.x+63.0f, camera.z-10.0f)+13.0f,camera.z-10.0f);      // Top Left Of The Quad (Top)
+    glVertex3f(camera.x-63.0f, getHeight(camera.x+63.0f, camera.z+10.0f)+13.0f, camera.z+10.0f);      // Bottom Left Of The Quad (Top)
+    glVertex3f(camera.x+ 63.0f, getHeight(camera.x+63.0f, camera.z+10.0f)+13.0f, camera.z+10.0f);      // Bottom Right Of The Quad (Top)
+    glEnd();                      // End Drawing The Plan
+
+    glPopMatrix();*/
+
+
+  /* THIS IS ONLY FOR DEBUGGING INFORMATION */
   if (this->ssp != NULL)
     this->ssp->drawQuadtree();
@@ -254,163 +254,171 @@
   // if the terrain is the Terrain of Dave
   if (debugTerrain == TERRAIN_DAVE)
-    {
-      objectList = glGenLists(1);
-      glNewList (objectList, GL_COMPILE);
-
-      glColor3f(1.0,0,0);
-
-      int sizeX = 100;
-      int sizeZ = 80;
-      float length = 1000;
-      float width = 200;
-      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;
+  {
+    objectList = glGenLists(1);
+    glNewList (objectList, GL_COMPILE);
+
+    glColor3f(1.0,0,0);
+
+    int sizeX = 100;
+    int sizeZ = 80;
+    float length = 1000;
+    float width = 200;
+    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;
 #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;
+        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;
-
-      //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();
-          }
-
-      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);
-
-          }
-      glEnd();
-      glEndList();
-    }
+    //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;
+
+    //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();
+      }
+
+    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);
+
+      }
+    glEnd();
+    glEndList();
+  }
 
   if (debugTerrain == TERRAIN_BENSCH)
-    {
-      /*
-        this->model = (OBJModel*) new Model();
-      this->model->setName("CUBE");
-      this->model->addVertex (-0.5, -0.5, 0.5);
-      this->model->addVertex (0.5, -0.5, 0.5);
-      this->model->addVertex (-0.5, 0.5, 0.5);
-      this->model->addVertex (0.5, 0.5, 0.5);
-      this->model->addVertex (-0.5, 0.5, -0.5);
-      this->model->addVertex (0.5, 0.5, -0.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);
-      this->model->addVertexTexture (0.0, 1.0);
-      this->model->addVertexTexture (1.0, 1.0);
-      this->model->addVertexTexture (0.0, 2.0);
-      this->model->addVertexTexture (1.0, 2.0);
-      this->model->addVertexTexture (0.0, 3.0);
-      this->model->addVertexTexture (1.0, 3.0);
-      this->model->addVertexTexture (0.0, 4.0);
-      this->model->addVertexTexture (1.0, 4.0);
-      this->model->addVertexTexture (2.0, 0.0);
-      this->model->addVertexTexture (2.0, 1.0);
-      this->model->addVertexTexture (-1.0, 0.0);
-      this->model->addVertexTexture (-1.0, 1.0);
-
-      this->model->finalize();
-      */
-    }
+  {
+    /*
+      this->model = (OBJModel*) new Model();
+    this->model->setName("CUBE");
+    this->model->addVertex (-0.5, -0.5, 0.5);
+    this->model->addVertex (0.5, -0.5, 0.5);
+    this->model->addVertex (-0.5, 0.5, 0.5);
+    this->model->addVertex (0.5, 0.5, 0.5);
+    this->model->addVertex (-0.5, 0.5, -0.5);
+    this->model->addVertex (0.5, 0.5, -0.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);
+    this->model->addVertexTexture (0.0, 1.0);
+    this->model->addVertexTexture (1.0, 1.0);
+    this->model->addVertexTexture (0.0, 2.0);
+    this->model->addVertexTexture (1.0, 2.0);
+    this->model->addVertexTexture (0.0, 3.0);
+    this->model->addVertexTexture (1.0, 3.0);
+    this->model->addVertexTexture (0.0, 4.0);
+    this->model->addVertexTexture (1.0, 4.0);
+    this->model->addVertexTexture (2.0, 0.0);
+    this->model->addVertexTexture (2.0, 1.0);
+    this->model->addVertexTexture (-1.0, 0.0);
+    this->model->addVertexTexture (-1.0, 1.0);
+
+    this->model->finalize();
+    */
+  }
 }
 
@@ -450,15 +458,13 @@
 
 void Terrain::writeDebug( ) const
-{
-}
+  {}
 
 void Terrain::readDebug( ) const
-{
-}
+  {}
 
 float Terrain::getHeight(float x, float y)
 {
-        if(this->heightMap != NULL)
-                return (this->heightMap->getHeight(x, y));
-        return 0;
-}
+  if(this->heightMap != NULL)
+    return (this->heightMap->getHeight(x, y));
+  return 0;
+}
Index: branches/std/src/world_entities/terrain.h
===================================================================
--- branches/std/src/world_entities/terrain.h	(revision 7214)
+++ branches/std/src/world_entities/terrain.h	(revision 7216)
@@ -43,6 +43,6 @@
   void loadVegetation(const std::string& vegetationFile);
 
-  void loadHeightMap(const char* heightMapFile, const char* colorMap = NULL);
-  void loadTexture(const char* textureName);
+  void loadHeightMap(const std::string& heightMapFile, const std::string& colorMap);
+  void loadTexture(const std::string& textureName);
   void setScale(float x, float y, float z);
 
Index: branches/std/src/world_entities/weapons/aim.cc
===================================================================
--- branches/std/src/world_entities/weapons/aim.cc	(revision 7214)
+++ branches/std/src/world_entities/weapons/aim.cc	(revision 7216)
@@ -147,5 +147,5 @@
  * @param textureFile The texture-file to load onto the crosshair
  */
-void Aim::setTexture(const char* textureFile)
+void Aim::setTexture(const std::string& textureFile)
 {
   this->material->setDiffuseMap(textureFile);
Index: branches/std/src/world_entities/weapons/aim.h
===================================================================
--- branches/std/src/world_entities/weapons/aim.h	(revision 7214)
+++ branches/std/src/world_entities/weapons/aim.h	(revision 7216)
@@ -46,5 +46,5 @@
 
   void setSize(float size);
-  void setTexture(const char* textureFile);
+  void setTexture(const std::string& textureFile);
   /** @param rotationSpeed the speed at what the crosshair should rotate */
   inline void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; };
Index: branches/std/src/world_entities/weapons/crosshair.cc
===================================================================
--- branches/std/src/world_entities/weapons/crosshair.cc	(revision 7214)
+++ branches/std/src/world_entities/weapons/crosshair.cc	(revision 7216)
@@ -79,5 +79,5 @@
   EventListener::loadParams(root);
 
-  LoadParam(root, "texture", this, Crosshair, setTexture)
+  LoadParam(root, "texture", this->material, Material, setDiffuseMap)
       .describe("the texture-file to load onto the Crosshair");
 
@@ -103,5 +103,5 @@
  * @param textureFile The texture-file to load onto the crosshair
  */
-void Crosshair::setTexture(const char* textureFile)
+void Crosshair::setTexture(const std::string& textureFile)
 {
   this->material->setDiffuseMap(textureFile);
Index: branches/std/src/world_entities/weapons/crosshair.h
===================================================================
--- branches/std/src/world_entities/weapons/crosshair.h	(revision 7214)
+++ branches/std/src/world_entities/weapons/crosshair.h	(revision 7216)
@@ -31,5 +31,5 @@
 
   void setSize(float size);
-  void setTexture(const char* textureFile);
+  void setTexture(const std::string& textureFile);
   /** @param rotationSpeed the speed at what the crosshair should rotate */
   void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; };
Index: branches/std/src/world_entities/weapons/weapon.cc
===================================================================
--- branches/std/src/world_entities/weapons/weapon.cc	(revision 7214)
+++ branches/std/src/world_entities/weapons/weapon.cc	(revision 7216)
@@ -165,8 +165,6 @@
  * @param projectile the Name of the Projectile.
  */
-void Weapon::setProjectileTypeC(const char* projectile)
-{
-  if (projectile == NULL)
-    return;
+void Weapon::setProjectileTypeC(const std::string& projectile)
+{
   FastFactory* tmpFac = FastFactory::searchFastFactory(projectile);
   if (tmpFac != NULL)
@@ -176,5 +174,5 @@
   else
   {
-    PRINTF(1)("Projectile %s does not exist for weapon %s\n", projectile, this->getName());
+    PRINTF(1)("Projectile %s does not exist for weapon %s\n", projectile.c_str(), this->getName());
   }
 }
@@ -613,23 +611,23 @@
  * @return The Action if known, WA_NONE otherwise.
  */
-WeaponAction Weapon::charToAction(const char* action)
-{
-  if (!strcmp(action, "none"))
+WeaponAction Weapon::charToAction(const std::string& action)
+{
+  if (action == "none")
     return WA_NONE;
-  else if (!strcmp(action, "shoot"))
+  else if (action == "shoot")
     return WA_SHOOT;
-  else if (!strcmp(action, "charge"))
+  else if (action == "charge")
     return WA_CHARGE;
-  else if (!strcmp(action, "reload"))
+  else if (action == "reload")
     return WA_RELOAD;
-  else if (!strcmp(action, "acitvate"))
+  else if (action == "acitvate")
     return WA_ACTIVATE;
-  else if (!strcmp(action, "deactivate"))
+  else if (action == "deactivate")
     return WA_DEACTIVATE;
-  else if (!strcmp(action, "special1"))
+  else if (action == "special1")
     return WA_SPECIAL1;
   else
   {
-    PRINTF(2)("action %s could not be identified.\n", action);
+    PRINTF(2)("action %s could not be identified.\n", action.c_str());
     return WA_NONE;
   }
@@ -674,25 +672,25 @@
  * @return The State if known, WS_NONE otherwise.
  */
-WeaponState Weapon::charToState(const char* state)
-{
-  if (!strcmp(state, "none"))
+WeaponState Weapon::charToState(const std::string& state)
+{
+  if (state == "none")
     return WS_NONE;
-  else if (!strcmp(state, "shooting"))
+  else if (state == "shooting")
     return WS_SHOOTING;
-  else if (!strcmp(state, "charging"))
+  else if (state == "charging")
     return WS_CHARGING;
-  else if (!strcmp(state, "reloading"))
+  else if (state == "reloading")
     return WS_RELOADING;
-  else if (!strcmp(state, "activating"))
+  else if (state == "activating")
     return WS_ACTIVATING;
-  else if (!strcmp(state, "deactivating"))
+  else if (state == "deactivating")
     return WS_DEACTIVATING;
-  else if (!strcmp(state, "inactive"))
+  else if (state == "inactive")
     return WS_INACTIVE;
-  else if (!strcmp(state, "idle"))
+  else if (state == "idle")
     return WS_IDLE;
   else
   {
-    PRINTF(2)("state %s could not be identified.\n", state);
+    PRINTF(2)("state %s could not be identified.\n", state.c_str());
     return WS_NONE;
   }
Index: branches/std/src/world_entities/weapons/weapon.h
===================================================================
--- branches/std/src/world_entities/weapons/weapon.h	(revision 7214)
+++ branches/std/src/world_entities/weapons/weapon.h	(revision 7216)
@@ -111,5 +111,5 @@
     inline long getCapability() const { return this->capability; };
     void setProjectileType(ClassID projectile);
-    void setProjectileTypeC(const char* projectile);
+    void setProjectileTypeC(const std::string& projectile);
     /** @returns The projectile's classID */
     inline ClassID getProjectileType() { return this->projectile; };
@@ -132,5 +132,5 @@
     // STATE CHANGES //
     /** @param state the State to time @param duration the duration of the State */
-    inline void setStateDuration(const char* state, float duration) { setStateDuration(charToState(state), duration); };
+    inline void setStateDuration(const std::string& state, float duration) { setStateDuration(charToState(state), duration); };
     /** @param state the State to time @param duration the duration of the State */
     inline void setStateDuration(WeaponState state, float duration) { /*(state < WS_STATE_COUNT)?*/this->times[state] = duration; };
@@ -149,6 +149,6 @@
 
     void setActionSound(WeaponAction action, const std::string& soundFile);
-    /** @see void setActionSound(WeaponAction action, const char* soundFile); */
-    void setActionSound(const char* action, const char* soundFile) { this->setActionSound(charToAction(action), soundFile); };
+    /** @see void setActionSound(WeaponAction action, const std::string& soundFile); */
+    void setActionSound(const std::string& action, const std::string& soundFile) { this->setActionSound(charToAction(action), soundFile); };
 
     Animation3D* getAnimation(WeaponState state, PNode* node = NULL);
@@ -176,7 +176,7 @@
 
     // utility:
-    static WeaponAction  charToAction(const char* action);
+    static WeaponAction  charToAction(const std::string& action);
     static const char*   actionToChar(WeaponAction action);
-    static WeaponState   charToState(const char* state);
+    static WeaponState   charToState(const std::string& state);
     static const char*   stateToChar(WeaponState state);
 
Index: branches/std/src/world_entities/world_entity.cc
===================================================================
--- branches/std/src/world_entities/world_entity.cc	(revision 7214)
+++ branches/std/src/world_entities/world_entity.cc	(revision 7216)
@@ -61,6 +61,4 @@
   this->bCollide = true;
 
-  this->md2TextureFileName = NULL;
-
   this->objectListNumber = OM_INIT;
   this->objectListIterator = NULL;
@@ -123,20 +121,19 @@
  * @todo fix this, so it only has one loadModel-Function.
 */
-void WorldEntity::loadModel(const char* fileName, float scaling, unsigned int modelNumber)
+void WorldEntity::loadModel(const std::string& fileName, float scaling, unsigned int modelNumber)
 {
   this->modelLODName = fileName;
   this->scaling = scaling;
-  if ( fileName != NULL && strcmp(fileName, "") )
+  if (!fileName.empty())
   {
     // search for the special character # in the LoadParam
-    if (strchr(fileName, '#') != NULL)
-    {
-      PRINTF(4)("Found # in %s... searching for LOD's\n", fileName);
-      char* lodFile = new char[strlen(fileName)+1];
-      strcpy(lodFile, fileName);
-      char* depth = strchr(lodFile, '#');
+    if (fileName.find('#') != std::string::npos)
+    {
+      PRINTF(4)("Found # in %s... searching for LOD's\n", fileName.c_str());
+      std::string lodFile = fileName;
+      unsigned int offset = lodFile.find('#');
       for (unsigned int i = 0; i < 3; i++)
       {
-        *depth = 48+(int)i;
+        lodFile[offset] = 48+(int)i;
         if (ResourceManager::isInDataDir(lodFile))
           this->loadModel(lodFile, scaling, i);
@@ -149,7 +146,7 @@
       this->scaling = 1.0;
     }
-    if(strstr(fileName, ".obj"))
-    {
-      PRINTF(4)("fetching OBJ file: %s\n", fileName);
+    if(fileName.find(".obj") != std::string::npos)
+    {
+      PRINTF(4)("fetching OBJ file: %s\n", fileName.c_str());
       BaseObject* loadedModel = ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, this->scaling);
       if (loadedModel != NULL)
@@ -159,7 +156,7 @@
         this->buildObbTree(4);
     }
-    else if(strstr(fileName, ".md2"))
-    {
-      PRINTF(4)("fetching MD2 file: %s\n", fileName);
+    else if(fileName.find(".md2") != std::string::npos)
+    {
+      PRINTF(4)("fetching MD2 file: %s\n", fileName.c_str());
       Model* m = new MD2Model(fileName, this->md2TextureFileName, this->scaling);
       //this->setModel((Model*)ResourceManager::getInstance()->load(fileName, MD2, RP_CAMPAIGN), 0);
Index: branches/std/src/world_entities/world_entity.h
===================================================================
--- branches/std/src/world_entities/world_entity.h	(revision 7214)
+++ branches/std/src/world_entities/world_entity.h	(revision 7216)
@@ -36,9 +36,9 @@
   virtual void loadParams(const TiXmlElement* root);
 
-  void loadModel(const char* fileName, float scaling = 1.0f, unsigned int modelNumber = 0);
+  void loadModel(const std::string& fileName, float scaling = 1.0f, unsigned int modelNumber = 0);
   void setModel(Model* model, unsigned int modelNumber = 0);
   Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
 
-  inline void loadMD2Texture(const char* fileName) { this->md2TextureFileName = fileName; }
+  inline void loadMD2Texture(const std::string& fileName) { this->md2TextureFileName = fileName; }
 
   bool buildObbTree(unsigned int depth);
@@ -113,6 +113,6 @@
 
   std::vector<Model*>     models;             //!< The model that should be loaded for this entity.
-  const char*             md2TextureFileName; //!< the file name of the md2 model texture, only if this
-  const char*             modelLODName;       //!< the name of the model lod file
+  std::string             md2TextureFileName; //!< the file name of the md2 model texture, only if this
+  std::string             modelLODName;       //!< the name of the model lod file
   BVTree*                 obbTree;            //!< this is the obb tree reference needed for collision detection
 
