Index: trunk/src/lib/graphics/importer/Makefile.am
===================================================================
--- trunk/src/lib/graphics/importer/Makefile.am	(revision 10143)
+++ trunk/src/lib/graphics/importer/Makefile.am	(revision 10147)
@@ -25,4 +25,7 @@
 		\
 		obj/objModel.cc \
+		\
+		oif/object_information_file.cc \
+		oif/resource_oif.cc \
 		\
 		bsp/bsp_manager.cc \
@@ -79,4 +82,7 @@
 		obj/objModel.h \
 		\
+		oif/object_information_file.h \
+		oif/resource_oif.h \
+		\
                 md2/md2Model.h \
 		md2/resource_md2.h \
Index: trunk/src/lib/graphics/importer/model.h
===================================================================
--- trunk/src/lib/graphics/importer/model.h	(revision 10143)
+++ trunk/src/lib/graphics/importer/model.h	(revision 10147)
@@ -83,4 +83,8 @@
     inline unsigned int getTriangleCount() const { return this->pModelInfo.numTriangles; };
 
+    /** function to extract the mount points from the model data */
+    virtual void extractMountPoints() {}
+
+
   protected:
     Model();
Index: trunk/src/lib/graphics/importer/obj/objModel.cc
===================================================================
--- trunk/src/lib/graphics/importer/obj/objModel.cc	(revision 10143)
+++ trunk/src/lib/graphics/importer/obj/objModel.cc	(revision 10147)
@@ -44,4 +44,6 @@
 
   this->finalize();
+
+  this->extractMountPoints();
 }
 
@@ -138,6 +140,6 @@
           this->addVertexTexture(buffer+3);
         }
-      // case group
-      else if (!strncmp(buffer, "g ", 2))
+      // case group or object (depends on the exporter program)
+      else if (!strncmp(buffer, "g ", 2) || !strncmp(buffer, "o ", 2))
         {
           this->addGroup (buffer+2);
Index: trunk/src/lib/graphics/importer/obj/objModel.h
===================================================================
--- trunk/src/lib/graphics/importer/obj/objModel.h	(revision 10143)
+++ trunk/src/lib/graphics/importer/obj/objModel.h	(revision 10147)
@@ -16,4 +16,5 @@
   OBJModel(const std::string& fileName, float scaling = 1.0);
   virtual ~OBJModel();
+
 
 private:
Index: trunk/src/lib/graphics/importer/oif/object_information_file.cc
===================================================================
--- trunk/src/lib/graphics/importer/oif/object_information_file.cc	(revision 10147)
+++ trunk/src/lib/graphics/importer/oif/object_information_file.cc	(revision 10147)
@@ -0,0 +1,134 @@
+/*
+   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 patrick@orxonox.net
+   co-programmer:
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+
+#include "object_information_file.h"
+
+#include "resource_oif.h"
+
+#include "util/loading/factory.h"
+#include "util/loading/load_param_xml.h"
+
+
+/**
+ * constructor
+ * @param fileName name of the file
+ */
+OIFData::OIFData(const std::string& fileName)
+{
+  this->load(fileName);
+}
+
+
+/**
+ * loading the data
+ * @param fileName file name where the data can be found
+ */
+void OIFData::load(const std::string& fileName)
+{
+  //
+    if( fileName.empty())
+  {
+    PRINTF(3)("No filename specified for object information loading");
+    return;
+  }
+
+  TiXmlDocument XMLDoc(fileName);
+  // load the campaign document
+  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());
+    return;
+  }
+
+  // check basic validity
+  TiXmlElement* root = XMLDoc.RootElement();
+  assert( root != NULL);
+
+  if( strcmp( root->Value(), "ObjectInformationFile"))
+  {
+    // report an error
+    PRINTF(2)("Specified XML File is not an orxonox object information file (<ObjectInformationFile> element missing)\n");
+    return;
+  }
+
+  // construct campaign
+//   return new Campaign( root);
+}
+
+
+
+/**
+ * standard constructor
+ */
+ObjectInformationFile::ObjectInformationFile()
+{
+  this->init();
+}
+
+/**
+ * constructor
+ * @param fileName name of the file
+ */
+ObjectInformationFile::ObjectInformationFile(const std::string& fileName)
+  : data(new OIFData(fileName))
+{
+  // load the oif file
+  this->data = ResourceOIF(fileName).data;
+
+  this->init();
+}
+
+
+/**
+ * copy constructor
+ * @param oif instance to copy from
+*/
+ObjectInformationFile::ObjectInformationFile(const ObjectInformationFile& oif)
+  :data(oif.data)
+{
+  this->init();
+}
+
+
+/**
+ * initizlizing function
+ */
+void ObjectInformationFile::init()
+{
+
+}
+
+
+/**
+ * standard deconstructor
+*/
+ObjectInformationFile::~ObjectInformationFile ()
+{
+  // delete what has to be deleted here
+}
+
+
+
+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 10147)
+++ trunk/src/lib/graphics/importer/oif/object_information_file.h	(revision 10147)
@@ -0,0 +1,53 @@
+/*!
+ * @file object_information_file.h
+ * @brief Definition of a class that helps defining mount point connections
+*/
+
+#ifndef _OBJECT_INFORMATION_FILE_H
+#define _OBJECT_INFORMATION_FILE_H
+
+#include "base_object.h"
+
+#include "count_pointer.h"
+
+
+//! A class for object informations
+class OIFData : BaseObject
+{
+public:
+  typedef CountPointer<OIFData>    Pointer;
+
+
+public:
+  OIFData(const std::string& fileName);
+  virtual ~OIFData() {}
+
+  void load(const std::string& fileName);
+
+
+private:
+
+};
+
+//! A class for object informations
+class ObjectInformationFile : BaseObject
+{
+
+public:
+  ObjectInformationFile();
+  ObjectInformationFile(const ObjectInformationFile& oif);
+  ObjectInformationFile(const std::string& fileName);
+  virtual ~ObjectInformationFile();
+
+  ObjectInformationFile& operator=(const ObjectInformationFile& oif);
+
+  private:
+    void init();
+
+
+private:
+  CountPointer<OIFData>          data;                           //!< the oif data pointer
+
+};
+
+#endif /* _OBJECT_INFORMATION_FILE_H */
Index: trunk/src/lib/graphics/importer/oif/resource_oif.cc
===================================================================
--- trunk/src/lib/graphics/importer/oif/resource_oif.cc	(revision 10147)
+++ trunk/src/lib/graphics/importer/oif/resource_oif.cc	(revision 10147)
@@ -0,0 +1,66 @@
+/*
+   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 patrick@orxonox.net
+   co-programmer:
+*/
+
+#include "resource_oif.h"
+
+#include "substring.h"
+#include "multi_type.h"
+#include "debug.h"
+
+
+ResourceOIF::ResourceOIF(const std::string& fileName, const Resources::KeepLevel& keepLevel)
+    : Resource(&ResourceOIF::type)
+{
+  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());
+  }
+  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()));
+  }
+
+}
+
+ResourceOIF ResourceOIF::createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel)
+{
+  SubString loadValues(loadString, ',');
+  std::string fileName;
+  if (loadValues.size() > 0)
+    fileName = loadValues[0];
+
+  return ResourceOIF(fileName);
+}
+
+
+
+Resources::tType<ResourceOIF> ResourceOIF::type("OIF");
+
+
+
+
+
+ResourceOIF::OIFResourcePointer::OIFResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const OIFData::Pointer& data)
+    : Resources::StorePointer(loadString, keepLevel) , pointer(data)
+{}
+
+
Index: trunk/src/lib/graphics/importer/oif/resource_oif.h
===================================================================
--- trunk/src/lib/graphics/importer/oif/resource_oif.h	(revision 10147)
+++ trunk/src/lib/graphics/importer/oif/resource_oif.h	(revision 10147)
@@ -0,0 +1,37 @@
+/*!
+ * @file resource_oif.h
+ * @brief Contains the ResourceOIF class, that handles the Resource-specific loading part of the OIF.
+ *
+ */
+
+#ifndef _RESOURCE_OIF_H
+#define _RESOURCE_OIF_H
+
+#include "util/loading/resource.h"
+#include "object_information_file.h"
+
+
+class ResourceOIF : public ObjectInformationFile, public Resources::Resource
+{
+public:
+  ResourceOIF(const std::string& fileName, const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
+  static ResourceOIF createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
+
+
+private:
+class OIFResourcePointer : public Resources::StorePointer
+  {
+  public:
+    OIFResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const OIFData::Pointer& data);
+    inline const OIFData::Pointer& ptr() const { return pointer; }
+    virtual bool last() const { return pointer.count() == 1; }
+  private:
+    OIFData::Pointer pointer;
+  };
+
+private:
+  static Resources::tType<ResourceOIF> type;
+};
+
+
+#endif /* _RESOURCE_OIF_H */
Index: trunk/src/lib/graphics/importer/static_model.cc
===================================================================
--- trunk/src/lib/graphics/importer/static_model.cc	(revision 10143)
+++ trunk/src/lib/graphics/importer/static_model.cc	(revision 10147)
@@ -91,4 +91,89 @@
   this->updateBase();
 }
+
+
+
+/**
+ * extract the mount points from this file: looking at each group and checking if the group realy is a mountpoint marker
+ * if so get place and orientation
+ */
+void StaticModel::extractMountPoints()
+{
+
+  // go through all groups and check if they are mounts
+  std::vector<StaticModelData::Group>::const_iterator groupIt = this->data->getGroups().begin();
+  for( ; groupIt != this->data->getGroups().end(); groupIt++)
+  {
+    //PRINTF(0)("Found a MountPoint: %s\n", groupName.c_str());
+
+    // get the name of this group and check if it's a mout point identifier
+    std::string groupName = (*groupIt).name;
+    std::vector<Vector> vertices;
+
+    if( groupName.find("MP.", 0) != std::string::npos)
+    {
+      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());
+      }
+
+      // now extract the direction from the length:
+      std::vector<StaticModelData::Face>::const_iterator faceIt = (*groupIt)._faces.begin();
+      for( ; faceIt < (*groupIt)._faces.end(); faceIt++)
+      {
+        // 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]));
+        }
+      }
+
+      // 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++)
+      {
+        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;
+        }
+      }
+
+      // now get the center of the object
+      Vector center;
+      it = vertices.begin();
+      for( ; it < vertices.end(); it++)
+        center += (*it);
+      // scale
+      center /= vertices.size();
+
+
+    }
+
+  }
+
+
+}
+
+
 
 /**
Index: trunk/src/lib/graphics/importer/static_model.h
===================================================================
--- trunk/src/lib/graphics/importer/static_model.h	(revision 10143)
+++ trunk/src/lib/graphics/importer/static_model.h	(revision 10147)
@@ -58,4 +58,5 @@
 
   void finalize();
+  void extractMountPoints();
 
   void acquireData(const StaticModelData::Pointer& data);
Index: trunk/src/lib/graphics/importer/static_model_data.cc
===================================================================
--- trunk/src/lib/graphics/importer/static_model_data.cc	(revision 10143)
+++ trunk/src/lib/graphics/importer/static_model_data.cc	(revision 10147)
@@ -276,11 +276,9 @@
 bool StaticModelData::addGroup(const std::string& groupString)
 {
-  PRINTF(5)("Read Group: %s.\n", groupString.c_str());
+  PRINTF(4)("Read Group: %s.\n", groupString.c_str());
   if (!_modelGroups.empty() && !_modelGroups.back()._faces.empty())
     _modelGroups.push_back(Group());
 
-  if (groupString == "default")
-    _modelGroups.back().name = groupString;
-  // setting the group name if not default.
+  _modelGroups.back().name = groupString;
   return true;
 }
Index: trunk/src/lib/graphics/importer/static_model_data.h
===================================================================
--- trunk/src/lib/graphics/importer/static_model_data.h	(revision 10143)
+++ trunk/src/lib/graphics/importer/static_model_data.h	(revision 10147)
@@ -129,4 +129,5 @@
   ///! HACK SOLUTION sTriangleExt should be const in the modelInfo.
   sTriangleExt* getTrianglesExt() { return &this->triangles[0]; };
+  const std::vector<Group>& getGroups() { return this->_modelGroups; }
 
   float getScaleFactor() const  { return scaleFactor; }
Index: trunk/src/world_entities/WorldEntities.am
===================================================================
--- trunk/src/world_entities/WorldEntities.am	(revision 10143)
+++ trunk/src/world_entities/WorldEntities.am	(revision 10147)
@@ -24,4 +24,5 @@
                 world_entities/planet.cc \
                 world_entities/bsp_entity.cc \
+                world_entities/mount_point.cc \
                 \
                 world_entities/weapons/test_gun.cc \
@@ -127,4 +128,5 @@
                 planet.h \
                 bsp_entity.h \
+                mount_point.h \
                 \
                 weapons/test_gun.h \
Index: trunk/src/world_entities/mount_point.cc
===================================================================
--- trunk/src/world_entities/mount_point.cc	(revision 10147)
+++ trunk/src/world_entities/mount_point.cc	(revision 10147)
@@ -0,0 +1,131 @@
+/*
+   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 patrick@orxonox.net
+   co-programmer:
+*/
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+
+
+#include "executor/executor.h"
+#include "util/loading/factory.h"
+#include "util/loading/load_param.h"
+
+
+#include "mount_point.h"
+#include "debug.h"
+#include "state.h"
+
+
+ObjectListDefinition(MountPoint);
+CREATE_FACTORY(MountPoint);
+
+
+/**
+ * construct
+ */
+MountPoint::MountPoint ()
+{
+  this->init();
+}
+
+
+/**
+ * constructor
+ * @param root the xml root element
+ */
+MountPoint::MountPoint(const TiXmlElement* root)
+{
+  this->init();
+
+  if( root != NULL)
+    this->loadParams(root);
+}
+
+
+/**
+ * deconstructor
+ */
+MountPoint::~MountPoint ()
+{}
+
+
+/**
+ * initializing function
+ */
+void MountPoint::init()
+{
+  this->registerObject(this, MountPoint::_objectList);
+  this->toList(OM_GROUP_00);
+
+  this->_mount = NULL;
+}
+
+
+/**
+ * loads the Settings of a MD2Creature from an XML-element.
+ * @param root the XML-element to load the MD2Creature's properties from
+ */
+void MountPoint::loadParams(const TiXmlElement* root)
+{
+  WorldEntity::loadParams(root);
+}
+
+
+
+/**
+ * tick
+ * @param time  time passed since the last tick
+ */
+void MountPoint::tick (float time)
+{
+
+
+}
+
+
+/**
+ * draw this entity
+ */
+void MountPoint::draw() const
+{
+
+}
+
+
+
+/**
+ *  function called to draw the mount point itself for debug purposes only
+ */
+void MountPoint::debugDraw() const
+{
+
+}
+
+
+/**
+ * adds an entity to this mount point
+ * @param entity entity to be added
+ */
+void MountPoint::mount(WorldEntity* entity)
+{
+  this->_mount = entity;
+}
+
+
+/**
+ * removes an entity from this mount point
+ */
+void MountPoint::unmount()
+{
+  this->_mount = NULL;
+}
+
Index: trunk/src/world_entities/mount_point.h
===================================================================
--- trunk/src/world_entities/mount_point.h	(revision 10147)
+++ trunk/src/world_entities/mount_point.h	(revision 10147)
@@ -0,0 +1,37 @@
+#ifndef _MOUNT_POINT_H
+#define _MOUNT_POINT_H
+
+#include "world_entity.h"
+
+class TiXmlElement;
+
+
+class MountPoint : public WorldEntity
+{
+    ObjectListDeclaration(MountPoint);
+
+  public:
+    MountPoint ();
+    MountPoint(const TiXmlElement* root);
+    virtual ~MountPoint ();
+
+    void init();
+    virtual void loadParams(const TiXmlElement* root);
+
+
+    virtual void tick (float time);
+    virtual void draw() const;
+
+    void debugDraw() const;
+
+
+    void mount(WorldEntity* entity);
+    void unmount();
+
+
+  private:
+    WorldEntity*         _mount;       //!< the entity mounted at this mount point
+
+};
+
+#endif /* _MOUNT_POINT_H */
Index: trunk/src/world_entities/npcs/npc_test.cc
===================================================================
--- trunk/src/world_entities/npcs/npc_test.cc	(revision 10143)
+++ trunk/src/world_entities/npcs/npc_test.cc	(revision 10147)
@@ -39,8 +39,8 @@
   this->registerObject(this, NPC2::_objectList);
 
-  if ((float)rand()/RAND_MAX > .5f)
-    this->loadModel("models/ships/bolido.obj", 6);
-  else
-    this->loadModel("models/ships/gobblin.obj", 6);
+//   if ((float)rand()/RAND_MAX > .5f)
+//     this->loadModel("models/ships/bolido.obj", 6);
+//   else
+//     this->loadModel("models/ships/gobblin.obj", 6);
 
 
@@ -84,29 +84,30 @@
  * Just override this function with whatever you want to be drawn.
  */
-void NPC2::draw() const
-{
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-  float matrix[4][4];
-
-  /* translate */
-  glTranslatef (this->getAbsCoor ().x,
-                this->getAbsCoor ().y,
-                this->getAbsCoor ().z);
-  /* rotate */
-  this->getAbsDir ().matrix (matrix);
-  glMultMatrixf((float*)matrix);
-
-//   if (this->shader != NULL && this->shader != Shader::getActiveShader())
-//     shader->activateShader();
-
-  this->getModel()->draw();
-//   shader->deactivateShader();
-
-
-/*  if (this->model)
-    this->model->draw();*/
-  glPopMatrix();
-}
+// void NPC2::draw() const
+// {
+//   glMatrixMode(GL_MODELVIEW);
+//   glPushMatrix();
+//   float matrix[4][4];
+//
+//   /* translate */
+//   glTranslatef (this->getAbsCoor ().x,
+//                 this->getAbsCoor ().y,
+//                 this->getAbsCoor ().z);
+//   /* rotate */
+//   this->getAbsDir ().matrix (matrix);
+//   glMultMatrixf((float*)matrix);
+//
+// //   if (this->shader != NULL && this->shader != Shader::getActiveShader())
+// //     shader->activateShader();
+//
+//   if( this->getModel())
+//     this->getModel()->draw();
+// //   shader->deactivateShader();
+//
+//
+// /*  if (this->model)
+//     this->model->draw();*/
+//   glPopMatrix();
+// }
 
 
Index: trunk/src/world_entities/npcs/npc_test.h
===================================================================
--- trunk/src/world_entities/npcs/npc_test.h	(revision 10143)
+++ trunk/src/world_entities/npcs/npc_test.h	(revision 10147)
@@ -22,5 +22,5 @@
 
   virtual void tick(float dt);
-  virtual void draw() const;
+//   virtual void draw() const;
 
  private:
Index: trunk/src/world_entities/world_entity.cc
===================================================================
--- trunk/src/world_entities/world_entity.cc	(revision 10143)
+++ trunk/src/world_entities/world_entity.cc	(revision 10147)
@@ -12,6 +12,6 @@
 
    ### File Specific:
-   main-programmer: Patrick Boenzli
-   co-programmer: Christian Meyer
+   main-programmer: Patrick Boenzli, Benjamin Grauer
+   co-programmer: Christian Meier
 */
 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
@@ -24,4 +24,7 @@
 #include "md2/md2Model.h"
 #include "md3/md3_model.h"
+
+#include "oif/object_information_file.h"
+#include "mount_point.h"
 
 #include "aabb_tree_node.h"
@@ -69,4 +72,5 @@
   this->damage = 0.0f; // no damage dealt by a default entity
   this->scaling = 1.0f;
+  this->oiFile = NULL;
 
   /* OSOLETE */
@@ -103,4 +107,10 @@
   for (unsigned int i = 0; i < this->models.size(); i++)
     this->setModel(NULL, i);
+
+  // remove the object information file
+  if( this->oiFile)
+    delete this->oiFile;
+  // and clear all monut points
+  this->mountPoints.clear();
 
   // Delete the obbTree
@@ -191,4 +201,5 @@
     {
       PRINTF(4)("fetching OBJ file: %s\n", fileName.c_str());
+      // creating the model and loading it
       StaticModel* model = new StaticModel();
       *model = ResourceOBJ(fileName, this->scaling);
@@ -201,4 +212,8 @@
       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
@@ -249,4 +264,17 @@
 
 
+
+/**
+ * loads the object information file for this model
+ * @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());
+
+  this->oiFile = new ObjectInformationFile(fileName);
+}
+
+
 /**
  * builds the obb-tree
@@ -290,4 +318,64 @@
   }
   return true;
+}
+
+
+/**
+ * adds a mount point to the end of the list
+ * @param mountPoint point to be added
+ */
+void WorldEntity::addMountPoint(MountPoint* mountPoint)
+{
+  // add the mount point at the last position
+  this->mountPoints.push_back(mountPoint);
+}
+
+/**
+ * adds a mount point to a world entity
+ * @param mountPoint point to be added
+ */
+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());
+  }
+
+  // just connect the mount point
+  this->mountPoints[slot] = mountPoint;
+}
+
+
+/**
+ * mounts a world entity on a specified mount point (~socket)
+ * @param entity entity to be connected
+ */
+void WorldEntity::mount(int slot, WorldEntity* entity)
+{
+  if( this->mountPoints[slot] == NULL)
+  {
+    PRINTF(0)("you tried to add an entity to a mount point that doesn't exist (slot %i)\n", slot);
+    return;
+  }
+
+  // mount the entity
+  this->mountPoints[slot]->mount(entity);
+}
+
+
+/**
+ * removes a mount point from a specified mount point
+ * @param mountPoint entity to be unconnected
+ */
+void WorldEntity::unmount(int slot)
+{
+    if( this->mountPoints[slot] == NULL)
+  {
+    PRINTF(0)("you tried to remove an entity from a mount point that doesn't exist (slot %i)\n", slot);
+    return;
+  }
+
+  // unmount the entity
+  this->mountPoints[slot]->unmount();
 }
 
Index: trunk/src/world_entities/world_entity.h
===================================================================
--- trunk/src/world_entities/world_entity.h	(revision 10143)
+++ trunk/src/world_entities/world_entity.h	(revision 10147)
@@ -15,10 +15,10 @@
 #include "object_manager.h"
 #include "glincl.h"
+
+#include "aabb_tree_node.h"
+
+#include "physics_interface.h"
+
 #include <vector>
-
-#include "aabb_tree_node.h"
-
-#include "physics_interface.h"
-
 
 
@@ -33,4 +33,7 @@
 class Model;
 
+class ObjectInformationFile;
+class MountPoint;
+
 
 //! Basis-class all interactive stuff in the world is derived from
@@ -50,5 +53,11 @@
   Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
 
+  void loadObjectInformationFile(const std::string& fileName);
   inline void loadMD2Texture(const std::string& fileName) { this->md2TextureFileName = fileName; }
+
+  void addMountPoint(MountPoint* mountPoint);
+  void addMountPoint(int slot, MountPoint* mountPoint);
+  void mount(int slot, WorldEntity* entity);
+  void unmount(int slot);
 
   /** @param visibility if the Entity should be visible (been draw) */
@@ -185,4 +194,6 @@
 
   std::vector<Model*>     models;             //!< The model that should be loaded for this entity.
+  ObjectInformationFile*  oiFile;             //!< Reference to the object information file discribing the model of this WE
+  std::vector<MountPoint*> mountPoints;       //!< A list with mount points for this model
   std::string             md2TextureFileName; //!< the file name of the md2 model texture, only if this
   std::string             modelLODName;       //!< the name of the model lod file
