Index: /branches/christmas_branche/src/lib/graphics/importer/md2Model.cc
===================================================================
--- /branches/christmas_branche/src/lib/graphics/importer/md2Model.cc	(revision 6206)
+++ /branches/christmas_branche/src/lib/graphics/importer/md2Model.cc	(revision 6207)
@@ -33,10 +33,4 @@
   #include "anormtab.h"
 };
-
-//! again one of these strange id software parts
-static float *shadeDots = MD2Model::anormsDots[0];
-
-
-static sVec3D verticesList[MD2_MAX_VERTICES];
 
 
@@ -90,4 +84,5 @@
   this->scaleFactor = this->data->scaleFactor;
 
+  shadeDots = MD2Model::anormsDots[0];
   /* set the animation stat mannualy */
   this->animationState.type = STAND;
@@ -111,10 +106,10 @@
 /**
  *  initializes an array of vert with the current frame scaled vertices
- * @param verticesList: the list of vertices to interpolate between
+ * @param this->verticesList: the list of vertices to interpolate between
 
    we won't use the pVertices array directly, since its much easier and we need
    saving of data anyway
 */
-void MD2Model::interpolate(/*sVec3D* verticesList*/)
+void MD2Model::interpolate(/*sVec3D* this->verticesList*/)
 {
   sVec3D* currVec;
@@ -126,7 +121,7 @@
   for( int i = 0; i < this->data->numVertices; ++i)
     {
-      verticesList[i][0] = currVec[i][0] + this->animationState.interpolationState * (nextVec[i][0] - currVec[i][0]);
-      verticesList[i][1] = currVec[i][1] + this->animationState.interpolationState * (nextVec[i][1] - currVec[i][1]);
-      verticesList[i][2] = currVec[i][2] + this->animationState.interpolationState * (nextVec[i][2] - currVec[i][2]);
+      this->verticesList[i][0] = currVec[i][0] + this->animationState.interpolationState * (nextVec[i][0] - currVec[i][0]);
+      this->verticesList[i][1] = currVec[i][1] + this->animationState.interpolationState * (nextVec[i][1] - currVec[i][1]);
+      this->verticesList[i][2] = currVec[i][2] + this->animationState.interpolationState * (nextVec[i][2] - currVec[i][2]);
     }
 }
@@ -172,5 +167,5 @@
   this->animate(time);
   this->processLighting();
-  this->interpolate(/*verticesList*/);
+  this->interpolate(/*this->verticesList*/);
 }
 
@@ -185,5 +180,5 @@
   glPushMatrix();
   this->renderFrame();
-//   renderFrameTriangles();
+  // renderFrameTriangles();
   glPopMatrix();
 }
@@ -222,5 +217,5 @@
           glTexCoord2f( ((float *)pCommands)[0], ((float *)pCommands)[1] );
           glNormal3fv(anorms[this->data->pLightNormals[pCommands[2]]]);
-          glVertex3fv(verticesList[pCommands[2]]);
+          glVertex3fv(this->verticesList[pCommands[2]]);
         }
       glEnd();
@@ -234,5 +229,5 @@
 void MD2Model::renderFrameTriangles() const
 {
-  //static sVec3D verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */
+  //static sVec3D this->verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */
   int* pCommands = this->data->pGLCommands;
   /* some face culling stuff */
@@ -243,5 +238,5 @@
 //
 //   this->processLighting();
-//   this->interpolate(/*verticesList*/);
+//   this->interpolate(/*this->verticesList*/);
   this->data->material->select();
 
Index: /branches/christmas_branche/src/lib/graphics/importer/md2Model.h
===================================================================
--- /branches/christmas_branche/src/lib/graphics/importer/md2Model.h	(revision 6206)
+++ /branches/christmas_branche/src/lib/graphics/importer/md2Model.h	(revision 6207)
@@ -241,4 +241,6 @@
   static float        anormsDots[SHADEDOT_QUANT][256];  //!< the anormals dot products
   static sAnim        animationList[21];                //!< the anomation list
+   //! again one of these strange id software parts
+  float*              shadeDots;
 
   MD2Data*            data;                             //!< the md2 data pointer
@@ -247,4 +249,5 @@
   float               scaleFactor;                      //!< the scale factor (individual)
   sAnimState          animationState;                   //!< animation state of the model
+  sVec3D              verticesList[MD2_MAX_VERTICES];   //!< place to temp sav the vert
 };
 
Index: /branches/christmas_branche/src/world_entities/test_entity.cc
===================================================================
--- /branches/christmas_branche/src/world_entities/test_entity.cc	(revision 6206)
+++ /branches/christmas_branche/src/world_entities/test_entity.cc	(revision 6207)
@@ -18,4 +18,7 @@
 
 
+#include "executor/executor.h"
+#include "factory.h"
+
 #include "test_entity.h"
 #include "stdincl.h"
@@ -28,52 +31,59 @@
 
 
+CREATE_FACTORY(TestEntity, CL_TEST_ENTITY);
+
 
 TestEntity::TestEntity ()
 {
-  this->setClassID(CL_TEST_ENTITY, "TestEntity");
-  // TO SOME LIST!!
+  this->init();
+}
 
-  this->md2Model = new MD2Model("models/droidika.md2", "models/droideka.pcx");
-//   this->md2Model = new MD2Model("models/tris.md2", "models/tris.pcx");
-// this->md2Model = new MD2Model("models/goblin.md2", "maps/goblin.bmp");
 
-/// FIXME
-//  this->obbTree = new OBBTree(4, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices);
 
-  this->md2Model->setAnim(RUN);
-  this->md2Model->debug();
+TestEntity::TestEntity(const TiXmlElement* root)
+{
+  this->init();
+  if (root != NULL)
+    this->loadParams(root);
+
+  this->init();
 }
 
 
 TestEntity::~TestEntity ()
+{}
+
+
+
+void TestEntity::init()
 {
-  delete this->md2Model;
+  this->setClassID(CL_TEST_ENTITY, "TestEntity");
+  this->toList(OM_COMMON);
+}
+
+/**
+ * loads the Settings of a MD2Creature from an XML-element.
+ * @param root the XML-element to load the MD2Creature's properties from
+ */
+void TestEntity::loadParams(const TiXmlElement* root)
+{
+  static_cast<WorldEntity*>(this)->loadParams(root);
 }
 
 
 void  TestEntity::setAnim(int animationIndex)
-{
-  this->md2Model->setAnim(animationIndex);
-}
+{}
 
 
 void TestEntity::tick (float time)
 {
-  this->md2Model->tick(time);
+  if( likely(this->getModel(0) != NULL))
+    ((MD2Model*)this->getModel(0))->tick(time);
+
 }
 
 
 void TestEntity::collidesWith(WorldEntity* entity, const Vector& location)
-{
-  if (entity->isA(CL_PROJECTILE))
-  {
-    PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getName(), entity->getName(), location.x, location.y, location.z);
-  this->setVisibiliy(false);
-  this->toList(OM_DEAD);
-  }
-}
-
-void TestEntity::destroy () {}
-
+{}
 
 
@@ -81,16 +91,5 @@
 void TestEntity::draw () const
 {
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-  float matrix[4][4];
-
-
-  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
-  this->getAbsDir().matrix (matrix);
-  glMultMatrixf((float*)matrix);
-  this->md2Model->draw();
-
-
-  glPopMatrix();
+  this->drawLODsafe();
 }
 
Index: /branches/christmas_branche/src/world_entities/test_entity.h
===================================================================
--- /branches/christmas_branche/src/world_entities/test_entity.h	(revision 6206)
+++ /branches/christmas_branche/src/world_entities/test_entity.h	(revision 6207)
@@ -10,4 +10,5 @@
 struct t3DModel;
 class Material;
+class TiXmlElement;
 
 class TestEntity : public WorldEntity, PhysicsInterface
@@ -17,10 +18,13 @@
  public:
   TestEntity ();
+  TestEntity(const TiXmlElement* root);
   virtual ~TestEntity ();
+
+  void init();
+  void loadParams(const TiXmlElement* root);
 
   void setAnim(int animationIndex);
 
   virtual void tick (float time);
-  virtual void destroy ();
   virtual void collidesWith(WorldEntity* entity, const Vector& location);
   virtual void draw () const;
