Index: trunk/src/lib/collision_detection/cd_engine.cc
===================================================================
--- trunk/src/lib/collision_detection/cd_engine.cc	(revision 8802)
+++ trunk/src/lib/collision_detection/cd_engine.cc	(revision 8894)
@@ -84,5 +84,5 @@
         if( likely((*entity2) != this->terrain))
         {
-          PRINTF(4)("checking object %s against %s\n", (*entity1)->getName(), (*entity2)->getName());
+          PRINTF(5)("checking object %s (%s) against %s (%s)\n", (*entity1)->getClassName(), (*entity1)->getName(), (*entity2)->getClassName(), (*entity2)->getName());
           tree = (*entity1)->getOBBTree();
           if( likely(tree != NULL) && (*entity2)->getOBBTree() != NULL)
Index: trunk/src/lib/collision_reaction/collision_event.h
===================================================================
--- trunk/src/lib/collision_reaction/collision_event.h	(revision 8802)
+++ trunk/src/lib/collision_reaction/collision_event.h	(revision 8894)
@@ -9,7 +9,11 @@
 #include "vector.h"
 
+#include "cr_defs.h"
+
+
 class WorldEntity;
 class BoundingVolume;
 class Plane;
+
 
 
@@ -22,9 +26,9 @@
 
   /** collides two WorldEntities @param entityA world entity A, @param entityB world entity B, @param bvA volume A @param bvB volumeB */
-  inline void collide(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
-  { this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; }
+  inline void collide(int type, WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
+  { this->collisionType = type; this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; }
   /** collides two WorldEntities @param entity world entity , @param ground ground plane, @param position position on the ground */
-  inline void collide(WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position)
-  { this->entityA = entity; this->entityB = groundEntity, this->groundNormal = normal; this->position = position; }
+  inline void collide(int type, WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall)
+  { this->collisionType = type; this->entityA = entity; this->entityB = groundEntity, this->groundNormal = normal; this->position = position; this->bInWall = bInWall; }
 
 
@@ -44,4 +48,11 @@
   inline Vector getCollisionPosition() { return this->position; }
 
+  /** @return the type of the collision */
+  inline int getType() { return this->collisionType; }
+
+  /** @return true if the entity is in the wall */
+  inline bool isInWall() { return this->bInWall; }
+
+
  private:
   WorldEntity*      entityA;                       //!< the collision body A
@@ -53,4 +64,7 @@
   Vector            groundNormal;                  //!< the ground plane with which it collides (only for bsp-model collisions
   Vector            position;                      //!< position of the collision on the ground plane
+
+  bool              bInWall;                       //!< true if is in wall
+  int               collisionType;                 //!< collision type
 };
 
Index: trunk/src/lib/collision_reaction/cr_defs.h
===================================================================
--- trunk/src/lib/collision_reaction/cr_defs.h	(revision 8802)
+++ trunk/src/lib/collision_reaction/cr_defs.h	(revision 8894)
@@ -28,4 +28,13 @@
 
 
+//!< the collision axis x collision event
+#define COLLISION_TYPE_AXIS_X   1
+//!< the collision axis y collision event
+#define COLLISION_TYPE_AXIS_Y   2
+//!< the collision axis z collision event
+#define COLLISION_TYPE_AXIS_Z   4
+//!< the collision is a obb collision
+#define COLLISION_TYPE_OBB      8
+
 
 #endif /* _NETWORK_MANAGER */
Index: trunk/src/lib/collision_reaction/cr_physics_ground_walk.cc
===================================================================
--- trunk/src/lib/collision_reaction/cr_physics_ground_walk.cc	(revision 8802)
+++ trunk/src/lib/collision_reaction/cr_physics_ground_walk.cc	(revision 8894)
@@ -1,12 +1,12 @@
 /*
    orxonox - the future of 3D-vertical-scrollers
- 
+
    Copyright (C) 2004 orx
- 
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
    any later version.
- 
+
    ### File Specific:
    main-programmer: Patrick Boenzli
@@ -26,5 +26,9 @@
 #include <vector>
 
+#include "debug.h"
+
 #include "aabb.h"
+
+#include "cr_defs.h"
 
 using namespace std;
@@ -64,15 +68,63 @@
   //   collision->getEntityB()->getAbsCoor().debug();
 
-  Vector height;
+  float height;
   AABB* box = collision->getEntityB()->getModelAABB();
-  
-  
-  
-  if(box!=NULL)
+  WorldEntity* entity = collision->getEntityB();
+
+  // collision position maths
+  Vector collPos =  collision->getEntityB()->getAbsCoor()  + box->center - ce->getCollisionPosition();
+
+  float CR_MAX_WALK_HEIGHT = 2.0f;
+  float CR_THRESHOLD = 0.2f;
+
+  if( box == NULL)
+  {
+    PRINTF(2)("this model has no aabb box so there is no correct collision reaction implemented. skipping\n");
+    return;
+  }
+
+
+  switch( ce->getType())
+  {
+    case COLLISION_TYPE_AXIS_Y:
+
+      height = collPos.y - box->halfLength[1];
+     // PRINTF(0)("height: %f          , model height: %f\n", height, box->halfLength[1]);
+     // PRINTF(0)(" ground normal: %f, %f, %f\n", normal.x, normal.y, normal.z);
+
+      // object is beneath the plane (ground)
+      if( height <= 0.0f )
+      {
+        entity->shiftCoor(Vector(0, -height, 0));
+      }
+      // object is already in the wall
+      else if( ce->isInWall())
+      {
+        entity->setAbsCoor(entity->getLastAbsCoor());
+      }
+      break;
+
+
+    case COLLISION_TYPE_AXIS_X:
+    case COLLISION_TYPE_AXIS_Z:
+      break;
+
+    }
+
+
+
+
+
+
+
+
+#if 0
+  if( box != NULL)
     height = ( ce->getCollisionPosition() - collision->getEntityB()->getAbsCoor() )*(-1.0f) ;
   else
     height = ce->getCollisionPosition() - collision->getEntityB()->getAbsCoor() ;
 
-  if(box!=NULL) {
+
+  if( box != NULL) {
 
 
@@ -90,6 +142,6 @@
       return;
     }
-    
-    
+
+
     if(ce->getGroundNormal().len() >= 1.4f) {
       downspeed++;
@@ -101,5 +153,5 @@
     if(height.y > box->halfLength[1] + 0.0f ) // Above ground
     {
-      if(height.y < box->halfLength[1] + 1.3f) // Snap in
+      if(height.y < box->halfLength[1] + 2.3f) // Snap in
       {
         downspeed = 0;
@@ -116,5 +168,5 @@
       {
         //if(downspeed <= 0) downspeed =1;
-        collision->getEntityB()->setAbsCoor(collision->getEntityB()->getAbsCoor() + Vector(0.0, -height.y  +  box->halfLength[1] + 2.0f/* 0.00001 *//*height.y+3.500005 + 10.0*/,0.0));
+        collision->getEntityB()->setAbsCoor(collision->getEntityB()->getAbsCoor() + Vector(0.0, -height.y  +  box->halfLength[1] + 2.0f,0.0));
         //collision->getEntityB()->setVelocity(Vector(0.0,0.0,0.0));
         downspeed = 0;
@@ -124,4 +176,5 @@
 
   }// if(box!= NULL)
+#endif
   /*
   PRINTF(0)("Collision with Ground: \n");
@@ -131,4 +184,5 @@
 
   */
+
 }
 
@@ -141,9 +195,5 @@
 void CRPhysicsGroundWalk::update(WorldEntity* owner)
 {
-  for( int i = 9; i > 0; i--) {
-    this->lastPositions[i] = this->lastPositions[i-1];
-    //     PRINTF(0)("lastPosition[%i]: %f, %f, %f\n", i, lastPositions[i].x, lastPositions[i].y, lastPositions[i].z);
-  }
-  this->lastPositions[0] = owner->getAbsCoor();
+
 }
 
Index: trunk/src/lib/collision_reaction/cr_physics_ground_walk.h
===================================================================
--- trunk/src/lib/collision_reaction/cr_physics_ground_walk.h	(revision 8802)
+++ trunk/src/lib/collision_reaction/cr_physics_ground_walk.h	(revision 8894)
@@ -23,10 +23,6 @@
     virtual void update(WorldEntity* entity);
 
+
   private:
-    Vector       lastPosition;                //!< vector with the last valid position
-    Vector       afterLastPosition;           //!< vector for the after last
-    Quaternion   lastDirection;               //!< quat with the last valid direction
-
-    Vector       lastPositions[10];           //!< last 10 positions
     float        downspeed;
 };
Index: trunk/src/lib/event/event_handler.cc
===================================================================
--- trunk/src/lib/event/event_handler.cc	(revision 8802)
+++ trunk/src/lib/event/event_handler.cc	(revision 8894)
@@ -357,6 +357,6 @@
   else
   {
-    SDL_WM_GrabInput(SDL_GRAB_ON);
-    SDL_ShowCursor(SDL_DISABLE);
+//     SDL_WM_GrabInput(SDL_GRAB_ON);
+//     SDL_ShowCursor(SDL_DISABLE);
   }
 }
Index: trunk/src/lib/graphics/importer/bsp_file.cc
===================================================================
--- trunk/src/lib/graphics/importer/bsp_file.cc	(revision 8802)
+++ trunk/src/lib/graphics/importer/bsp_file.cc	(revision 8894)
@@ -214,8 +214,8 @@
     bspFile.read(this->visData, size);
 
-    PRINTF(0)("BSP FILE: VisDataSize: %i Bytes. \n", size);
-    PRINTF(0)("BSP FILE: NumVisData: %i. \n", size /1 - 8);
-    PRINTF(0)("BSP FILE: Remainder: %i. \n", size % 1);
-    PRINTF(0)("BSP FILE: VisDataOffset: %i. \n", offset);
+    PRINTF(4)("BSP FILE: VisDataSize: %i Bytes. \n", size);
+    PRINTF(4)("BSP FILE: NumVisData: %i. \n", size /1 - 8);
+    PRINTF(4)("BSP FILE: Remainder: %i. \n", size % 1);
+    PRINTF(4)("BSP FILE: VisDataOffset: %i. \n", offset);
 
     // Get the Textures
@@ -298,5 +298,5 @@
     this->VertexArrayModels  = new VertexArrayModel*[this->numPatches];
 
-    PRINTF(0)("BSP FILE:NumberOfPatches: %i . \n", numPatches);
+    PRINTF(4)("BSP FILE:NumberOfPatches: %i . \n", numPatches);
 
     this->swapAllBspCoordinates();
@@ -308,9 +308,9 @@
     }
 
-    PRINTF(0)("BSP FILE:PatchOffset: %i . \n", this->patchOffset);
+    PRINTF(4)("BSP FILE:PatchOffset: %i . \n", this->patchOffset);
 
     return  1;
   } else {
-    PRINTF(0)("BSP FILE: Datei nicht gefunden. \n");
+    PRINTF(4)("BSP FILE: Datei nicht gefunden. \n");
     return -1;
   }
@@ -323,13 +323,13 @@
 {
 
-  PRINTF(0)("BSP FILE:\n");
-  PRINTF(0)("BSP FILE: Building Tree...\n");
+  PRINTF(4)("BSP FILE:\n");
+  PRINTF(4)("BSP FILE: Building Tree...\n");
   root = this->build_tree_rec(0);
-  PRINTF(0)("BSP FILE: ...done. \n");
-  PRINTF(0)("BSP FILE:  \n");
-  PRINTF(0)("BSP FILE: Node #0: \n");
-  PRINTF(0)("BSP FILE:  x: %f \n",root->plane.x);
-  PRINTF(0)("BSP FILE:  y: %f\n",root->plane.y);
-  PRINTF(0)("BSP FILE:  z: %f\n",root->plane.z);
+  PRINTF(4)("BSP FILE: ...done. \n");
+  PRINTF(4)("BSP FILE:  \n");
+  PRINTF(4)("BSP FILE: Node #0: \n");
+  PRINTF(4)("BSP FILE:  x: %f \n",root->plane.x);
+  PRINTF(4)("BSP FILE:  y: %f\n",root->plane.y);
+  PRINTF(4)("BSP FILE:  z: %f\n",root->plane.z);
 }
 
@@ -400,5 +400,5 @@
   this->Materials = new AMat[this->numTextures];
   for(int i = 0 ; i < this->numTextures; i++) {
-    PRINTF(0)("BSP FILE: Texture : %s. \n", &this->textures[8+ 72*i]);
+    PRINTF(4)("BSP FILE: Texture : %s. \n", &this->textures[8+ 72*i]);
 
 
@@ -429,10 +429,10 @@
     strncat (fileName, ext, strlen(fileName) );
 
-    PRINTF(0)("BSP FILE: Name %s . \n", fileName);
+    PRINTF(4)("BSP FILE: Name %s . \n", fileName);
 
     absFileName = ResourceManager::getFullName(fileName);
 
     if(File(absFileName).exists()) {
-      PRINTF(0)("BSP FILE: gefunden . \n");
+      PRINTF(4)("BSP FILE: gefunden . \n");
       this->Materials[i] = this->loadAVI(fileName);
       continue;
@@ -449,5 +449,5 @@
 
     if(File(absFileName).exists()) {
-      PRINTF(0)("BSP FILE: gefunden . \n");
+      PRINTF(4)("BSP FILE: gefunden . \n");
       this->Materials[i] = this->loadAVI(fileName);
       continue;
@@ -479,5 +479,5 @@
 
     if(File(absFileName).exists()) {
-      PRINTF(0)("BSP FILE: gefunden . \n");
+      PRINTF(4)("BSP FILE: gefunden . \n");
       this->Materials[i] = this->loadMat(fileName);
       continue;
@@ -492,5 +492,5 @@
 
     if(File(absFileName).exists()/*stat( absFileName.c_str() , &results) == 0*/) {
-      PRINTF(0)("BSP FILE: gefunden . \n");
+      PRINTF(4)("BSP FILE: gefunden . \n");
       this->Materials[i] = this->loadMat(fileName);
       continue;
@@ -504,5 +504,5 @@
     absFileName = ResourceManager::getFullName(fileName);
     if(File(absFileName).exists()) {
-      PRINTF(0)("BSP FILE: gefunden . \n");
+      PRINTF(4)("BSP FILE: gefunden . \n");
       this->Materials[i] =this->loadMat(fileName);
       continue;
@@ -518,5 +518,5 @@
     absFileName = ResourceManager::getFullName(fileName);
     if(File(absFileName).exists()) {
-      PRINTF(0)("BSP FILE: gefunden . \n");
+      PRINTF(4)("BSP FILE: gefunden . \n");
       this->Materials[i] =this->loadMat(fileName);
       continue;
@@ -534,5 +534,5 @@
 
     if(File(absFileName).exists()) {
-      PRINTF(0)("BSP FILE: gefunden . \n");
+      PRINTF(4)("BSP FILE: gefunden . \n");
       this->Materials[i] =this->loadMat(fileName);
       continue;
@@ -548,10 +548,10 @@
 
     if(File(absFileName).exists()) {
-      PRINTF(0)("BSP FILE: gefunden . \n");
+      PRINTF(4)("BSP FILE: gefunden . \n");
       this->Materials[i] = this->loadMat(fileName);
       continue;
     }
 
-
+    PRINTF(0)("BSP FILE: Textur %s nicht  gefunden . \n", &this->textures[8+72*i]);
     //  Default Material
     this->Materials[i].mat = new Material();
@@ -1012,6 +1012,6 @@
   Face->meshvert = patchOffset -sz;  //3*(patchOffset-sz)*level1*level1;
   Face->n_meshverts = sz;
-  PRINTF(0)("BSP FILE: sz: %i. \n", sz);
-  PRINTF(0)("BSP FILE: Face->meshvert %i . \n", Face->meshvert);
+  PRINTF(4)("BSP FILE: sz: %i. \n", sz);
+  PRINTF(4)("BSP FILE: Face->meshvert %i . \n", Face->meshvert);
 
   //Face->n_meshverts = sz;
Index: trunk/src/lib/graphics/importer/bsp_manager.cc
===================================================================
--- trunk/src/lib/graphics/importer/bsp_manager.cc	(revision 8802)
+++ trunk/src/lib/graphics/importer/bsp_manager.cc	(revision 8894)
@@ -45,5 +45,5 @@
 
 #include "aabb.h"
-
+#include "cr_defs.h"
 
 
@@ -912,13 +912,11 @@
 {
   leaf& curLeaf = this->bspFile->leaves[node->leafIndex];
-  for(int i = 0; i < curLeaf.n_leaffaces ; i++) {
-  }
+  for(int i = 0; i < curLeaf.n_leaffaces ; i++) {}
   return 10.0f;
 }
 
 void BspManager::checkCollisionBox(void)
-{
-}
-;
+{}
+
 
 void BspManager::TraceBox( Vector& inputStart, Vector& inputEnd,
@@ -954,54 +952,44 @@
 
 
-  Vector forwardDir = worldEntity->getAbsDirX();
-
-
-  Vector upDir = worldEntity->getAbsDirY();
-  upDir.x = 0.0;
-  upDir.y = 1.0;
-  upDir.z = 0.0;
-  Vector dest;
-   
-
-  Vector position = worldEntity->getAbsCoor();       //+ upDir*10.0f ;
-  dest = worldEntity->getAbsCoor() - upDir*40.0f; //
-  Vector out = dest;
-
-
+  Vector forwardDir = Vector(0.0,0.0,1.0);
+  Vector upDir = Vector(0.0,1.0,0.0);
+  Vector position = worldEntity->getAbsCoor();
+
+  bool SolidFlag = false;
   bool collision = false;
   Vector position1 = position;
   Vector position2 = position + Vector(0.0,1.0,0.0);
+  Vector dest = worldEntity->getAbsCoor() - upDir*40.0f; //
   Vector dest1 = position + forwardDir*4.0f;
   Vector dest2 = position2 + forwardDir;
   dest = position - Vector(0.0, 40.0,0.0);
+  Vector out = dest;
   Vector out1;
   Vector out2;
 
- 
+
 
   float height = 40;
-  
-  
-  if( box != NULL)
-  {
+
+
+  if( box != NULL) {
     position = worldEntity->getAbsCoor() +  box->center; // + box->axis[1] * box->halfLength[1];
     dest     = worldEntity->getAbsCoor() +  box->center - box->axis[1] * box->halfLength[1] * 40.0;
-    
+
     position1 = worldEntity->getAbsCoor() +  box->center + box->axis[0] * box->halfLength[0] * 2.0f;
     dest1     = worldEntity->getAbsCoor() +  box->center - box->axis[0] * box->halfLength[0] *2.0f;
-    
-        
+
+
     position2 = worldEntity->getAbsCoor() +  box->center + box->axis[2] * box->halfLength[2] * 2.0f;
     dest2     = worldEntity->getAbsCoor() +  box->center - box->axis[2] * box->halfLength[2] * 2.0f;
-    
-  }
-  else
-  {
-    
-  }
-
-  
-  
-  //
+
+  } else {
+    // Init positions and destinations to anything useful!
+
+  }
+
+
+
+  // 1st Ray
   this->inputStart =  position;
   this->inputEnd =   dest;
@@ -1025,10 +1013,11 @@
         this->collPlane->z = 0.0f;
         collision = true;
-      } else 
+        SolidFlag = true;
+      } else
         collision = false;
-        
-        
-        out = dest;
-      
+
+
+      out = dest;
+
     } else {
       collision = true;
@@ -1046,27 +1035,51 @@
   plane* testPlane = this->collPlane;
 
-  
-  // 2nd Collision Detection
-  this->outputStartsOut = true;
-  this->outputAllSolid = false;
-  this->outputFraction = 1.0f;
-  this->inputStart =  position1;
-  this->inputEnd =   dest1;
-  this->checkCollisionRayN(this->root,0.0f,1.0f, &position1, &dest1 );
-  out.x = this->outputFraction;
-  //out.z = this->outputFraction;
-  
-  
-    // 3rd Collision Detection
-  this->outputStartsOut = true;
-  this->outputAllSolid = false;
-  this->outputFraction = 1.0f;
-  this->inputStart =  position2;
-  this->inputEnd =   dest2;
-  this->checkCollisionRayN(this->root,0.0f,1.0f, &position2, &dest2 );
-  //out.x = this->outputFraction;
-  out.z = this->outputFraction;
-  
-
+
+  bool xCollision = false;
+  bool zCollision = false;
+  if(!SolidFlag) {
+
+    // 2nd Collision Detection
+    this->outputStartsOut = true;
+    this->outputAllSolid = false;
+    this->outputFraction = 1.0f;
+    this->inputStart =  position1;
+    this->inputEnd =   dest1;
+    this->checkCollisionRayN(this->root,0.0f,1.0f, &position1, &dest1 );
+
+    if(!this->outputAllSolid != 1.0f) {
+      out.x = dest1.x + (dest1.x -position1.x) * this->outputFraction;
+      xCollision = true;
+      testPlane = this->collPlane;
+    }
+    if(this->outputAllSolid) {
+      SolidFlag = true;
+      xCollision = true;  
+    }
+    //out.z = this->outputFraction;
+
+    if(!SolidFlag) {
+
+      // 3rd Collision Detection
+      this->outputStartsOut = true;
+      this->outputAllSolid = false;
+      this->outputFraction = 1.0f;
+      this->inputStart =  position2;
+      this->inputEnd =   dest2;
+      this->checkCollisionRayN(this->root,0.0f,1.0f, &position2, &dest2 );
+      //out.x = this->outputFraction;
+
+      if(this->outputFraction != 1.0f ) {
+        out.z = out.z = dest2.z + (dest2.z -position2.z) * this->outputFraction;
+        zCollision = true;
+        testPlane = this->collPlane;
+
+      }
+      if(this->outputAllSolid) {
+          SolidFlag = true;
+          zCollision = true;   
+      }
+    }
+  }//end if
   /*
   This is how you would calculate the Coordinates where worldEntity Collided with the BSP world.
@@ -1077,10 +1090,15 @@
 
   // Return the normal here: Normal's stored in this->collPlane;
-  if( collision) 
-  {
+  if( collision) {
     PRINTF(5)("We got a collision!! Are you sure: outputFraction = %f\n", this->outputFraction);
-    worldEntity->registerCollision(this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out);
-  } 
-  else  worldEntity->registerCollision(this->parent, worldEntity, Vector(0.0, 2.0, 0.0), dest);
+    worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y || (xCollision ? COLLISION_TYPE_AXIS_X :0) | (zCollision ? COLLISION_TYPE_AXIS_Z :0), this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag);
+  } else {
+    if(xCollision || zCollision) {
+
+      worldEntity->registerCollision((xCollision ? COLLISION_TYPE_AXIS_X :0) | (zCollision ? COLLISION_TYPE_AXIS_Z :0) , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag);
+    }
+
+  }
+  //else  worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y, this->parent, worldEntity, Vector(0.0, 2.0, 0.0), dest, false);
 
 }
Index: trunk/src/lib/graphics/importer/interactive_model.h
===================================================================
--- trunk/src/lib/graphics/importer/interactive_model.h	(revision 8802)
+++ trunk/src/lib/graphics/importer/interactive_model.h	(revision 8894)
@@ -37,5 +37,8 @@
 
     virtual void setAnimation(int animNum, int playbackMode = 0) = 0;
+    virtual void setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback) {}
     virtual int getAnimation() = 0;
+
+    virtual void setAnimationSpeed(float speed) {}
 };
 
Index: trunk/src/lib/graphics/importer/md2/md2Model.cc
===================================================================
--- trunk/src/lib/graphics/importer/md2/md2Model.cc	(revision 8802)
+++ trunk/src/lib/graphics/importer/md2/md2Model.cc	(revision 8894)
@@ -103,4 +103,6 @@
   this->pModelInfo.pTexCoor = (float*)this->data->pTexCoor;
 
+  this->animationSpeed = 1.0f;
+
   // triangle conversion
   this->pModelInfo.pTriangles = new sTriangleExt[this->data->numTriangles];
@@ -159,4 +161,27 @@
 
 /**
+ * sets the animation type
+ * @param firstFrame: index of the first frame
+ * @param lastFrame: index of the last frame
+ * @param fps: frames per second
+ * @param bStoppable: is 1 if so, 0 else
+ */
+void MD2Model::setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback)
+{
+  this->animationState.startFrame = firstFrame;
+  this->animationState.endFrame = lastFrame;
+  this->animationState.nextFrame = firstFrame + 1;
+  this->animationState.fps = fps;
+  this->animationState.type = 0;
+  this->animationState.numPlays = 0;
+  this->animationState.animPlaybackMode = animPlayback;
+
+  this->animationState.interpolationState = 0.0f;
+  this->animationState.localTime = 0.0f;
+  this->animationState.lastTime = 0.0f;
+  this->animationState.currentFrame = firstFrame;
+}
+
+/**
   \brief sets the animation type
 * @param type: animation type
@@ -196,5 +221,5 @@
 void MD2Model::tick(float time)
 {
-  this->animate(time);
+  this->animate(time * this->animationSpeed);
   this->processLighting();
   this->interpolate(/*this->verticesList*/);
Index: trunk/src/lib/graphics/importer/md2/md2Model.h
===================================================================
--- trunk/src/lib/graphics/importer/md2/md2Model.h	(revision 8802)
+++ trunk/src/lib/graphics/importer/md2/md2Model.h	(revision 8894)
@@ -69,5 +69,5 @@
 
 //! animation names enumeration
-typedef enum animType
+typedef enum MD2animType
   {
     STAND,                       //0
@@ -156,8 +156,9 @@
   void renderFrameTriangles() const;
 
-
   virtual void setAnimation(int type, int animPlayback = MD2_ANIM_LOOP);
+  virtual void setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback);
   /**  returns the current animation @returns animation type */
   inline int MD2Model::getAnimation() { return this->animationState.type; }
+  virtual void setAnimationSpeed(float speed) { this->animationSpeed = speed; }
   /**  scales the current model @param scaleFactor: the factor [0..1] to use for scaling */
   void scaleModel(float scaleFactor) { this->scaleFactor = scaleFactor;}
@@ -186,4 +187,5 @@
  private:
   float               scaleFactor;                      //!< the scale factor (individual)
+  float               animationSpeed;                   //!< the speed of the animation (factor for the time)
   sAnimState          animationState;                   //!< animation state of the model
   sVec3D              verticesList[MD2_MAX_VERTICES];   //!< place to temp sav the vert
Index: trunk/src/lib/math/quaternion.h
===================================================================
--- trunk/src/lib/math/quaternion.h	(revision 8802)
+++ trunk/src/lib/math/quaternion.h	(revision 8894)
@@ -51,5 +51,5 @@
   inline bool operator== (const Quaternion& q) const { return (unlikely(this->v==q.v&&this->w==q.w))?true:false; };
   /** @param q: the Quaternion to compare with this one. @returns true if the Quaternions are the same, false otherwise */
-  inline bool operator!= (const Quaternion& q) const { return (unlikely(this->v!=q.v&&this->w!=q.w))?true:false; };
+  inline bool operator!= (const Quaternion& q) const { return (unlikely(this->v!=q.v||this->w!=q.w))?true:false; };
   /** @param f: a real value @return a Quaternion containing the quotient */
   inline Quaternion operator/ (const float& f) const { return (unlikely(f==0.0)) ? Quaternion() : Quaternion(this->v/f, this->w/f); };
Index: trunk/src/lib/math/vector.h
===================================================================
--- trunk/src/lib/math/vector.h	(revision 8802)
+++ trunk/src/lib/math/vector.h	(revision 8894)
@@ -47,5 +47,5 @@
   inline bool operator== (const Vector& v) const { return (this->x==v.x&&this->y==v.y&&this->z==v.z)?true:false; };
   /** @param v: the Vecor to compare with this one @returns true, if the Vecors are different, false otherwise */
-  inline bool operator!= (const Vector& v) const { return (this->x!=v.x&&this->y!=v.y&&this->z!=v.z)?true:false; };
+  inline bool operator!= (const Vector& v) const { return (this->x!=v.x||this->y!=v.y||this->z!=v.z)?true:false; };
   /** @param index The index of the "array" @returns the x/y/z coordinate */
   inline float operator[] (float index) const {if( index == 0) return this->x; if( index == 1) return this->y; if( index == 2) return this->z; }
Index: trunk/src/lib/script_engine/script_manager.h
===================================================================
--- trunk/src/lib/script_engine/script_manager.h	(revision 8802)
+++ trunk/src/lib/script_engine/script_manager.h	(revision 8894)
@@ -1,4 +1,4 @@
 /*!
- * @file scrip_manager.h
+ * @file script_manager.h
  *  manages the scripts
  */
Index: trunk/src/lib/shell/shell_command.cc
===================================================================
--- trunk/src/lib/shell/shell_command.cc	(revision 8802)
+++ trunk/src/lib/shell/shell_command.cc	(revision 8894)
@@ -373,5 +373,6 @@
     else
     {
-      delete this->completors[parameter];
+      if(this->completors[parameter] == NULL)
+      //delete this->completors[parameter];
       this->completors[parameter] = completorPlugin.clone();
     }
Index: trunk/src/lib/util/executor/executor.cc
===================================================================
--- trunk/src/lib/util/executor/executor.cc	(revision 8802)
+++ trunk/src/lib/util/executor/executor.cc	(revision 8894)
@@ -31,5 +31,7 @@
                    const MultiType& param2,
                    const MultiType& param3,
-                   const MultiType& param4)
+                   const MultiType& param4,
+                   const MultiType& param5,
+                   const MultiType& param6)
 {
   this->setClassID(CL_EXECUTOR, "Executor");
@@ -41,4 +43,6 @@
   this->defaultValue[3] = param3;
   this->defaultValue[4] = param4;
+  this->defaultValue[5] = param5;
+  this->defaultValue[6] = param6;
 
   this->paramCount = 0;
@@ -83,5 +87,7 @@
                                   const MultiType& value2,
                                   const MultiType& value3,
-                                  const MultiType& value4)
+                                  const MultiType& value4,
+                                  const MultiType& value5,
+                                  const MultiType& value6)
 {
   if (this == NULL)
@@ -94,5 +100,6 @@
   value[3] = &value3;
   value[4] = &value4;
-
+  value[5] = &value5;
+  value[6] = &value6;
   for (unsigned int i = 0; i < this->paramCount; i++)
   {
Index: trunk/src/lib/util/executor/executor.h
===================================================================
--- trunk/src/lib/util/executor/executor.h	(revision 8802)
+++ trunk/src/lib/util/executor/executor.h	(revision 8894)
@@ -47,5 +47,6 @@
     Executor* defaultValues(const MultiType& value0 = MT_NULL, const MultiType& value1 = MT_NULL,
                             const MultiType& value2 = MT_NULL, const MultiType& value3 = MT_NULL,
-                            const MultiType& value4 = MT_NULL);
+                            const MultiType& value4 = MT_NULL, const MultiType& param5 = MT_NULL,
+                            const MultiType& param6 = MT_NULL);
     /** @param i the i'th defaultValue, @returns reference to the MultiType */
     inline MultiType& getDefaultValue(unsigned int i) { return defaultValue[i]; };
@@ -68,5 +69,6 @@
     Executor(const MultiType& param0 = MT_NULL, const MultiType& param1 = MT_NULL,
              const MultiType& param2 = MT_NULL, const MultiType& param3 = MT_NULL,
-             const MultiType& param4 = MT_NULL);
+             const MultiType& param4 = MT_NULL, const MultiType& param5 = MT_NULL,
+             const MultiType& param6 = MT_NULL);
 
     void cloning(Executor* executor) const;
@@ -75,5 +77,5 @@
     short                       functorType;      //!< The type of Function we've got (either static or objective).
     unsigned int                paramCount;       //!< the count of parameters.
-    MultiType                   defaultValue[5];  //!< Default Values.
+    MultiType                   defaultValue[7];  //!< Default Values.
 };
 
Index: trunk/src/lib/util/executor/executor_functional.cc
===================================================================
--- trunk/src/lib/util/executor/executor_functional.cc	(revision 8802)
+++ trunk/src/lib/util/executor/executor_functional.cc	(revision 8894)
@@ -15,5 +15,5 @@
 
 #include "executor.h"
-std::string ExecutorFunctional_returningString_from[5];
+std::string ExecutorFunctional_returningString_from[7];
 
 
Index: trunk/src/lib/util/executor/executor_lua.cc
===================================================================
--- trunk/src/lib/util/executor/executor_lua.cc	(revision 8802)
+++ trunk/src/lib/util/executor/executor_lua.cc	(revision 8894)
@@ -20,5 +20,5 @@
 #include "lunar.h"
 
-std::string temp[5];
+std::string temp[7];
 
 template<typename type> type fromLua(lua_State* state, int index) { type *obj = Lunar<type>::check(state, 1); lua_remove(state, 1); return obj;};
Index: trunk/src/lib/util/executor/executor_lua.h
===================================================================
--- trunk/src/lib/util/executor/executor_lua.h	(revision 8802)
+++ trunk/src/lib/util/executor/executor_lua.h	(revision 8894)
@@ -233,4 +233,54 @@
 
 
+///////////
+//// 4 ////
+///////////
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename type0, typename type1, typename type2, typename type3> class ExecutorLua4 : public Executor
+{
+  public:
+    /**
+   * @brief Constructor of a ExecutorXML
+   * @param function a Function to call
+     */
+    ExecutorLua4(void(T::*function)(type0, type1, type2, type3))
+  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>())
+    {
+      this->functionPointer = function;
+      this->functorType = Executor_Objective | Executor_NoLoadString;
+    }
+
+    /**
+     * @brief executes the Command on BaseObject
+     * @param object the BaseObject to execute this Executor on
+     * @param loadString ignored in this case
+     */
+    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+    {
+      PRINTF(1)("no usefull executor\n");
+    }
+
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 0;
+
+      (dynamic_cast<T*>(object)->*(functionPointer))(
+          fromLua<type0>(state, 1),
+          fromLua<type1>(state, 2),
+          fromLua<type2>(state, 3),
+          fromLua<type3>(state, 4) );
+    }
+
+    /**
+     * @returns a _new_ Copy of this Executor
+     */
+    virtual Executor* clone () const
+    {
+      return new ExecutorLua4<T, type0, type1, type2, type3>(this->functionPointer);
+    }
+  private:
+    void          (T::*functionPointer)(type0, type1, type2, type3);
+};
 
 
@@ -388,3 +438,271 @@
 };
 
+
+///////////
+//// 3 ////
+///////////
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename ret, typename type0, typename type1, typename type2> class ExecutorLua3ret : public Executor
+{
+  public:
+    /**
+   * @brief Constructor of a ExecutorXML
+   * @param function a Function to call
+     */
+    ExecutorLua3ret(ret (T::*function)(type0, type1, type2))
+  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>())
+    {
+      this->functionPointer = function;
+      this->functorType = Executor_Objective | Executor_NoLoadString;
+    }
+
+    /**
+     * @brief executes the Command on BaseObject
+     * @param object the BaseObject to execute this Executor on
+     * @param loadString ignored in this case
+     */
+    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+    {
+      PRINTF(1)("no usefull executor\n");
+    }
+
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 1;
+
+      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+          fromLua<type0>(state, 1),
+          fromLua<type1>(state, 2),
+          fromLua<type2>(state, 3) ));
+    }
+
+    /**
+     * @returns a _new_ Copy of this Executor
+     */
+    virtual Executor* clone () const
+    {
+      return new ExecutorLua3ret<T, ret, type0, type1, type2>(this->functionPointer);
+    }
+  private:
+    ret          (T::*functionPointer)(type0, type1, type2);
+};
+
+
+///////////
+//// 4 ////
+///////////
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename ret, typename type0, typename type1, typename type2, typename type3> class ExecutorLua4ret : public Executor
+{
+  public:
+    /**
+   * @brief Constructor of a ExecutorXML
+   * @param function a Function to call
+     */
+    ExecutorLua4ret(ret (T::*function)(type0, type1, type2, type3))
+  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>())
+    {
+      this->functionPointer = function;
+      this->functorType = Executor_Objective | Executor_NoLoadString;
+    }
+
+    /**
+     * @brief executes the Command on BaseObject
+     * @param object the BaseObject to execute this Executor on
+     * @param loadString ignored in this case
+     */
+    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+    {
+      PRINTF(1)("no usefull executor\n");
+    }
+
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 1;
+
+      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+          fromLua<type0>(state, 1),
+          fromLua<type1>(state, 2),
+          fromLua<type2>(state, 3),
+          fromLua<type3>(state, 4) ));
+    }
+
+    /**
+     * @returns a _new_ Copy of this Executor
+     */
+    virtual Executor* clone () const
+    {
+      return new ExecutorLua4ret<T, ret, type0, type1, type2, type3>(this->functionPointer);
+    }
+  private:
+    ret          (T::*functionPointer)(type0, type1, type2, type3);
+};
+
+///////////
+//// 5 ////
+///////////
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename ret, typename type0, typename type1, typename type2, typename type3, typename type4> class ExecutorLua5ret : public Executor
+{
+  public:
+    /**
+   * @brief Constructor of a ExecutorXML
+   * @param function a Function to call
+     */
+    ExecutorLua5ret(ret (T::*function)(type0, type1, type2, type3, type4))
+  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), ExecutorParamType<type4>())
+    {
+      this->functionPointer = function;
+      this->functorType = Executor_Objective | Executor_NoLoadString;
+    }
+
+    /**
+     * @brief executes the Command on BaseObject
+     * @param object the BaseObject to execute this Executor on
+     * @param loadString ignored in this case
+     */
+    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+    {
+      PRINTF(1)("no usefull executor\n");
+    }
+
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 1;
+
+      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+          fromLua<type0>(state, 1),
+          fromLua<type1>(state, 2),
+          fromLua<type2>(state, 3),
+          fromLua<type3>(state, 4),
+          fromLua<type4>(state, 5) ));
+    }
+
+    /**
+     * @returns a _new_ Copy of this Executor
+     */
+    virtual Executor* clone () const
+    {
+      return new ExecutorLua5ret<T, ret, type0, type1, type2, type3, type4>(this->functionPointer);
+    }
+  private:
+    ret          (T::*functionPointer)(type0, type1, type2, type3, type4);
+};
+
+///////////
+//// 6 ////
+///////////
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename ret, typename type0, typename type1, typename type2, typename type3, typename type4, typename type5> class ExecutorLua6ret : public Executor
+{
+  public:
+    /**
+   * @brief Constructor of a ExecutorXML
+   * @param function a Function to call
+     */
+    ExecutorLua6ret(ret (T::*function)(type0, type1, type2, type3, type4, type5))
+  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(),
+             ExecutorParamType<type2>(), ExecutorParamType<type3>(),
+             ExecutorParamType<type4>(), ExecutorParamType<type5>())
+    {
+      this->functionPointer = function;
+      this->functorType = Executor_Objective | Executor_NoLoadString;
+    }
+
+    /**
+     * @brief executes the Command on BaseObject
+     * @param object the BaseObject to execute this Executor on
+     * @param loadString ignored in this case
+     */
+    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+    {
+      PRINTF(1)("no usefull executor\n");
+    }
+
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 1;
+
+      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+          fromLua<type0>(state, 1),
+          fromLua<type1>(state, 2),
+          fromLua<type2>(state, 3),
+          fromLua<type3>(state, 4),
+          fromLua<type4>(state, 5),
+          fromLua<type5>(state, 6) ));
+    }
+
+    /**
+     * @returns a _new_ Copy of this Executor
+     */
+    virtual Executor* clone () const
+    {
+      return new ExecutorLua6ret<T, ret, type0, type1, type2, type3, type4, type5>(this->functionPointer);
+    }
+  private:
+    ret           (T::*functionPointer)(type0, type1, type2, type3, type4, type5);
+};
+
+///////////
+//// 7 ////
+///////////
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename ret, typename type0, typename type1, typename type2, typename type3, typename type4, typename type5, typename type6> class ExecutorLua7ret : public Executor
+{
+  public:
+    /**
+   * @brief Constructor of a ExecutorXML
+   * @param function a Function to call
+     */
+    ExecutorLua7ret(ret (T::*function)(type0, type1, type2, type3, type4, type5, type6))
+  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(),
+             ExecutorParamType<type2>(), ExecutorParamType<type3>(),
+             ExecutorParamType<type4>(), ExecutorParamType<type5>(),
+             ExecutorParamType<type6>())
+             {
+               this->functionPointer = function;
+               this->functorType = Executor_Objective | Executor_NoLoadString;
+             }
+
+    /**
+              * @brief executes the Command on BaseObject
+              * @param object the BaseObject to execute this Executor on
+              * @param loadString ignored in this case
+     */
+             virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+             {
+               PRINTF(1)("no usefull executor\n");
+             }
+
+             virtual void operator()(BaseObject* object, int& count, void* values) const
+             {
+               lua_State* state = (lua_State*)values;
+               count = 1;
+
+               toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+                   fromLua<type0>(state, 1),
+                   fromLua<type1>(state, 2),
+                   fromLua<type2>(state, 3),
+                   fromLua<type3>(state, 4),
+                   fromLua<type4>(state, 5),
+                   fromLua<type5>(state, 6),
+                   fromLua<type6>(state, 7) ));
+             }
+
+    /**
+              * @returns a _new_ Copy of this Executor
+     */
+             virtual Executor* clone () const
+             {
+               return new ExecutorLua7ret<T, ret, type0, type1, type2, type3, type4, type5, type6>(this->functionPointer);
+             }
+  private:
+    ret           (T::*functionPointer)(type0, type1, type2, type3, type4, type5, type6);
+};
+
+
 #endif /* _EXECUTOR_LUA_H */
Index: trunk/src/lib/util/executor/functor_list.h
===================================================================
--- trunk/src/lib/util/executor/functor_list.h	(revision 8802)
+++ trunk/src/lib/util/executor/functor_list.h	(revision 8894)
@@ -29,5 +29,5 @@
 
 //! defines the maximum count of arguments function pointers might have
-#define FUNCTOR_MAX_ARGUMENTS                5
+#define FUNCTOR_MAX_ARGUMENTS                7
 #include "multi_type.h"
 
