Index: /branches/new_class_id/src/lib/graphics/importer/static_model.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/static_model.cc	(revision 9831)
+++ /branches/new_class_id/src/lib/graphics/importer/static_model.cc	(revision 9832)
@@ -37,5 +37,5 @@
  */
 StaticModel::StaticModel(const std::string& modelName)
-  : data(new StaticModelData(modelName))
+    : data(new StaticModelData(modelName))
 {
   this->registerObject(this, StaticModel::_objectList);
@@ -43,4 +43,13 @@
   this->setName(modelName);
 }
+
+StaticModel::StaticModel(const StaticModel& staticModel)
+  : data(staticModel.data)
+{
+  this->registerObject(this, StaticModel::_objectList);
+  this->setName(staticModel.getName());
+  this->updateBase();
+}
+
 
 /**
@@ -60,4 +69,12 @@
 }
 
+StaticModel& StaticModel::operator=(const StaticModel& model)
+{
+  this->data = model.data;
+  this->updateBase();
+  return *this;
+};
+
+
 /**
  * @brief Finalizes an Object. This can be done outside of the Class.
@@ -66,15 +83,11 @@
 {
   data->finalize();
+  this->updateBase();
+}
 
-  // write out the modelInfo data used for the collision detection!
-  this->pModelInfo.pVertices = &this->data->getVertices()[0];
-  this->pModelInfo.numVertices = this->data->getVertices().size();
-  this->pModelInfo.pNormals = &this->data->getNormals()[0];
-  this->pModelInfo.numNormals = this->data->getNormals().size();
-  this->pModelInfo.pTexCoor = &this->data->getTexCoords()[0];
-  this->pModelInfo.numTexCoor = this->data->getTexCoords().size();
-
-  this->pModelInfo.pTriangles = this->data->getTrianglesExt();
-  this->pModelInfo.numTriangles = this->data->getTriangles().size();
+void StaticModel::acquireData(const StaticModelData::Pointer& data)
+{
+  this->data = data;
+  this->updateBase();
 }
 
@@ -92,4 +105,19 @@
   return retVal;
 }
+
+void StaticModel::updateBase()
+{
+  // write out the modelInfo data used for the collision detection!
+  this->pModelInfo.pVertices = &this->data->getVertices()[0];
+  this->pModelInfo.numVertices = this->data->getVertices().size();
+  this->pModelInfo.pNormals = &this->data->getNormals()[0];
+  this->pModelInfo.numNormals = this->data->getNormals().size();
+  this->pModelInfo.pTexCoor = &this->data->getTexCoords()[0];
+  this->pModelInfo.numTexCoor = this->data->getTexCoords().size();
+
+  this->pModelInfo.pTriangles = this->data->getTrianglesExt();
+  this->pModelInfo.numTriangles = this->data->getTriangles().size();
+}
+
 
 /**
Index: /branches/new_class_id/src/lib/graphics/importer/static_model.h
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/static_model.h	(revision 9831)
+++ /branches/new_class_id/src/lib/graphics/importer/static_model.h	(revision 9832)
@@ -24,9 +24,10 @@
 {
   ObjectListDeclaration(StaticModel);
-  public:
+public:
   StaticModel(const std::string& modelName = "");
+  StaticModel(const StaticModel& staticModel);
   virtual ~StaticModel();
 
-  StaticModel& operator=(const StaticModel& model) { this->data = model.data; return *this; };
+  StaticModel& operator=(const StaticModel& model);
 
   virtual void draw() const { data->draw(); };
@@ -58,5 +59,5 @@
   void finalize();
 
-  void acquireData(const StaticModelData::Pointer& data) { this->data = data; };
+  void acquireData(const StaticModelData::Pointer& data);
   const StaticModelData::Pointer& dataPointer() const { return this->data; };
 
@@ -64,9 +65,11 @@
   float getScaleFactor() const { return data->getScaleFactor(); }
 
- protected:
+protected:
   void cubeModel();
 
- private:
-   StaticModelData::Pointer         data;
+private:
+  void updateBase();
+private:
+  StaticModelData::Pointer         data;
 };
 
Index: /branches/new_class_id/src/world_entities/world_entity.cc
===================================================================
--- /branches/new_class_id/src/world_entities/world_entity.cc	(revision 9831)
+++ /branches/new_class_id/src/world_entities/world_entity.cc	(revision 9832)
@@ -20,5 +20,6 @@
 #include "shell_command.h"
 
-#include "model.h"
+#include "util/loading/new_resource_manager.h"
+#include "resource_obj.h"
 #include "md2/md2Model.h"
 #include "md3/md3_model.h"
@@ -26,5 +27,4 @@
 #include "aabb_tree_node.h"
 
-#include "util/loading/resource_manager.h"
 #include "util/loading/load_param.h"
 #include "obb_tree.h"
@@ -83,5 +83,5 @@
 
   // registering default reactions:
-/// FIXME  this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, /*CL_WORLD_ENTITY*/ CL_PROJECTILE);
+  /// FIXME  this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, /*CL_WORLD_ENTITY*/ CL_PROJECTILE);
 
   this->toList(OM_NULL);
@@ -162,7 +162,7 @@
   std::string name = fileName;
 
-  if (  name.find( ResourceManager::getInstance()->getDataDir() ) == 0 )
-  {
-    name.erase(ResourceManager::getInstance()->getDataDir().size());
+  if (  name.find( Resources::NewResourceManager::getInstance()->mainGlobalPath().name() ) == 0 )
+  {
+    name.erase(Resources::NewResourceManager::getInstance()->mainGlobalPath().name().size());
   }
 
@@ -180,5 +180,5 @@
       {
         lodFile[offset] = 48+(int)i;
-        if (ResourceManager::isInDataDir(lodFile))
+        if (Resources::NewResourceManager::getInstance()->checkFileInMainPath( lodFile))
           this->loadModel(lodFile, scaling, i);
       }
@@ -190,16 +190,20 @@
       this->scaling = 1.0;
     }
+    /// LOADING AN OBJ FILE
     if(fileName.find(".obj") != std::string::npos)
     {
       PRINTF(4)("fetching OBJ file: %s\n", fileName.c_str());
-      BaseObject* loadedModel = ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, this->scaling);
-      if (loadedModel != NULL)
-        this->setModel(dynamic_cast<Model*>(loadedModel), modelNumber);
+      StaticModel* model = new StaticModel();
+      *model = ResourceOBJ(fileName, this->scaling);
+      if (model->getVertexCount() > 0)
+      {
+        this->setModel(model, modelNumber);
+	if( modelNumber == 0 /* FIXME && !this->isA(CL_WEAPON) */)
+	  this->buildObbTree(obbTreeDepth);
+      }
       else
-        PRINTF(1)("OBJ-File %s not found.\n", fileName.c_str());
-
-      if( modelNumber == 0 /* FIXME && !this->isA(CL_WEAPON) */)
-        this->buildObbTree(obbTreeDepth);
-    }
+        delete model;
+    }
+    /// LOADING AN MD2-model
     else if(fileName.find(".md2") != std::string::npos)
     {
@@ -212,4 +216,5 @@
         this->buildObbTree(obbTreeDepth);
     }
+    /// LOADING AN MD3-MODEL.
     else if(fileName.find(".md3") != std::string::npos)
     {
@@ -218,6 +223,6 @@
       this->setModel(m, 0);
 
-//       if( m != NULL)
-//         this->buildObbTree(obbTreeDepth);
+      //       if( m != NULL)
+      //         this->buildObbTree(obbTreeDepth);
     }
   }
@@ -240,12 +245,5 @@
   if (this->models[modelNumber] != NULL)
   {
-    Resource* resource = ResourceManager::getInstance()->locateResourceByPointer(dynamic_cast<BaseObject*>(this->models[modelNumber]));
-    if (resource != NULL)
-      ResourceManager::getInstance()->unload(resource, RP_LEVEL);
-    else
-    {
-      PRINTF(4)("Forcing model deletion\n");
-      delete this->models[modelNumber];
-    }
+    delete this->models[modelNumber];
   }
 
@@ -283,5 +281,6 @@
   }
 
-  if( this->models[0] != NULL) {
+  if( this->models[0] != NULL)
+  {
     this->aabbNode = new AABBTreeNode();
     this->aabbNode->spawnBVTree(this->models[0]);
@@ -367,5 +366,6 @@
 void WorldEntity::subscribeReaction(CREngine::CRType type)
 {
-  if( this->collisionHandles[type] != NULL)  {
+  if( this->collisionHandles[type] != NULL)
+  {
     PRINTF(2)("Registering for a CollisionReaction already subscribed to! Skipping\n");
     return;
@@ -498,6 +498,6 @@
 void removeFromReflectionList()
 {
-/// TODO
-///  State::getObject
+  /// TODO
+  ///  State::getObject
 }
 
@@ -558,8 +558,8 @@
   {
 
-  this->setAbsCoor(ray_2 - v);
-
-  }
-    else
+    this->setAbsCoor(ray_2 - v);
+
+  }
+  else
   {
     if(ray_1.x == this->getAbsCoor().x + v.x && ray_1.y == this->getAbsCoor().y + v.y + 0.1 && ray_1.z ==this->getAbsCoor().z + v.z)
@@ -645,6 +645,6 @@
     }
 
-//     if( this->aabbNode != NULL)
-//       this->aabbNode->drawBV(0, DRAW_BV_POLYGON, Vector(1, 0.6, 0.2), true);
+    //     if( this->aabbNode != NULL)
+    //       this->aabbNode->drawBV(0, DRAW_BV_POLYGON, Vector(1, 0.6, 0.2), true);
 
     glPopMatrix();
