Index: /orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc
===================================================================
--- /orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc	(revision 4223)
+++ /orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc	(revision 4224)
@@ -41,4 +41,5 @@
 sAnim MD2Model2::animationList[21] =
   {
+ // begin, end, fps 
     {   0,  39,  9 },   // STAND
     {  40,  45, 10 },   // RUN
@@ -511,5 +512,5 @@
   
   this->textureID = 0;
-  this->scaleFactor = 1.0f;
+  this->scaleFactor = 0.001f;
 
   this->setAnim(STAND);
@@ -552,4 +553,5 @@
   this->numFrames = header.numFrames;
   this->numVertices = header.numVertices;
+  this->numTriangles = header.numTriangles;
   this->numGLCommands = header.numGlCommands;
   /* allocate memory for the data storage */
@@ -583,5 +585,5 @@
 	  pVertex[i][0] = (frame->pVertices[i].v[0] * frame->scale[0]) + frame->translate[0];
 	  pVertex[i][1] = (frame->pVertices[i].v[1] * frame->scale[1]) + frame->translate[1];
-	  pVertex[i][2] = (frame->pVertices[i].v[2] * frame->scale[2]) + frame->translate[2];	  
+	  pVertex[i][2] = (frame->pVertices[i].v[2] * frame->scale[2]) + frame->translate[2];
 
 	  pNormals[i] = frame->pVertices[i].lightNormalIndex;
@@ -617,19 +619,28 @@
   nextVec = &this->pVertices[this->numVertices * this->animationState.nextFrame];
 
-  //printf("currVec: %f, %f, %f\n", currVec[0][0], currVec[0][1], currVec[0][2]);
-  //printf("nextVec: %f, %f, %f\n", nextVec[0], nextVec[1], nextVec[2]);
+    printf("currVec: %f, %f, %f\n", currVec[0][0], currVec[0][1], currVec[0][2]);
+    printf("nextVec: %f, %f, %f\n", nextVec[0][0], nextVec[1][1], nextVec[2][2]);
   
-  for(int i = 0; i < this->numFrames; ++i)
-    {
-      /*
-      verticesList[i][0] = this->pVertices[i + (this->numFrames * this->animationState.currentFrame)][0] * this->scaleFactor;
-      verticesList[i][1] = this->pVertices[i + (this->numFrames * this->animationState.currentFrame)][1] * this->scaleFactor;
-      verticesList[i][2] = this->pVertices[i + (this->numFrames * this->animationState.currentFrame)][2] * this->scaleFactor;
-      */
-
-      verticesList[i][0] = (currVec[i][0] + this->animationState.interpolationState * (nextVec[i][0] - currVec[i][0])) * this->scaleFactor;
-      verticesList[i][1] = (currVec[i][1] + this->animationState.interpolationState * (nextVec[i][1] - currVec[i][1])) * this->scaleFactor;
-      verticesList[i][2] = (currVec[i][2] + this->animationState.interpolationState * (nextVec[i][2] - currVec[i][2])) * this->scaleFactor;
-    }
+    printf("numFrames: %i\n", this->numFrames);
+    printf("currentFrame: %i\n", this->animationState.currentFrame);
+
+    //for(int i = 0; i < this->numFrames; ++i)
+    for(int i = 0; i < this->numVertices; ++i)
+      {	
+	/*
+	verticesList[i][0] = this->pVertices[i + (this->numFrames * this->animationState.currentFrame)][0] * this->scaleFactor;
+	verticesList[i][1] = this->pVertices[i + (this->numFrames * this->animationState.currentFrame)][1] * this->scaleFactor;
+	verticesList[i][2] = this->pVertices[i + (this->numFrames * this->animationState.currentFrame)][2] * this->scaleFactor;
+	*/
+
+
+	verticesList[i][0] = (currVec[i][0] + this->animationState.interpolationState * (nextVec[i][0] - currVec[i][0])) * this->scaleFactor;
+	verticesList[i][1] = (currVec[i][1] + this->animationState.interpolationState * (nextVec[i][1] - currVec[i][1])) * this->scaleFactor;
+	verticesList[i][2] = (currVec[i][2] + this->animationState.interpolationState * (nextVec[i][2] - currVec[i][2])) * this->scaleFactor;
+
+
+	//printf("  pVertices %f, %f, %f\n", pVertices[i][0], pVertices[i][1], pVertices[i][2]);
+	//printf("  list:     %f, %f, %f \n", verticesList[i][0], verticesList[i][1], verticesList[i][2]);      
+      }
 }
 
@@ -639,10 +650,15 @@
   if( (type < 0) || (type > MAX_ANIMATIONS) )
     type = 0;
-  
-  this->animationState.startFrame = animationList[type].firstFrame;
-  this->animationState.endFrame = animationList[type].lastFrame;
-  this->animationState.nextFrame = animationList[type].firstFrame + 1;
-  this->animationState.fps = animationList[type].fps;
-  this->animationState.type = type;
+
+this->animationState.startFrame = animationList[type].firstFrame;
+this->animationState.endFrame = animationList[type].lastFrame;
+this->animationState.nextFrame = animationList[type].firstFrame + 1;
+this->animationState.fps = animationList[type].fps;
+this->animationState.type = type;
+
+this->animationState.interpolationState = 0.0;
+this->animationState.localTime = 0.0;
+this->animationState.lastTime = 0.0;
+this->animationState.currentFrame = animationList[type].firstFrame;
 }
 
@@ -670,9 +686,10 @@
 
 
-/* hhmmm... id used a very different way to do lightning...*/
+/* hhmmm... id used a very different way to do lightning... */
 void MD2Model2::processLighting()
 {
   shadeDots = anormsDots[((int)(md2Angle*(SHADEDOT_QUANT / 360.0)))&(SHADEDOT_QUANT - 1)];
 }
+
 
 void MD2Model2::tick(float time)
@@ -696,4 +713,28 @@
 
   glPopMatrix();
+}
+
+
+void MD2Model2::draw2()
+{
+  glBegin(GL_TRIANGLES);
+  for(int j = 0; j < this->numTriangles; j++)
+    {
+      for(int whichVertex = 0; whichVertex < 3; whichVertex++)
+	{
+	  /*
+	  int index = pObject->pFaces[j].vertIndex[whichVertex];
+	  int index2 = pObject->pFaces[j].coordIndex[whichVertex];
+	  glNormal3f(-pObject->pNormals[index].x, -pObject->pNormals[index].y, -pObject->pNormals[index].z);
+	  
+	  if( likely(pObject->pTexVerts != NULL)) 
+	    {
+	      glTexCoord2f(pObject->pTexVerts[index2].x, pObject->pTexVerts[index2].y);
+	    }
+	  glVertex3f(pObject->pVerts[index].x, pObject->pVerts[index].y, pObject->pVerts[index].z);
+	  */
+	}
+    }
+  glEnd();
 }
 
@@ -716,6 +757,7 @@
   /* draw the triangles */
   /* \todo: take int i out of while loop */
-  while( int i = *(pCommands++)) /* strange looking while loop for maximum performance */
-    {
+  while( false /*int i = *(pCommands++)*/) /* strange looking while loop for maximum performance */
+    {
+      int i;
       if( i < 0)
 	{
@@ -737,4 +779,6 @@
 	  glTexCoord2f( ((float *)pCommands)[0], ((float *)pCommands)[1] );
 	  glVertex3fv(verticesList[pCommands[2]]);
+
+	  //printf("draw vert: %f, %f, %f\n", verticesList[pCommands[2]][0], verticesList[pCommands[2]][1], verticesList[pCommands[2]][2] );
 	}
       glEnd();
Index: /orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.h
===================================================================
--- /orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.h	(revision 4223)
+++ /orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.h	(revision 4224)
@@ -2,16 +2,16 @@
     \file md2Model.h
     \brief Definition of an MD2 Model, a model format invented by ID Software.
-	
-	We are deeply thankfull for all the wunderfull things id software made for us gamers!
-
-	The md2 file format is structured in a very simple way: it contains animations which are made out of
-	frames (so called keyframes). Each frame is a complete draweable model in a specific position.
-	A frame is a collection of vertex and its compagnions (normals, texture coordinates).
-	
-	A typical model has about 200 frames, the maximum frame count is fixed by MD2_MAX_FRAMES to currently 
-	512 frames. The maximal vetices count is set to 2048 verteces, not enough?
-	You just have to change the MD2_MAX_* values if it doesn't fit your purposes...
-
-	Surface Culling is fully implemented in md2 models: quake2 uses front face culling.
+    
+    We are deeply thankfull for all the wunderfull things id software made for us gamers!
+    
+    The md2 file format is structured in a very simple way: it contains animations which are made out of
+    frames (so called keyframes). Each frame is a complete draweable model in a specific position.
+    A frame is a collection of vertex and its compagnions (normals, texture coordinates).
+    
+    A typical model has about 200 frames, the maximum frame count is fixed by MD2_MAX_FRAMES to currently 
+    512 frames. The maximal vetices count is set to 2048 verteces, not enough?
+    You just have to change the MD2_MAX_* values if it doesn't fit your purposes...
+    
+    Surface Culling is fully implemented in md2 models: quake2 uses front face culling.
 */
 
@@ -187,4 +187,5 @@
   void drawFrame(int frame);
   void draw();
+  void draw2();
   
   void setAnim(int type);
@@ -209,4 +210,5 @@
   int numFrames;
   int numVertices;
+  int numTriangles;
   int numGLCommands;
 
@@ -219,4 +221,5 @@
   sAnimState animationState;
   float scaleFactor;
+  //tMd2Header* header;
 };
 
Index: /orxonox/branches/md2_loader/src/world_entities/test_entity.cc
===================================================================
--- /orxonox/branches/md2_loader/src/world_entities/test_entity.cc	(revision 4223)
+++ /orxonox/branches/md2_loader/src/world_entities/test_entity.cc	(revision 4224)
@@ -42,5 +42,5 @@
 void TestEntity::tick (float time) 
 {
-  this->md2Model2->tick(time);
+  //this->md2Model2->tick(time);
 }
 
@@ -72,4 +72,5 @@
 
   this->md2Model2->draw();
+  
 
   glPopMatrix();
