Index: orxonox/branches/md2_loader/src/Makefile.in
===================================================================
--- orxonox/branches/md2_loader/src/Makefile.in	(revision 4147)
+++ orxonox/branches/md2_loader/src/Makefile.in	(revision 4148)
@@ -223,5 +223,4 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
Index: orxonox/branches/md2_loader/src/lib/graphics/importer/abstract_model.h
===================================================================
--- orxonox/branches/md2_loader/src/lib/graphics/importer/abstract_model.h	(revision 4147)
+++ orxonox/branches/md2_loader/src/lib/graphics/importer/abstract_model.h	(revision 4148)
@@ -25,4 +25,5 @@
 #include "base_object.h"
 #include <vector>
+#include <math.h>
 
 using namespace std;
@@ -111,3 +112,69 @@
 };
 
+
+/* TESTING TESTING TESTING */
+/* some mathematical functions that are already implemented by vector.cc class */
+
+// magnitude of a normal
+#define Mag(Normal) (sqrt(Normal.x*Normal.x + Normal.y*Normal.y + Normal.z*Normal.z))
+
+// vector between two points
+CVector3 VectorDiff(CVector3 vPoint1, CVector3 vPoint2)
+{
+	CVector3 vVector;							
+
+	vVector.x = vPoint1.x - vPoint2.x;			
+	vVector.y = vPoint1.y - vPoint2.y;			
+	vVector.z = vPoint1.z - vPoint2.z;			
+
+	return vVector;								
+}
+
+// adding vectors, returning result
+CVector3 AddVector(CVector3 vVector1, CVector3 vVector2)
+{
+	CVector3 vResult;							
+	
+	vResult.x = vVector2.x + vVector1.x;		
+	vResult.y = vVector2.y + vVector1.y;		
+	vResult.z = vVector2.z + vVector1.z;		
+
+	return vResult;
+}
+
+// This divides a vector by a single number (scalar) and returns the result
+CVector3 DivideVectorByScaler(CVector3 vVector1, float Scaler)
+{
+	CVector3 vResult;							
+	
+	vResult.x = vVector1.x / Scaler;			
+	vResult.y = vVector1.y / Scaler;		
+	vResult.z = vVector1.z / Scaler;
+
+	return vResult;	
+}
+
+// cross product between 2 vectors
+CVector3 CrossProduct(CVector3 vVector1, CVector3 vVector2)
+{
+	CVector3 vCross;	
+	vCross.x = ((vVector1.y * vVector2.z) - (vVector1.z * vVector2.y));
+	vCross.y = ((vVector1.z * vVector2.x) - (vVector1.x * vVector2.z));
+	vCross.z = ((vVector1.x * vVector2.y) - (vVector1.y * vVector2.x));
+	return vCross;	
+}
+
+// calculate the normal of a vector
+CVector3 NormalizeVector(CVector3 vNormal)
+{
+	double Magnitude;
+	Magnitude = Mag(vNormal);	
+	vNormal.x /= (float)Magnitude;	
+	vNormal.y /= (float)Magnitude;	
+	vNormal.z /= (float)Magnitude;	
+
+	return vNormal;	
+}
+
+
 #endif /* _ABSTRACT_MODEL_H */
Index: orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc
===================================================================
--- orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc	(revision 4147)
+++ orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc	(revision 4148)
@@ -307,5 +307,63 @@
 */
 void MD2Loader::computeNormals(t3DModel *pModel)
-{}
+{
+	CVector3 vVector1, vVector2, vNormal, vPoly[3];
+
+	if( unlikely(pModel->numOfObjects <= 0))
+		return;
+	/* now computing face normals: this means just averaging the vertex normals of a face */
+	/* so for every object: */
+	for(int index = 0; index < pModel->numOfObjects; index++)
+	{
+		t3DObject *pObject = &(pModel->objectList[index]);
+
+		/* allocate all the memory we need to calculate the normals */
+		CVector3 *pNormals = new CVector3 [pObject->numOfFaces];
+		CVector3 *pTempNormals = new CVector3 [pObject->numOfFaces];
+		pObject->pNormals = new CVector3 [pObject->numOfVerts];
+
+		for(int i=0; i < pObject->numOfFaces; i++)
+		{
+		    /* cache the points to make coding easier :) */
+			vPoly[0] = pObject->pVerts[pObject->pFaces[i].vertIndex[0]];
+			vPoly[1] = pObject->pVerts[pObject->pFaces[i].vertIndex[1]];
+			vPoly[2] = pObject->pVerts[pObject->pFaces[i].vertIndex[2]];
+
+			vVector1 = VectorDiff(vPoly[0], vPoly[2]);		
+			vVector2 = VectorDiff(vPoly[2], vPoly[1]);		
+			
+			vNormal  = CrossProduct(vVector1, vVector2);		
+			pTempNormals[i] = vNormal;					
+			vNormal  = NormalizeVector(vNormal);				
+
+			pNormals[i] = vNormal;
+		}
+
+		/* now calculating vertex normals */
+		CVector3 vSum = {0.0, 0.0, 0.0};
+		CVector3 vZero = vSum;
+		int shared=0;
+
+		for (i = 0; i < pObject->numOfVerts; i++)			
+		{
+			for (int j = 0; j < pObject->numOfFaces; j++)	
+			{												
+					if (pObject->pFaces[j].vertIndex[0] == i || 
+					pObject->pFaces[j].vertIndex[1] == i || 
+					pObject->pFaces[j].vertIndex[2] == i)
+				{
+					vSum = AddVector(vSum, pTempNormals[j]);
+					shared++;												}
+			}      
+			pObject->pNormals[i] = DivideVectorByScaler(vSum, float(-shared));
+			pObject->pNormals[i] = NormalizeVector(pObject->pNormals[i]);	
+
+			vSum = vZero;									
+			shared = 0;										
+		}
+		delete [] pTempNormals;
+		delete [] pNormals;
+	}
+}
 
 
Index: orxonox/branches/md2_loader/src/subprojects/benchmark.cc
===================================================================
--- orxonox/branches/md2_loader/src/subprojects/benchmark.cc	(revision 4147)
+++ orxonox/branches/md2_loader/src/subprojects/benchmark.cc	(revision 4148)
@@ -33,5 +33,6 @@
 #include "player.h"
 #include "base_object.h"
-
+#include "debug.h"
+#include "stdincl.h"
 #include <asm/msr.h>
 #include <linux/timex.h>
@@ -465,5 +466,5 @@
 int startBenchmarks()
 {
-  PRINTF(1)("Benchmark is not implemented in this system\n");
+  //PRINTF(1)("Benchmark is not implemented in this system\n");
 }
 
Index: orxonox/branches/md2_loader/src/util/resource_manager.cc
===================================================================
--- orxonox/branches/md2_loader/src/util/resource_manager.cc	(revision 4147)
+++ orxonox/branches/md2_loader/src/util/resource_manager.cc	(revision 4148)
@@ -20,5 +20,5 @@
 // different resource Types
 #include "objModel.h"
-#include "md2Model.h"
+//#include "md2Model.h"
 #include "primitive_model.h"
 #include "texture.h"
