Index: trunk/src/world_entities/terrain.cc
===================================================================
--- trunk/src/world_entities/terrain.cc	(revision 7014)
+++ trunk/src/world_entities/terrain.cc	(revision 7046)
@@ -127,14 +127,21 @@
   WorldEntity::loadParams(root);
 
+  LoadParam(root, "scale", this, Terrain, setScale)
+      .describe("The scale in x,y,z direction");
+
+  LoadParam(root, "texture", this, Terrain, loadTexture)
+      .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)") ;
 
-
   LoadParam(root, "height-map", this, Terrain, loadHeightMap)
       .describe("The HeightMap, splitted into two strings seperated by ','. 1: HeighMap, 2: ColorMap");
 
-
-  LoadParam(root, "heigt-texture", this, Terrain, loadTexture)
-      .describe("The name of the Texture for this heightMap");
+}
+
+void Terrain::setScale(float x, float y, float z)
+{
+  this->terrainScale = Vector(x, y, z);
 }
 
@@ -150,5 +157,6 @@
 
   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());
   heightMap->load();
@@ -164,8 +172,7 @@
       delete this->heightMapMaterial;
 
-delete this->heightMapMaterial;
-
    this->heightMapMaterial = new Material();
-   heightMapMaterial->setTransparency(1.0);
+
+   PRINTF(0)("Load texture: %s\n", textureName);
 
    heightMapMaterial->setDiffuse(1.0,1.0,1.0);
@@ -176,9 +183,6 @@
 
    heightMapMaterial->setDiffuseMap(textureName);
-   heightMapMaterial->setAmbientMap(textureName);
-   heightMapMaterial->setSpecularMap(textureName);
-
-
-
+//    heightMapMaterial->setAmbientMap(textureName);
+//    heightMapMaterial->setSpecularMap(t extureName);
 }
 
@@ -219,44 +223,40 @@
   else if (this->getModel())
     this->getModel()->draw();
+
   if (this->vegetation)
     this->vegetation->draw();
 
-  if(this->heightMap)
-        {
-        this->heightMapMaterial->select();
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-        glEnable(GL_LIGHTING);
-        glColorMaterial ( GL_FRONT_AND_BACK, GL_EMISSION ) ;
-        glEnable (GL_COLOR_MATERIAL) ;
-        this->heightMap->draw();
-        }
+  if( this->heightMap)
+  {
+    this->heightMapMaterial->select();
+
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+    this->heightMap->draw();
+  }
   glPopMatrix();
 
 
-
-
-
- glMatrixMode(GL_MODELVIEW);
-glPushMatrix();
-glLoadIdentity();
- Vector camera =   State::getCameraNode()->getAbsCoor(); // Go on here ..........!!!
-
-    /*
-    float height =    heightMap->getHeight(camera.x, camera.z);
-
+/*
+  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 */
+  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();
