Index: orxonox/branches/md2_loader/src/lib/graphics/importer/abstract_model.h
===================================================================
--- orxonox/branches/md2_loader/src/lib/graphics/importer/abstract_model.h	(revision 4145)
+++ orxonox/branches/md2_loader/src/lib/graphics/importer/abstract_model.h	(revision 4146)
@@ -23,9 +23,11 @@
 
 #include "stdincl.h"
+#include "base_object.h"
+#include <vector>
 
-#include "base_object.h"
+using namespace std;
 
 //template<class T> class tList;
-template<class T> class vector;
+;
 
 //! This is our 3D point class.  CONFLICTING with Vector.cc
@@ -94,7 +96,7 @@
 	int currentAnim;					// The current index into pAnimations list (NEW)
 	int currentFrame;					// The current frame of the current animation (NEW)
-	vector<tAnimationInfo>* animationList; // The list of animations (NEW)
-	vector<tMaterialInfo>* materialList;	// The list of material information (Textures and colors)
-	vector<t3DObject>* objectList;			// The object list for our model
+	vector<tAnimationInfo> animationList; // The list of animations (NEW)
+	vector<tMaterialInfo> materialList;	// The list of material information (Textures and colors)
+	vector<t3DObject> objectList;			// The object list for our model
 };
 
Index: orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc
===================================================================
--- orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc	(revision 4145)
+++ orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc	(revision 4146)
@@ -19,5 +19,4 @@
 #include <fstream>
 #include <string>
-
 #include <vector>
 
@@ -56,7 +55,7 @@
 void MD2Model::draw(t3DModel *pModel)
 {
-  if( pModel->objectList->size() <= 0) return;
-
-  t3DObject *pObject = pModel->objectList->firstElement();
+  if( pModel->objectList.size() <= 0) return;
+
+  t3DObject *pObject = &pModel->objectList[0];
   glBegin(GL_TRIANGLES);
   for(int j = 0; j < pObject->numOfFaces; j++)
@@ -112,9 +111,4 @@
 bool MD2Loader::importMD2(t3DModel *pModel, char *fileName, char *textureName)
 {
-
-  pModel->animationList = new vector<tAnimationInfo>();
-  pModel->objectList = new vector<t3DObject>();
-  pModel->materialList = new vector<tMaterialInfo>();
-
   this->pFile = fopen(fileName, "rb");
   if( unlikely(!pFile)) 
@@ -136,12 +130,12 @@
   if( likely((int)textureName))
     {
-      tMaterialInfo* textureInfo = new tMaterialInfo;
-      strcpy(textureInfo->strFile, textureName);
+      tMaterialInfo textureInfo;
+      strcpy(textureInfo.strFile, textureName);
       /* since there is only one texture for a .Md2 file, the ID is always 0 */
-      textureInfo->texureId = 0;
-      textureInfo->uTile = 1;
+      textureInfo.texureId = 0;
+      textureInfo.uTile = 1;
       /* we only have 1 material for a model */
       pModel->numOfMaterials = 1;
-      pModel->materialList->add(textureInfo);
+      pModel->materialList.push_back(textureInfo);
     }
 	
@@ -200,5 +194,5 @@
 void MD2Loader::parseAnimations(t3DModel *pModel)
 {
-  tAnimationInfo* animationInfo = new tAnimationInfo;
+  tAnimationInfo animationInfo;
   string strLastName = "";
 
@@ -231,11 +225,11 @@
 	  if( strLastName != "")
 	    {
-	      strcpy(animationInfo->strName, strLastName.c_str());
-	      animationInfo->endFrame = i;
-	      pModel->animationList->add(animationInfo);
+	      strcpy(animationInfo.strName, strLastName.c_str());
+	      animationInfo.endFrame = i;
+	      pModel->animationList.push_back(animationInfo);
 	      memset(&animationInfo, 0, sizeof(tAnimationInfo));
 	      pModel->numOfAnimations++;
 	    }
-	  animationInfo->startFrame = frameNum - 1 + i;
+	  animationInfo.startFrame = frameNum - 1 + i;
 	}
       strLastName = strName;
@@ -258,17 +252,17 @@
   for (i = 0; i < pModel->numOfObjects; i++)
     {
-      t3DObject* currentFrame = new t3DObject;
-
-      currentFrame->numOfVerts = this->header.numVertices;
-      currentFrame->numTexVertex = this->header.numTexCoords;
-      currentFrame->numOfFaces = this->header.numTriangles;
-
-      currentFrame->pVerts = new CVector3[currentFrame->numOfVerts];
-
-      for (j = 0; j < currentFrame->numOfVerts; j++)
-	{
-	  currentFrame->pVerts[j].x = this->pFrames[i].pVertices[j].vertex[0];
-	  currentFrame->pVerts[j].y = this->pFrames[i].pVertices[j].vertex[1];
-	  currentFrame->pVerts[j].z = this->pFrames[i].pVertices[j].vertex[2];
+      t3DObject currentFrame;
+
+      currentFrame.numOfVerts = this->header.numVertices;
+      currentFrame.numTexVertex = this->header.numTexCoords;
+      currentFrame.numOfFaces = this->header.numTriangles;
+
+      currentFrame.pVerts = new CVector3[currentFrame.numOfVerts];
+
+      for (j = 0; j < currentFrame.numOfVerts; j++)
+	{
+	  currentFrame.pVerts[j].x = this->pFrames[i].pVertices[j].vertex[0];
+	  currentFrame.pVerts[j].y = this->pFrames[i].pVertices[j].vertex[1];
+	  currentFrame.pVerts[j].z = this->pFrames[i].pVertices[j].vertex[2];
 	}
 
@@ -277,28 +271,28 @@
       if( likely(i > 0))
 	{
-	  pModel->objectList->add(currentFrame);
+	  pModel->objectList.push_back(currentFrame);
 	  continue;
 	}
 			
-      currentFrame->pTexVerts = new CVector2[currentFrame->numTexVertex];
-      currentFrame->pFaces = new tFace[currentFrame->numOfFaces];
-
-      for(j = 0; j < currentFrame->numTexVertex; j++)
-	{
-	  currentFrame->pTexVerts[j].x = this->pTexCoords[j].u / float(this->header.skinWidth);
-	  currentFrame->pTexVerts[j].y = 1 - this->pTexCoords[j].v / float(this->header.skinHeight);
-	}
-
-      for(j = 0; j < currentFrame->numOfFaces; j++)
-	{
-	  currentFrame->pFaces[j].vertIndex[0] = this->pTriangles[j].vertexIndices[0];
-	  currentFrame->pFaces[j].vertIndex[1] = this->pTriangles[j].vertexIndices[1];
-	  currentFrame->pFaces[j].vertIndex[2] = this->pTriangles[j].vertexIndices[2];
-
-	  currentFrame->pFaces[j].coordIndex[0] = this->pTriangles[j].textureIndices[0];
-	  currentFrame->pFaces[j].coordIndex[1] = this->pTriangles[j].textureIndices[1];
-	  currentFrame->pFaces[j].coordIndex[2] = this->pTriangles[j].textureIndices[2];
-	}
-      pModel->objectList->add(currentFrame);
+      currentFrame.pTexVerts = new CVector2[currentFrame.numTexVertex];
+      currentFrame.pFaces = new tFace[currentFrame.numOfFaces];
+
+      for(j = 0; j < currentFrame.numTexVertex; j++)
+	{
+	  currentFrame.pTexVerts[j].x = this->pTexCoords[j].u / float(this->header.skinWidth);
+	  currentFrame.pTexVerts[j].y = 1 - this->pTexCoords[j].v / float(this->header.skinHeight);
+	}
+
+      for(j = 0; j < currentFrame.numOfFaces; j++)
+	{
+	  currentFrame.pFaces[j].vertIndex[0] = this->pTriangles[j].vertexIndices[0];
+	  currentFrame.pFaces[j].vertIndex[1] = this->pTriangles[j].vertexIndices[1];
+	  currentFrame.pFaces[j].vertIndex[2] = this->pTriangles[j].vertexIndices[2];
+
+	  currentFrame.pFaces[j].coordIndex[0] = this->pTriangles[j].textureIndices[0];
+	  currentFrame.pFaces[j].coordIndex[1] = this->pTriangles[j].textureIndices[1];
+	  currentFrame.pFaces[j].coordIndex[2] = this->pTriangles[j].textureIndices[2];
+	}
+      pModel->objectList.push_back(currentFrame);
     }
 }
