Index: orxonox/trunk/src/lib/util/resource_manager.cc
===================================================================
--- orxonox/trunk/src/lib/util/resource_manager.cc	(revision 3675)
+++ orxonox/trunk/src/lib/util/resource_manager.cc	(revision 3676)
@@ -217,4 +217,5 @@
 	  if(isFile(fullName))
 	    {
+	      PRINTF(4)("Image %s resides to %s\n", fileName, fullName);
 	      tmpResource->pointer = new Texture(fullName);
 	    }
@@ -229,5 +230,10 @@
 		  sprintf(imgName, "%s%s", tmpDir, fileName);
 		  if(isFile(imgName))
-		    tmpResource->pointer = new Texture(imgName);
+		    {
+		      PRINTF(4)("Image %s resides to %s\n", fileName, imgName);
+		      tmpResource->pointer = new Texture(imgName);
+		      delete []imgName;
+		      break;
+		    }
 		  delete []imgName;
 		  tmpDir = iterator->nextElement();
@@ -242,11 +248,4 @@
 	  PRINTF(1)("No type found for %s.\n   !!This should not happen unless the Type is not supported yet.!!\n", tmpResource->name);
 	  break;
-	}
-      
-      // checking if the File really exists.
-      if(!isFile(fullName))
-	{
-	  PRINTF(2)("Sorry, %s is not a regular file.\n", fullName);
-	  tmpResource->pointer = NULL;
 	}
       this->resourceList->add(tmpResource);
@@ -413,2 +412,72 @@
     return false;
 }
+
+/**
+   \brief outputs debug information about the ResourceManager
+*/
+void ResourceManager::debug(void)
+{
+  PRINT(0)("=RM===================================\n");
+  PRINT(0)("= RESOURCE-MANAGER DEBUG INFORMATION =\n");
+  PRINT(0)("======================================\n");
+  // if it is not initialized
+  PRINT(0)(" Reference is: %p\n", ResourceManager::singletonRef);
+  PRINT(0)(" Data-Directory is: %s\n", this->dataDir);
+  PRINT(0)(" List of Image-Directories: ");
+  tIterator<char>* tmpIt = imageDirs->getIterator();
+  char* tmpDir = tmpIt->nextElement();
+  while(tmpDir)
+    {
+      PRINT(0)("%s ",tmpDir);
+      tmpDir = tmpIt->nextElement();
+    }
+  delete tmpIt;
+  PRINT(0)("\n");
+
+  PRINT(0)("List of all stored Resources:\n");
+  tIterator<Resource>* iterator = resourceList->getIterator();
+  Resource* enumRes = iterator->nextElement();
+  while (enumRes)
+    {
+      PRINT(0)("-----------------------------------------\n");
+      PRINT(0)("Name: %s; References: %d; Type:", enumRes->name, enumRes->count);
+      switch (enumRes->type)
+	{
+	case OBJ:
+	  PRINT(0)("ObjectModel\n");
+	  break;
+	case PRIM:
+	  PRINT(0)("PrimitiveModel\n");
+	  break;
+	case IMAGE:
+	  PRINT(0)("ImageFile (Texture)\n");
+	  break;
+	default:
+	  PRINT(0)("SoundFile\n");
+	  break;
+	}
+      PRINT(0)("gets deleted at ");
+      switch(enumRes->prio)
+	{
+	default:
+	case RP_NO:
+	  PRINT(0)("first posibility (0)\n");
+	  break;
+	case RP_LEVEL:
+	  PRINT(0)("the end of the Level (1)\n");
+	  break;
+	case RP_CAMPAIGN:
+	  PRINT(0)("the end of the campaign (2)\n");
+	  break;
+	case RP_GAME:
+	  PRINT(0)("when leaving the game (3)\n");
+	  break;
+	}
+      enumRes = iterator->nextElement();
+    }
+  delete iterator;
+
+
+
+  PRINT(0)("==================================RM==\n");
+}
Index: orxonox/trunk/src/lib/util/resource_manager.h
===================================================================
--- orxonox/trunk/src/lib/util/resource_manager.h	(revision 3675)
+++ orxonox/trunk/src/lib/util/resource_manager.h	(revision 3676)
@@ -63,4 +63,5 @@
   bool unload(Resource* resource, ResourcePriority = RP_NO);
   bool unloadAllByPriority(ResourcePriority prio);
+  void debug(void);
 
  private:
@@ -77,5 +78,6 @@
   
   bool isDir(const char* directory);
-  bool isFile(const char* directory);  
+  bool isFile(const char* directory);
+
 };
 
Index: orxonox/trunk/src/orxonox.cc
===================================================================
--- orxonox/trunk/src/orxonox.cc	(revision 3675)
+++ orxonox/trunk/src/orxonox.cc	(revision 3676)
@@ -331,5 +331,5 @@
   orx->start();
   
-  //  delete orx;
+  delete orx;
   
 }
Index: orxonox/trunk/src/story_entities/world.cc
===================================================================
--- orxonox/trunk/src/story_entities/world.cc	(revision 3675)
+++ orxonox/trunk/src/story_entities/world.cc	(revision 3676)
@@ -145,4 +145,5 @@
   cn->unbind(this->localPlayer);
   cn->reset();
+  ResourceManager::getInstance()->debug();
 
   ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL);
Index: orxonox/trunk/src/world_entities/projectile.cc
===================================================================
--- orxonox/trunk/src/world_entities/projectile.cc	(revision 3675)
+++ orxonox/trunk/src/world_entities/projectile.cc	(revision 3676)
@@ -33,6 +33,5 @@
 Projectile::Projectile () : WorldEntity()
 {
-  this->model = (Model*)ResourceManager::getInstance()->load("cube", PRIM, RP_LEVEL);
-  //  this->projectileModel = new Primitive(P_SPHERE);
+  this->model = (Model*)ResourceManager::getInstance()->load("sphere", PRIM, RP_LEVEL);
   this->flightDirection = NULL;
   this->currentLifeTime = 0.0f;
@@ -138,5 +137,4 @@
   glMultMatrixf((float*)matrix);  
   this->model->draw();
-  //this->projectileModel->draw();
 
   glPopMatrix();
Index: orxonox/trunk/src/world_entities/projectile.h
===================================================================
--- orxonox/trunk/src/world_entities/projectile.h	(revision 3675)
+++ orxonox/trunk/src/world_entities/projectile.h	(revision 3676)
@@ -9,5 +9,4 @@
 #include "world_entity.h"
 
-class Primitive;
 class Vector;
 
@@ -32,5 +31,4 @@
  private:
   //physical attriutes like: force, speed, acceleration etc.
-  Primitive* projectileModel;          //!< this serves temporary as a plasma bullet
   float speed;                         //!< this is the speed of the projectile
   float currentLifeTime;               //!< this is the time, the projectile exists in this world (incremented by tick)
