Index: /branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.cc
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.cc	(revision 8654)
+++ /branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.cc	(revision 8655)
@@ -144,5 +144,6 @@
           PRINTF(0)("got footsteps: %s\n", this->footsteps.c_str());
         }
-        else {
+        else
+        {
           // assume it's an animation line
           inHeader = false;
@@ -159,6 +160,7 @@
           // workaround for strange numbering in animation.cfg: skip TORSO frames
           // for LEGS animation lines...
-          if (animation->type == LEGS) {
-                                                //when first LEGS animation is found, calc # of TORSO frames
+          if( animation->type == LEGS)
+          {
+            //when first LEGS animation is found, calc # of TORSO frames
             if( torsoOffset == -1)
               torsoOffset = animation->first - firstTorsoFrame;
@@ -167,5 +169,5 @@
             animation->offset = torsoOffset;
           }
-          else if (animation->type == TORSO)
+          else if( animation->type == TORSO)
             if( firstTorsoFrame == -1)
               firstTorsoFrame = animation->first;
Index: /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc	(revision 8654)
+++ /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc	(revision 8655)
@@ -46,5 +46,5 @@
 
     // set the animation
-    this->interpolate(this->md3Data, this->config->getAnimation("Walk"), REWIND, true);
+    this->interpolate(this->md3Data, this->config->getAnimation("Dead 3"), MD3_ANIM_NEXT, true);
   }
 
@@ -474,5 +474,5 @@
 
     // calc interpolated vertices
-    for( int t = 0; t < vertexNum * 3.0f; t++)
+    for( int t = 0; t < vertexNum; t++)
     {
       data->tmpMesh[i][t][0]  = (1.0f - frac)   * currMeshFrame[t][0]  + frac * nextMeshFrame[t][0];
@@ -580,5 +580,5 @@
   {
      data->animation = anim;
-     if( data->op == NEXT || data->op == PREVIOUS || data->op == REWIND)
+     if( op == MD3_ANIM_NEXT || op == MD3_ANIM_PREVIOUS || op == MD3_ANIM_REWIND)
       data->op = op;
 
@@ -626,9 +626,13 @@
   void MD3Model::doOp(MD3Data* data)
   {
-    return;
     // animation to be applied could have illegal data with respect to this model,
     // ignore anim in this case
-    if( data->animation->first >= data->header->boneFrameNum || data->animation->first < 0)
+
+    if( data->animation->first >= data->animation->numFrames || data->animation->first < 0)
+    {
+      PRINTF(0)("MD3: this animation type seems to be invalid, no animation calculated\n");
       return;
+    }
+
 
     //calc upper bound for animation frames in this model
@@ -636,11 +640,17 @@
       data->upperBound = data->header->boneFrameNum; //use all available frames
     else
-      data->upperBound = data->header->boneFrameNum <
-          (data->animation->first + data->animation->numFrames)?data->header->boneFrameNum:(data->animation->first +
-          data->animation->numFrames);
-
+    {
+      if( data->header->boneFrameNum < (data->animation->first + data->animation->numFrames))
+        data->upperBound = data->header->boneFrameNum;
+      else
+        data->upperBound = (data->animation->first +
+            data->animation->numFrames);
+    }
+
+
+//     PRINTF(0)("anim op: %i\n", data->op);
     switch( data->op) {
 
-      case NEXT:
+      case MD3_ANIM_NEXT:
         if( data->bInterpolate)
         {
@@ -657,7 +667,8 @@
           data->animationState.nextFrame = next(data, data->animationState.nextFrame);
         }
+        PRINTF(0)("interpolate fraction: %f, curr frame: %i\n", data->animationState.interpolationFraction, data->animationState.currentFrame);
         break;
 
-      case PREVIOUS:
+      case MD3_ANIM_PREVIOUS:
         if( data->bInterpolate)
         {
@@ -677,5 +688,5 @@
         break;
 
-      case REWIND:
+      case MD3_ANIM_REWIND:
         data->animationState.currentFrame = data->animation->first;
         data->animationState.nextFrame = next(data, data->animationState.currentFrame);
@@ -683,4 +694,5 @@
         break;
     }
+
   }
 
Index: /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h	(revision 8654)
+++ /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h	(revision 8655)
@@ -31,7 +31,7 @@
 
 typedef enum MD3FrameHandling {
-  NEXT = 0,          //!< swith to the next frame
-  PREVIOUS,          //!< swith to the previous frame
-  REWIND             //!< rewind the animation
+  MD3_ANIM_NEXT = 0,          //!< swith to the next frame
+  MD3_ANIM_PREVIOUS,          //!< swith to the previous frame
+  MD3_ANIM_REWIND             //!< rewind the animation
 };
 
