Index: branches/height_map1/src/lib/graphics/importer/Makefile.am
===================================================================
--- trunk/src/lib/graphics/importer/Makefile.am	(revision 5866)
+++ branches/height_map1/src/lib/graphics/importer/Makefile.am	(revision 5940)
@@ -10,5 +10,6 @@
                            material.cc \
                            texture.cc \
-                           texture_sequence.cc
+                           texture_sequence.cc \
+			   height_map.cc
 
 
@@ -23,3 +24,4 @@
                  texture_sequence.h \
                  anorms.h \
-                 anormtab.h
+                 anormtab.h \
+		 height_map.h
Index: branches/height_map1/src/story_entities/world.cc
===================================================================
--- trunk/src/story_entities/world.cc	(revision 5866)
+++ branches/height_map1/src/story_entities/world.cc	(revision 5940)
@@ -380,7 +380,8 @@
 
   //        TrackManager::getInstance()->setBindSlave(env);
-  PNode* tn = TrackManager::getInstance()->getTrackNode();
-  tn->addChild(this->localPlayer);
-
+  //PNode* tn = TrackManager::getInstance()->getTrackNode();
+  //tn->addChild(this->localPlayer);
+
+  PNode* tn = this->localPlayer;
   //localCamera->setParent(TrackNode::getInstance());
   tn->addChild(this->localCamera);
Index: branches/height_map1/src/world_entities/player.cc
===================================================================
--- trunk/src/world_entities/player.cc	(revision 5866)
+++ branches/height_map1/src/world_entities/player.cc	(revision 5940)
@@ -282,10 +282,10 @@
   //orthDirection = orthDirection.cross (direction);
 
-  if( this->bUp && this->getRelCoor().x < 20)
+  if( this->bUp )
     accel += direction;
-  if( this->bDown && this->getRelCoor().x > -5)
+  if( this->bDown )
     accel -= direction;
 
-  if( this->bLeft && TrackManager::getInstance()->getWidth() > -this->getRelCoor().z*2)
+  if( this->bLeft )
   {
     accel -=(orthDirection);
@@ -293,5 +293,5 @@
     rotVal -= .4;
   }
-  if( this->bRight && TrackManager::getInstance()->getWidth() > this->getRelCoor().z*2)
+  if( this->bRight )
   {
     accel += orthDirection;
Index: branches/height_map1/src/world_entities/terrain.cc
===================================================================
--- trunk/src/world_entities/terrain.cc	(revision 5866)
+++ branches/height_map1/src/world_entities/terrain.cc	(revision 5940)
@@ -24,6 +24,7 @@
 #include "resource_manager.h"
 #include "model.h"
-
+#include "height_map.h"
 #include "glincl.h"
+
 
 using namespace std;
@@ -36,9 +37,75 @@
 Terrain::Terrain (const TiXmlElement* root)
 {
+
   this->init();
-  this->loadParams(root);
-
-//  if (this->model != NULL)
-    //this->ssp = new SpatialSeparation((AbstractModel*)this->model, 10.0f);
+  
+  // this->loadParams(root);
+
+ HeightMap * hm = new HeightMap();
+ hm->load();
+ this->model=hm;
+
+ /*	this->model =  new HeightMap();
+   this->model->setName("HardCore");
+  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->addVertexNormal (0.0, 0.0, 1.0);
+  this->model->addVertexNormal (0.0, 0.0, 1.0);
+  this->model->addVertexNormal (0.0, 0.0, 1.0);
+  this->model->addVertexNormal (0.0, 0.0, 1.0);
+  this->model->addVertexNormal (0.0, 1.0, 0.0);
+  this->model->addVertexNormal (0.0, 1.0, 0.0);
+  this->model->addVertexNormal (0.0, 1.0, 0.0);
+  this->model->addVertexNormal (0.0, 1.0, 0.0);
+  this->model->addVertexNormal (0.0, 0.0, -1.0);
+  this->model->addVertexNormal (0.0, 0.0, -1.0);
+  this->model->addVertexNormal (0.0, 0.0, -1.0);
+  this->model->addVertexNormal (0.0, 0.0, -1.0);
+  this->model->addVertexNormal (0.0, -1.0, 0.0);
+  this->model->addVertexNormal (0.0, -1.0, 0.0);
+  this->model->addVertexNormal (0.0, -1.0, 0.0);
+  this->model->addVertexNormal (0.0, -1.0, 0.0);
+  this->model->addVertexNormal (1.0, 0.0, 0.0);
+  this->model->addVertexNormal (1.0, 0.0, 0.0);
+  this->model->addVertexNormal (1.0, 0.0, 0.0);
+  this->model->addVertexNormal (1.0, 0.0, 0.0);
+  this->model->addVertexNormal (-1.0, 0.0, 0.0);
+  this->model->addVertexNormal (-1.0, 0.0, 0.0);
+  this->model->addVertexNormal (-1.0, 0.0, 0.0);
+  this->model->addVertexNormal (-1.0, 0.0, 0.0);
+
+  this->model->addFace (4, VERTEX_TEXCOORD_NORMAL, 0,0,0, 1,1,1, 3,3,2, 2,2,3);
+  this->model->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,2,4, 3,3,5, 5,5,6, 4,4,7);
+  this->model->addFace (4, VERTEX_TEXCOORD_NORMAL, 4,4,8, 5,5,9, 7,7,10, 6,6,11);
+  this->model->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,6,12, 7,7,13, 1,9,14, 0,8,15);
+  this->model->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,1,16, 7,10,17, 5,11,18, 3,3,19);
+  this->model->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,12,20, 0,0,21, 2,2,22, 4,13,23);
+
+      this->model->finalize(); */
+   
+ /*if (this->model != NULL)
+    this->ssp = new SpatialSeparation((AbstractModel*)this->model, 10.0f);*/
 }
 
@@ -56,5 +123,6 @@
   if (!strstr(fileName, ".obj") || !strstr(fileName, ".OBJ") )
     {
-      this->loadModel(fileName);
+      this->model = NULL;
+	//this->loadModel(fileName);
     }
   else
@@ -135,5 +203,5 @@
   Vector tmpRot = this->getAbsDir().getSpacialAxis();
   glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
-
+  this->model->draw();
   if (this->objectList)
     glCallList(this->objectList);
@@ -145,6 +213,6 @@
 
   /* THIS IS ONLY FOR DEBUGGING INFORMATION */
-  if (this->ssp != NULL)
-    this->ssp->drawQuadtree();
+ // if (this->ssp != NULL)
+ //   this->ssp->drawQuadtree();
 }
 
