Index: /trunk/src/lib/graphics/importer/bsp/bsp_file.cc
===================================================================
--- /trunk/src/lib/graphics/importer/bsp/bsp_file.cc	(revision 10313)
+++ /trunk/src/lib/graphics/importer/bsp/bsp_file.cc	(revision 10314)
@@ -430,5 +430,4 @@
   char fileName [500];
   char ext [500];
-  struct stat results;
 
 
@@ -660,7 +659,7 @@
   int      errorCode = 0;           //!< the error code for the texture loading functions
   unsigned int   lightMap;          //!< the OpenGL texture handle
-  int      mipmapLevel = 0;         //!< the maximum mipmap level for this texture
-  int      mipmapWidth = 0;         //!< the width of the mipmap
-  int      mipmapHight = 0;         //!< the height of the mipmap3
+  //int      mipmapLevel = 0;         //!< the maximum mipmap level for this texture
+  //int      mipmapWidth = 0;         //!< the width of the mipmap
+  //int      mipmapHight = 0;         //!< the height of the mipmap3
   float sc, scale, temp;
   for(int i = 0; i < 128*128*3 ; i++)
@@ -1101,7 +1100,7 @@
   {
     int sto  =  array[0];
-    array[0] =  scale * array[1] ;
-    array[1] =  scale * array[2];
-    array[2] =  scale * sto ;
+    array[0] =  (int) scale * array[1] ;
+    array[1] =  (int) scale * array[2];
+    array[2] =  (int) scale * sto ;
   }
 
Index: /trunk/src/lib/graphics/importer/bsp/bsp_manager.cc
===================================================================
--- /trunk/src/lib/graphics/importer/bsp/bsp_manager.cc	(revision 10313)
+++ /trunk/src/lib/graphics/importer/bsp/bsp_manager.cc	(revision 10314)
@@ -298,8 +298,54 @@
   }//else
 
+
+  // now sort the transparent faces in the right order
+  int size = this->trasparent.size();
+
+  // bubble sort
+  bool hasSwapped = true;
+  Vector v1, v2;
+
+  while( hasSwapped)
+  {
+    hasSwapped = false;
+
+    for( int i = 0; i < size - 1; i++)
+    {
+      // sorting test
+      face& fac1 =  (this->bspFile->faces)[this->trasparent[i]];
+      face& fac2 =  (this->bspFile->faces)[this->trasparent[i+1]];
+
+      // get center of face 1
+      const BspVertex* curVertex = (BspVertex *) this->bspFile->vertice;
+
+      // assign the values of the vertices
+      v1(curVertex[fac1.vertex].position[0], curVertex[fac1.vertex].position[1], curVertex[fac1.vertex].position[2]);
+      v2(curVertex[fac2.vertex].position[0], curVertex[fac2.vertex].position[1], curVertex[fac2.vertex].position[2]);
+      // relativly to observer
+      v1 = this->cam - v1;
+      v2 = this->cam - v2;
+
+      // swap if necessary
+      if( v1 > v2)
+      {
+        // swap elements
+        int tmp = this->trasparent[i+1];
+        this->trasparent[i+1] = this->trasparent[i];
+        this->trasparent[i] = tmp;
+
+        hasSwapped = true;
+      }
+    }
+  }
+
+
+
+  // draw all solid faces
   while(!this->opal.empty()) {
-    this->draw_face(this->opal.front());
-    this->opal.pop_front();
-  }
+    this->draw_face(this->opal.back()); // front()
+    this->opal.pop_back();              // pop_back()
+  }
+
+  // draw all transparent faces
   while(!this->trasparent.empty()) {
     this->draw_face(this->trasparent.back());
Index: /trunk/src/lib/graphics/importer/bsp/bsp_manager.h
===================================================================
--- /trunk/src/lib/graphics/importer/bsp/bsp_manager.h	(revision 10313)
+++ /trunk/src/lib/graphics/importer/bsp/bsp_manager.h	(revision 10314)
@@ -128,6 +128,6 @@
   bool * alreadyVisible;
   // Deques to store the visible faces
-  ::std::deque<int> trasparent; //!< the ones with transparancy go here
-  ::std::deque<int> opal; //!< the others here.
+  ::std::vector<int> trasparent; //!< the ones with transparancy go here
+  ::std::vector<int> opal; //!< the others here.
 
   Vector out;  //!< Stores collision coordinates
Index: /trunk/src/lib/graphics/importer/model.cc
===================================================================
--- /trunk/src/lib/graphics/importer/model.cc	(revision 10313)
+++ /trunk/src/lib/graphics/importer/model.cc	(revision 10314)
@@ -17,5 +17,5 @@
 
 #include "model.h"
-
+#include "debug.h"
 #include "glincl.h"
 
@@ -88,2 +88,20 @@
   glEnd();
 }
+
+
+/**
+ * adds a mounting point to the model
+ * @param up up vector
+ * @param forward forward vector
+ * @param center center vector
+ */
+void Model::addMountPoint(const Vector& up, const Vector& forward, const Vector& center, const std::string& name)
+{
+  mountPointSkeleton mps;
+  mps.up = up;
+  mps.forward = forward;
+  mps.center = center;
+  mps.name = name;
+
+  this->mountPoints.push_back(mps);
+}
Index: /trunk/src/lib/graphics/importer/model.h
===================================================================
--- /trunk/src/lib/graphics/importer/model.h	(revision 10313)
+++ /trunk/src/lib/graphics/importer/model.h	(revision 10314)
@@ -52,7 +52,20 @@
 
 
+//! skeleton informations for all mount points
+typedef struct
+{
+  std::string      name;                 //!< the name of the mount point
+  Vector           up;                   //!< the up vector
+  Vector           forward;              //!< the forward vector
+  Vector           center;               //!< the center vector
+} mountPointSkeleton;
+
+
+
 //! This class defines the basic components of a model
 class Model : virtual public BaseObject {
   ObjectListDeclaration(Model);
+
+  typedef std::list<mountPointSkeleton>   mpList;
 
   public:
@@ -85,4 +98,7 @@
     /** function to extract the mount points from the model data */
     virtual void extractMountPoints() {}
+    /** @returns a list of mounting points */
+    inline const mpList& getMountPoints() const { return this->mountPoints; }
+    void addMountPoint(const Vector& up, const Vector& forward, const Vector& center, const std::string& name);
 
 
@@ -92,5 +108,6 @@
 
   protected:
-    modelInfo      pModelInfo;      //!< Reference to the modelInfo
+    modelInfo                        pModelInfo;      //!< Reference to the modelInfo
+    mpList                           mountPoints;     //!< a list of all mounting point skeletons
 };
 
Index: /trunk/src/lib/graphics/importer/obj/objModel.cc
===================================================================
--- /trunk/src/lib/graphics/importer/obj/objModel.cc	(revision 10313)
+++ /trunk/src/lib/graphics/importer/obj/objModel.cc	(revision 10314)
@@ -44,6 +44,4 @@
 
   this->finalize();
-
-  this->extractMountPoints();
 }
 
Index: /trunk/src/lib/graphics/importer/oif/object_information_file.cc
===================================================================
--- /trunk/src/lib/graphics/importer/oif/object_information_file.cc	(revision 10313)
+++ /trunk/src/lib/graphics/importer/oif/object_information_file.cc	(revision 10314)
@@ -24,4 +24,14 @@
 
 
+
+/**
+ * constructor
+ */
+OIFData::OIFData()
+{
+  this->_root = NULL;
+}
+
+
 /**
  * constructor
@@ -30,5 +40,13 @@
 OIFData::OIFData(const std::string& fileName)
 {
+  this->_root = NULL;
   this->load(fileName);
+}
+
+
+OIFData::~OIFData()
+{
+  if( this->_root)
+    delete this->_root;
 }
 
@@ -40,41 +58,40 @@
 void OIFData::load(const std::string& fileName)
 {
-  //
-    if( fileName.empty())
+  if( fileName.empty())
   {
-    PRINTF(3)("No filename specified for object information loading");
+    PRINTF(1)("No filename specified for object information loading");
     return;
   }
 
-  TiXmlDocument XMLDoc(fileName);
+  TiXmlDocument* XMLDoc = new TiXmlDocument(fileName);
   // load the campaign document
-  if( !XMLDoc.LoadFile(fileName))
+  if( !XMLDoc->LoadFile(fileName))
   {
     // report an error
-    PRINTF(3)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc.ErrorDesc(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol());
+    PRINTF(1)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());
     return;
   }
 
   // check basic validity
-  TiXmlElement* root = XMLDoc.RootElement();
-  assert( root != NULL);
+  this->_root = XMLDoc->RootElement();
+  assert( this->_root != NULL);
 
-  if( strcmp( root->Value(), "ObjectInformationFile"))
+  if( strcmp( this->_root->Value(), "ObjectInformationFile"))
   {
     // report an error
-    PRINTF(2)("Specified XML File is not an orxonox object information file (<ObjectInformationFile> element missing)\n");
+    PRINTF(1)("Specified XML File is not an orxonox object information file (<ObjectInformationFile> element missing)\n");
     return;
   }
 
-  // construct campaign
-//   return new Campaign( root);
+//   this->initMountPoint( this->_root);
 }
 
 
-
 /**
- * standard constructor
+ * constructor
+ * @param fileName name of the file
  */
 ObjectInformationFile::ObjectInformationFile()
+  : data(new OIFData)
 {
   this->init();
@@ -107,4 +124,17 @@
 
 /**
+ * the definition of the assignment operator
+ * @param oif
+ * @return
+ */
+ObjectInformationFile& ObjectInformationFile::operator=(const ObjectInformationFile& oif)
+{
+  this->init();
+  this->data = oif.data;
+
+  return *this;
+}
+
+/**
  * initizlizing function
  */
@@ -112,4 +142,10 @@
 {
 
+}
+
+
+void ObjectInformationFile::load(const std::string& fileName)
+{
+  this->data = OIFData::Pointer(new OIFData(fileName));
 }
 
@@ -124,11 +160,12 @@
 
 
+/**
+ * this initializes the mount point
+ * @param mountPoint to be initialized
+ */
+// void ObjectInformationFile::initMountPoint(MountPoint* mountPoint)
+// {
+//   TiXmlElement* root = this->data->root();
+//
+// }
 
-ObjectInformationFile& ObjectInformationFile::operator=(const ObjectInformationFile& oif)
-{
-  this->data = oif.data;
-  return *this;
-}
-
-
-
Index: /trunk/src/lib/graphics/importer/oif/object_information_file.h
===================================================================
--- /trunk/src/lib/graphics/importer/oif/object_information_file.h	(revision 10313)
+++ /trunk/src/lib/graphics/importer/oif/object_information_file.h	(revision 10314)
@@ -20,12 +20,16 @@
 
 public:
+  OIFData();
   OIFData(const std::string& fileName);
-  virtual ~OIFData() {}
+  virtual ~OIFData();
 
   void load(const std::string& fileName);
+  void initMountPoint(const TiXmlElement* root);
+
+  inline const TiXmlElement* root() { return this->_root; }
 
 
 private:
-
+  TiXmlElement* _root;           //!< root of the xml file
 };
 
@@ -40,5 +44,15 @@
   virtual ~ObjectInformationFile();
 
+  void load(const std::string& fileName);
+
   ObjectInformationFile& operator=(const ObjectInformationFile& oif);
+
+  /** @returns a reference to the xml oif file */
+  inline const TiXmlElement* getMountPointDescription() { return this->data->root(); }
+
+  inline void acquireData(const OIFData::Pointer& data) { this->data = data; }
+  const OIFData::Pointer& dataPointer() const { return this->data; };
+
+
 
   private:
Index: /trunk/src/lib/graphics/importer/oif/resource_oif.cc
===================================================================
--- /trunk/src/lib/graphics/importer/oif/resource_oif.cc	(revision 10313)
+++ /trunk/src/lib/graphics/importer/oif/resource_oif.cc	(revision 10314)
@@ -26,16 +26,17 @@
   Resources::StorePointer* ptr = this->acquireResource(fileName);
 
+
   if (ptr)
   {
-    PRINTF(0)("FOUND OIF: %s\n", fileName.c_str());
-    //this->acquireData(static_cast<ResourceOIF::OIFResourcePointer*>(ptr)->ptr());
+    PRINTF(5)("FOUND OIF: %s\n", fileName.c_str());
+    this->acquireData(static_cast<ResourceOIF::OIFResourcePointer*>(ptr)->ptr());
   }
   else
   {
-    PRINTF(4)("NOT FOUND OIF: %s\n", fileName.c_str());
-//     std::string modelFileName = this->Resource::locateFile(modelName);
-//     //std::string skinFileName = this->Resource::locateFile(skinName);
-//     this->MD2Model::load(modelFileName, skinName, scale);
-//     this->Resource::addResource(new ResourceOIF::OIFResourcePointer(loadString(modelName, skinName, scale), keepLevel, this->MD2Model::dataPointer()));
+    PRINTF(5)("NOT FOUND OIF: %s\n", fileName.c_str());
+    std::string fullName = this->Resource::locateFile(fileName);
+    PRINTF(5)("trying loading of: %s\n", fullName.c_str());
+    this->load(fullName);
+    this->Resource::addResource(new ResourceOIF::OIFResourcePointer(fileName, keepLevel, this->ObjectInformationFile::dataPointer()));
   }
 
Index: /trunk/src/lib/graphics/importer/oif/resource_oif.h
===================================================================
--- /trunk/src/lib/graphics/importer/oif/resource_oif.h	(revision 10313)
+++ /trunk/src/lib/graphics/importer/oif/resource_oif.h	(revision 10314)
@@ -15,5 +15,6 @@
 {
 public:
-  ResourceOIF(const std::string& fileName, const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
+  ResourceOIF(const std::string& fileName,
+              const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
   static ResourceOIF createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
 
Index: /trunk/src/lib/graphics/importer/static_model.cc
===================================================================
--- /trunk/src/lib/graphics/importer/static_model.cc	(revision 10313)
+++ /trunk/src/lib/graphics/importer/static_model.cc	(revision 10314)
@@ -45,5 +45,5 @@
 
 StaticModel::StaticModel(const StaticModel& staticModel)
-  : data(staticModel.data)
+    : data(staticModel.data)
 {
   this->registerObject(this, StaticModel::_objectList);
@@ -111,66 +111,104 @@
     std::vector<Vector> vertices;
 
-    if( groupName.find("MP.", 0) != std::string::npos)
+    // check if the name has a "MP" prefix or else it won't work
+    if( groupName.find("MP.", 0) == std::string::npos)
+      continue;
+
+
+    PRINTF(5)("Found a MountPoint: %s\n", groupName.c_str());
+
+    StaticModelData::Face triangle[3];
+
+    // now check if it is a mount point identifier
+    if( (*groupIt)._faces.size() != 11)
     {
-      PRINTF(0)("Found a MountPoint: %s\n", groupName.c_str());
-
-      // now check if it is a mount point identifier
-      if( this->data->getGroups().size() != 5) {
-        PRINTF(1)("the face count of %s is wrong, perhaps you missnamed this object or used the wrong mount point object\n", groupName.c_str());
+      PRINTF(1)("the face count of %s is wrong, perhaps you missnamed this object or used the wrong mount point object (got %i faces)\n",
+                groupName.c_str(), (*groupIt)._faces.size());
+    }
+
+    // now iterate through all faces
+    std::vector<StaticModelData::Face>::const_iterator faceIt = (*groupIt)._faces.begin();
+    for( int i = 0; faceIt < (*groupIt)._faces.end(); faceIt++)
+    {
+      if( (*faceIt)._elements.size() == 3)
+      {
+        triangle[i++] = (*faceIt);
       }
-
-      // now extract the direction from the length:
-      std::vector<StaticModelData::Face>::const_iterator faceIt = (*groupIt)._faces.begin();
-      for( ; faceIt < (*groupIt)._faces.end(); faceIt++)
+    }
+
+
+    Vector center;
+    Vector xAxis;
+    Vector yAxis;
+    Vector zAxis;
+    // now process all points
+    for( int i = 0; i < 3; i++)
+    {
+      // convert the float vertices to vectors
+      Vector a( this->data->getVertices()[triangle[i]._elements[0].vertexNumber * 3],
+                this->data->getVertices()[triangle[i]._elements[0].vertexNumber * 3 + 1],
+                this->data->getVertices()[triangle[i]._elements[0].vertexNumber * 3 + 2]);
+      Vector b( this->data->getVertices()[triangle[i]._elements[1].vertexNumber * 3],
+                this->data->getVertices()[triangle[i]._elements[1].vertexNumber * 3 + 1],
+                this->data->getVertices()[triangle[i]._elements[1].vertexNumber * 3 + 2]);
+      Vector c( this->data->getVertices()[triangle[i]._elements[2].vertexNumber * 3],
+                this->data->getVertices()[triangle[i]._elements[2].vertexNumber * 3 + 1],
+                this->data->getVertices()[triangle[i]._elements[2].vertexNumber * 3 + 2]);
+
+      Vector ab = a - b;
+      Vector ac = a - c;
+      Vector bc = b - c;
+
+      Vector  axis1;
+      Vector  axis2;
+      // now find the center point (the one with the 90degree angle)
+      if( fabs(ab.dot( ac)) < 0.0001)
       {
-        // now go through all modelfaceelements
-        std::vector<StaticModelData::FaceElement>::const_iterator faceElementIt = (*faceIt)._elements.begin();
-        for( ; faceElementIt < (*faceIt)._elements.end(); faceElementIt++)
-        {
-          int vert = (*faceElementIt).vertexNumber;
-          vertices.push_back(Vector(this->data->getVertices()[vert*3],
-                             this->data->getVertices()[vert*3 + 1],
-                             this->data->getVertices()[vert*3 + 2]));
-        }
+        center = a;
+        axis1 = b - a;
+        axis2 = c - a;
       }
-
-      // vertex with the max count is the up-point
-      std::vector<Vector>::const_iterator it = vertices.begin();
-      Vector tmpPoint;
-      int tmpCount;
-      Vector upPoint;
-      int maxCount = 0;
-      for( ; it < vertices.end(); it++)
+      else if( fabs(ab.dot(bc)) < 0.0001)
       {
-        tmpCount = 0;
-        tmpPoint = (*it);
-        //
-        std::vector<Vector>::const_iterator it2 = vertices.begin();
-        for( ; it2 < vertices.end(); it2++)
-          if( tmpPoint == *it2)
-            tmpCount++;
-
-        // if this is the vertex with the most surrounding vertices
-        if( tmpCount > maxCount)
-        {
-          upPoint = tmpPoint;
-          maxCount = tmpCount;
-        }
+        center = b;
+        axis1 = a - b;
+        axis2 = c - b;
       }
-
-      // now get the center of the object
-      Vector center;
-      it = vertices.begin();
-      for( ; it < vertices.end(); it++)
-        center += (*it);
-      // scale
-      center /= vertices.size();
-
-
+      else if( fabs(bc.dot(ac)) < 0.0001)
+      {
+        center = c;
+        axis1 = b - c;
+        axis2 = a - c;
+      }
+
+
+      // get the longest axis (without defining a max() funciton :D
+      if( xAxis.len() < axis1.len() )
+        xAxis = axis1;
+      if( xAxis.len() < axis2.len())
+        xAxis = axis2;
+
+
+      // find the 2nd longest axis to be y-axis
+      if( xAxis.len() > axis1.len() && yAxis.len() < axis1.len())
+        yAxis = axis1;
+      if( xAxis.len() > axis2.len() && yAxis.len() < axis2.len())
+        yAxis = axis2;
+
+
+      // needed... no explanation here..
+      if( zAxis.len() == 0.)
+        zAxis = yAxis;
+
+      // find the shortest axis to be z-axis
+      if( yAxis.len() > axis1.len() )
+        zAxis = axis1;
+      if( yAxis.len() > axis2.len() )
+        zAxis = axis2;
     }
 
+    // now add the mount point
+     this->addMountPoint( zAxis, yAxis, center, groupName);
   }
-
-
 }
 
Index: /trunk/src/lib/graphics/importer/static_model.h
===================================================================
--- /trunk/src/lib/graphics/importer/static_model.h	(revision 10313)
+++ /trunk/src/lib/graphics/importer/static_model.h	(revision 10314)
@@ -58,5 +58,5 @@
 
   void finalize();
-  void extractMountPoints();
+  virtual void extractMountPoints();
 
   void acquireData(const StaticModelData::Pointer& data);
@@ -71,4 +71,6 @@
 private:
   void updateBase();
+
+
 private:
   StaticModelData::Pointer         data;
Index: /trunk/src/lib/math/vector.h
===================================================================
--- /trunk/src/lib/math/vector.h	(revision 10313)
+++ /trunk/src/lib/math/vector.h	(revision 10314)
@@ -47,4 +47,7 @@
   /** @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->len() > v.len()); }
+  inline bool operator< (const Vector& v) const  { return (this->len() < v.len()); }
+
   /** @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; }
@@ -82,4 +85,11 @@
   inline const Vector& operator= (const sVec3D& v) { this->x = v[0]; this->y = v[1]; this->z = v[2]; return *this; }
   inline const Vector& operator= (const float* v) { this->x = v[0]; this->y = v[1]; this->z = v[2]; return *this; }
+
+  /** this operator can be used to assign values to the vector */
+  inline void operator() (float x, float y, float z) { this->x = x; this->y = y; this->z = z;}
+
+
+
+
   /** @param v: the other vector \return the dot product of the vectors */
   float dot (const Vector& v) const { return x*v.x+y*v.y+z*v.z; };
Index: /trunk/src/story_entities/game_world.cc
===================================================================
--- /trunk/src/story_entities/game_world.cc	(revision 10313)
+++ /trunk/src/story_entities/game_world.cc	(revision 10314)
@@ -11,6 +11,7 @@
    ### File Specific:
    main-programmer: Patrick Boenzli
+   main-programmer: Benjamin Grauer
    co-programmer: Christian Meyer
-   co-programmer: Benjamin Grauer
+
 */
 
@@ -73,4 +74,5 @@
 SHELL_COMMAND(togglePNodeVisibility, GameWorld, togglePNodeVisibility);
 SHELL_COMMAND(showBVLevel, GameWorld, toggleBVVisibility);
+SHELL_COMMAND(showMountPoints, GameWorld, toggleMPVisibility);
 
 
@@ -88,4 +90,5 @@
   this->showBV = false;
   this->showBVLevel = 3;
+  this->showMPV = false;
 
   this->dataXML = NULL;
@@ -541,6 +544,11 @@
   ObjectManager::EntityList::const_iterator entity;
   for (entity = drawList.begin(); entity != drawList.end(); entity++)
+  {
     if ((*entity)->isVisible())
       (*entity)->draw();
+
+    if( unlikely( this->showMPV))
+      (*entity)->debugDrawMountPoints();
+  }
 }
 
@@ -666,4 +674,5 @@
     }
 
+
     if( unlikely(this->showPNodes))
       PNode::getNullParent()->debugDraw(0);
Index: /trunk/src/story_entities/game_world.h
===================================================================
--- /trunk/src/story_entities/game_world.h	(revision 10313)
+++ /trunk/src/story_entities/game_world.h	(revision 10314)
@@ -62,4 +62,5 @@
   void togglePNodeVisibility();
   void toggleBVVisibility(int level);
+  inline void toggleMPVisibility() { this->showMPV = !this->showMPV; }
 
   inline void setSky(WorldEntity* sky) { this->dataTank->sky = sky; }
@@ -99,4 +100,5 @@
   bool                showBV;                       //!< if the Bounding Volumes should be visible.
   int                 showBVLevel;                  //!< the depth level of the displayed bounding volumes
+  bool                showMPV;                      //!< true if the mounting points should be drawn for debug purposes
 
   /* world timing */
Index: /trunk/src/story_entities/movie_loader.cc
===================================================================
--- /trunk/src/story_entities/movie_loader.cc	(revision 10313)
+++ /trunk/src/story_entities/movie_loader.cc	(revision 10314)
@@ -63,8 +63,8 @@
 
 
-ErrorMessage MovieLoader::init() {}
+ErrorMessage MovieLoader::init() {  return ErrorMessage();}
 
 
-ErrorMessage MovieLoader::loadData() {}
+ErrorMessage MovieLoader::loadData() {  return ErrorMessage();}
 
 
@@ -72,4 +72,6 @@
 {
   this->unsubscribeEvents(ES_GAME);
+
+  return ErrorMessage();
 }
 
@@ -82,4 +84,6 @@
   this->bRunning = true;
   this->run();
+
+  return true;
 }
 
@@ -89,8 +93,10 @@
 
   this->bRunning = false;
+
+  return true;
 }
 
-bool MovieLoader::pause() { }
-bool MovieLoader::resume() { }
+bool MovieLoader::pause() { return false; }
+bool MovieLoader::resume() { return false; }
 
 void MovieLoader::run()
Index: /trunk/src/world_entities/mount_point.cc
===================================================================
--- /trunk/src/world_entities/mount_point.cc	(revision 10313)
+++ /trunk/src/world_entities/mount_point.cc	(revision 10314)
@@ -10,5 +10,5 @@
 
    ### File Specific
-   main-programmer: Patrick Boenzli patrick@orxonox.net
+   main-programmer: Patrick Boenzli, patrick@orxonox.net
    co-programmer:
 */
@@ -19,4 +19,6 @@
 #include "util/loading/factory.h"
 #include "util/loading/load_param.h"
+#include "util/loading/load_param_xml.h"
+
 
 
@@ -27,5 +29,4 @@
 
 ObjectListDefinition(MountPoint);
-CREATE_FACTORY(MountPoint);
 
 
@@ -33,21 +34,15 @@
  * construct
  */
-MountPoint::MountPoint ()
-{
+MountPoint::MountPoint (const Vector& up, const Vector& forward, const Vector& center, const std::string& name)
+{
+  PRINTF(5)("Created mount point %s\n", name.c_str());
+
+  this->_name = name;
+  this->setAbsCoor( center);
+  this->setAbsDir( Quaternion(forward, up));
+
   this->init();
 }
 
-
-/**
- * constructor
- * @param root the xml root element
- */
-MountPoint::MountPoint(const TiXmlElement* root)
-{
-  this->init();
-
-  if( root != NULL)
-    this->loadParams(root);
-}
 
 
@@ -75,7 +70,114 @@
  * @param root the XML-element to load the MD2Creature's properties from
  */
-void MountPoint::loadParams(const TiXmlElement* root)
-{
-  WorldEntity::loadParams(root);
+void MountPoint::initMountPoint(const TiXmlElement* root)
+{
+  if( root == NULL)
+  {
+    PRINTF(1)("MountPoint - initialization failed, since I got no valid xml element\n");
+    return;
+  }
+  // now get the first element
+  const TiXmlElement* element = root->FirstChildElement("MountPoints");
+  if( element == NULL)
+  {
+    PRINTF(1)("I am in section: %s, Object Information file is missing a proper 'MountPoints' section\n", root->Value());
+//     element = root->FirstChildElement( );
+//     PRINTF(0)("first child: %s\n", element->Value());
+  }
+  else
+  {
+    element = element->FirstChildElement();
+    // parse the information for this mount point
+
+    PRINTF(4)("Loading WorldEntities\n");
+    while( element != NULL)
+    {
+      std::string name = element->Value();
+
+      PRINTF(5)("checking %s against local %s\n", name.c_str(), this->_name.c_str());
+      // check if we got the right mount point
+      if( this->_name.find(name, 0) != std::string::npos)
+      {
+        PRINTF(5)("found mount point %s\n", this->_name.c_str());
+        // load it
+        this->loadParam(element);
+      }
+
+      element = element->NextSiblingElement();
+    }
+  }
+}
+
+
+
+/**
+ * load the parameters from the xml section
+ * @param root the root element of this xml branche
+ */
+void MountPoint::loadParam(const TiXmlElement* root)
+{
+  // first check for the description
+  LoadParam(root, "Description", this, MountPoint, setDescription)
+  .describe("Sets this mount point a description");
+
+  // now check for the orx class to create
+  LoadParam(root, "OrxClass", this, MountPoint, setOrxClass)
+  .describe("Sets the class this mount points should host");
+
+  LoadParamXML(root, "Details", this, MountPoint, loadDetails);
+}
+
+
+/**
+ * load the parameters from the world entity
+ * @param root the root element of this xml branche
+ */
+void MountPoint::loadDetails(const TiXmlElement* root)
+{
+  if( this->_mount != NULL)
+  {
+    PRINTF(0)("Got detail informations\n");
+    this->_mount->loadParams( root);
+  }
+}
+
+
+/**
+ * setst the description (optional) via xml tag
+ * @param description string containing the description
+ */
+void MountPoint::setDescription(const std::string& description)
+{
+  this->_description = description;
+}
+
+
+
+/**
+ * sets the class of this mount point
+ * @param orxClass class
+ */
+void MountPoint::setOrxClass(const std::string& orxClass)
+{
+  // create the object for this mount point
+  BaseObject* obj = Factory::fabricate(orxClass);
+  // check if the object is created correctly
+  if( obj != NULL)
+  {
+    if( obj->isA( WorldEntity::staticClassID()))
+    {
+      // cast down the object to WE
+      this->_mount = dynamic_cast<WorldEntity*>(obj);
+
+      // now set the position, direction and reparent it to this node
+      this->_mount->setAbsCoor( this->getAbsCoor());
+      this->_mount->setAbsDir( this->getAbsDir());
+      this->_mount->setParent( this);
+
+      this->_mount->toList( (OM_LIST)(this->getOMListNumber()+1));
+    }
+  }
+  else
+    PRINTF(1)("Couldn't create %s for this mount point (%s)\n", orxClass.c_str(), this->_name.c_str());
 }
 
@@ -89,5 +191,4 @@
 {
 
-
 }
 
@@ -98,5 +199,4 @@
 void MountPoint::draw() const
 {
-
 }
 
@@ -108,5 +208,6 @@
 void MountPoint::debugDraw() const
 {
-
+  // invoke the underlying pnode debug draw
+  this->debugDraw();
 }
 
Index: /trunk/src/world_entities/mount_point.h
===================================================================
--- /trunk/src/world_entities/mount_point.h	(revision 10313)
+++ /trunk/src/world_entities/mount_point.h	(revision 10314)
@@ -12,11 +12,14 @@
 
   public:
-    MountPoint ();
-    MountPoint(const TiXmlElement* root);
+    MountPoint (const Vector& up, const Vector& forward, const Vector& center, const std::string& name);
     virtual ~MountPoint ();
 
     void init();
-    virtual void loadParams(const TiXmlElement* root);
+    void initMountPoint(const TiXmlElement* root);
+    void loadParam(const TiXmlElement* root);
+    void loadDetails(const TiXmlElement* root);
 
+    void setDescription(const std::string& description);
+    void setOrxClass(const std::string& orxClass);
 
     virtual void tick (float time);
@@ -32,4 +35,7 @@
   private:
     WorldEntity*         _mount;       //!< the entity mounted at this mount point
+    std::string          _name;        //!< the name of the mount point
+
+    std::string          _description; //!< string containing an optional description
 
 };
Index: /trunk/src/world_entities/world_entity.cc
===================================================================
--- /trunk/src/world_entities/world_entity.cc	(revision 10313)
+++ /trunk/src/world_entities/world_entity.cc	(revision 10314)
@@ -12,6 +12,7 @@
 
    ### File Specific:
-   main-programmer: Patrick Boenzli, Benjamin Grauer
-   co-programmer: Christian Meier
+   main-programmer: Patrick Boenzli
+   main-programmer: Benjamin Grauer
+   co-programmer:   Christian Meier
 */
 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
@@ -73,4 +74,6 @@
   this->scaling = 1.0f;
   this->oiFile = NULL;
+  // add 10 members to this array
+  this->mountPoints.reserve(10);
 
   /* OSOLETE */
@@ -141,4 +144,7 @@
   .describe("the fileName of the model, that should be loaded onto this world-entity. (must be relative to the data-dir)")
   .defaultValues("", 1.0f, 0);
+
+  LoadParam(root, "mountpoints", this, WorldEntity, loadMountPoints)
+  .describe("the fileName of the object information file (optional)");
 
   LoadParam(root, "maxHealth", this, WorldEntity, setHealthMax)
@@ -204,16 +210,17 @@
       StaticModel* model = new StaticModel();
       *model = ResourceOBJ(fileName, this->scaling);
+
+      // check if ther is a valid model and load other stuff
       if (model->getVertexCount() > 0)
       {
         this->setModel(model, modelNumber);
-	if( modelNumber == 0 /* FIXME && !this->isA(CL_WEAPON) */)
+
+	if( modelNumber == 0)
+        {
 	  this->buildObbTree(obbTreeDepth);
+        }
       }
       else
         delete model;
-
-      // now get the object information file for this model, if any
-      std::string oifName = fileName.substr(0, fileName.length() - 4) + ".oif";
-      this->loadObjectInformationFile( oifName);
     }
     /// LOADING AN MD2-model
@@ -269,9 +276,39 @@
  * @param fileName the name of the file
  */
-void WorldEntity::loadObjectInformationFile(const std::string& fileName)
-{
-  PRINTF(4)("loading the oif File: %s\n", fileName.c_str());
-
+void WorldEntity::loadMountPoints(const std::string& fileName)
+{
+  PRINTF(5)("loading the oif File: %s\n", fileName.c_str());
+
+  // now load the object information file
   this->oiFile = new ObjectInformationFile(fileName);
+
+  // get the model to load
+  Model* model = this->getModel();
+
+  // extract the mount points
+  model->extractMountPoints();
+
+  // first get all mount points from the model
+  const std::list<mountPointSkeleton> mpList = model->getMountPoints();
+  // for each skeleton create a mounting point world entity
+  std::list<mountPointSkeleton>::const_iterator it = mpList.begin();
+
+  for( ; it != mpList.end(); it++)
+  {
+    // create the mount points world entity
+    MountPoint* mp = new MountPoint( (*it).up, (*it).forward, (*it).center, (*it).name);
+    // parent it to this WE
+    mp->setParent( this);
+    // now add to the right group
+    mp->toList( (OM_LIST)(this->getOMListNumber()+1));
+    // now get the number and add the mount point to the slot
+    std::string nrStr = (*it).name.substr(3, 2);
+    // add the mount point
+    this->addMountPoint(atoi(nrStr.c_str()), mp);
+
+    // now fill the mount point
+    mp->initMountPoint( this->oiFile->getMountPointDescription());
+  }
+
 }
 
@@ -337,7 +374,12 @@
 void WorldEntity::addMountPoint(int slot, MountPoint* mountPoint)
 {
-  if( this->mountPoints[slot] != NULL)
-  {
-    PRINTF(0)("adding a mount point to a slot, that already exists! ignoring - maybe some object do not get connected well (object: %s)\n", this->getClassCName());
+  if( this->mountPoints.capacity() < (unsigned int)slot)
+  {
+    // reserve 5 more slots than needed so this function is called as rare as possible
+    this->mountPoints.reserve(slot + 5);
+  }
+  else if( this->mountPoints[slot] != NULL)
+  {
+    PRINTF(4)("adding a mount point to a slot, that already is occupied! ignoring - maybe some object did not get connected well (object: %s)\n", this->getClassCName());
   }
 
@@ -794,4 +836,22 @@
 
 
+
+/**
+ * draw the mounting points
+ */
+void WorldEntity::debugDrawMountPoints() const
+{
+
+  std::vector<MountPoint*>::const_iterator it = this->mountPoints.begin();
+  for( ; it < this->mountPoints.end(); it++)
+  {
+    if( (*it) != NULL)
+    {
+      (*it)->debugDraw();
+    }
+  }
+}
+
+
 /**
  * Debug the WorldEntity
Index: /trunk/src/world_entities/world_entity.h
===================================================================
--- /trunk/src/world_entities/world_entity.h	(revision 10313)
+++ /trunk/src/world_entities/world_entity.h	(revision 10314)
@@ -53,5 +53,5 @@
   Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
 
-  void loadObjectInformationFile(const std::string& fileName);
+  void loadMountPoints(const std::string& fileName);
   inline void loadMD2Texture(const std::string& fileName) { this->md2TextureFileName = fileName; }
 
@@ -73,4 +73,5 @@
   virtual void tick (float time);
   virtual void draw () const;
+  void debugDrawMountPoints() const;
 
   /* --- Collision Detection Block  --- */
