Index: /branches/bsp_model/src/lib/graphics/importer/md3/md3_data.cc
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/md3/md3_data.cc	(revision 8352)
+++ /branches/bsp_model/src/lib/graphics/importer/md3/md3_data.cc	(revision 8353)
@@ -77,10 +77,5 @@
 {
   FILE *pFile;                            //file stream
-  char* buffer;                           //buffer for frame data
-
-
-  sFrame* frame;                          //temp frame
-  sVec3D *pVertex;
-  int* pNormals;
+//  char* buffer;                           //buffer for frame data
 
 
@@ -96,6 +91,6 @@
       return false;
     }
-  this->header = new MD2Header;
-  fread(this->header, 1, sizeof(MD2Header), pFile);
+  this->header = new MD3Header;
+  fread(this->header, 1, sizeof(MD3Header), pFile);
   /* check for the header version: make sure its a md2 file :) */
   if( unlikely(this->header->version != MD2_VERSION) && unlikely(this->header->ident != MD2_IDENT))
@@ -104,4 +99,6 @@
       return false;
     }
+
+
 
 #if 0
@@ -157,5 +154,5 @@
 #endif
 
-  delete [] buffer;
+  //delete [] buffer;
   fclose(pFile);
 
@@ -216,2 +213,3 @@
 
 }
+
Index: /branches/bsp_model/src/lib/graphics/importer/md3/md3_data.h
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/md3/md3_data.h	(revision 8352)
+++ /branches/bsp_model/src/lib/graphics/importer/md3/md3_data.h	(revision 8353)
@@ -47,26 +47,19 @@
 
 //! This holds the header information that is read in at the beginning of the file: id software definition
-struct MD2Header
+struct MD3Header
 {
    int ident;                           //!< This is used to identify the file
    int version;                         //!< The version number of the file (Must be 8)
 
-   int skinWidth;                       //!< The skin width in pixels
-   int skinHeight;                      //!< The skin height in pixels
-   int frameSize;                       //!< The size in bytes the frames are
+   char filename[68];                   //!< The filename of the model
 
-   int numSkins;                        //!< The number of skins associated with the model
-   int numVertices;                     //!< The number of vertices (constant for each frame)
-   int numTexCoords;                    //!< The number of texture coordinates
-   int numTriangles;                    //!< The number of faces (polygons)
-   int numGlCommands;                   //!< The number of gl commands
-   int numFrames;                       //!< The number of animation frames
-
-   int offsetSkins;                     //!< The offset in the file for the skin data
-   int offsetTexCoords;                 //!< The offset in the file for the texture data
-   int offsetTriangles;                 //!< The offset in the file for the face data
-   int offsetFrames;                    //!< The offset in the file for the frames data
-   int offsetGlCommands;                //!< The offset in the file for the gl commands data
-   int offsetEnd;                       //!< The end of the file offset
+   int boneFrameNum;                    //!< number of frames
+   int tagNum;                          //!< number of tags
+   int meshNum;                         //!< number of mesh
+   int maxTexNum;                       //!< number of texture
+   int boneFrameStart;                  //!< start of bone frames
+   int tagStart;                        //!< start of the tag
+   int meshStart;                       //!< mesh start
+   int fileSize;                        //!< file size
 };
 
@@ -99,5 +92,5 @@
   std::string        fileName;              //!< file name of the model File
   std::string        skinFileName;          //!< file name of the skin file
-  MD2Header*         header;                //!< the header file
+  MD3Header*         header;                //!< the header file
 
   sVec3D*            pVertices;             //!< pointer to the vertices data block
Index: /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc	(revision 8352)
+++ /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc	(revision 8353)
@@ -25,6 +25,8 @@
    * md3 model
    */
-  MD3Model::MD3Model(FILE *pFile, int dataOffset)
-  {}
+  MD3Model::MD3Model(std::string filename, float scaling)
+  {
+
+  }
 
 
Index: /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h	(revision 8352)
+++ /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h	(revision 8353)
@@ -10,4 +10,5 @@
 
 #include <string>
+#include "model.h"
 
 
@@ -19,9 +20,9 @@
 {
 
-class MD3Model
+class MD3Model : public Model
 {
 
   public:
-    MD3Model(FILE *pFile, int dataOffset);
+    MD3Model(std::string filename, float scaling);
     ~MD3Model();
 
Index: /branches/bsp_model/src/world_entities/world_entity.cc
===================================================================
--- /branches/bsp_model/src/world_entities/world_entity.cc	(revision 8352)
+++ /branches/bsp_model/src/world_entities/world_entity.cc	(revision 8353)
@@ -22,4 +22,6 @@
 #include "model.h"
 #include "md2/md2Model.h"
+#include "md3/md3_model.h"
+
 #include "util/loading/resource_manager.h"
 #include "util/loading/load_param.h"
@@ -199,4 +201,13 @@
         this->buildObbTree(obbTreeDepth);
     }
+    else if(fileName.find(".md3") != std::string::npos)
+    {
+      PRINTF(4)("fetching MD3 file: %s\n", fileName.c_str());
+      Model* m = new md3::MD3Model(fileName, this->scaling);
+      this->setModel(m, 0);
+
+//       if( m != NULL)
+//         this->buildObbTree(obbTreeDepth);
+    }
   }
   else
