Index: /branches/new_class_id/src/lib/coord/p_node.cc
===================================================================
--- /branches/new_class_id/src/lib/coord/p_node.cc	(revision 9782)
+++ /branches/new_class_id/src/lib/coord/p_node.cc	(revision 9783)
@@ -80,7 +80,16 @@
   PRINTF(4)("delete %s::%s\n", this->getClassCName(), this->getCName());
   // remove the Node, delete it's children (if required).
+  PNode* last = NULL;
+  this->debugNode(0);
+
   while(!this->children.empty())
   {
     PNode* deleteNode = this->children.front();
+    if (deleteNode == last)
+    {
+      PRINTF(1)("Node same as last that was tried to be deleted. FORCE delete of %p\n", deleteNode);
+      delete deleteNode;
+      continue;
+    }
     if ((this->parentMode & PNODE_PROHIBIT_CHILD_DELETE) ||
         (deleteNode->parentMode & PNODE_PROHIBIT_DELETE_WITH_PARENT))
@@ -108,4 +117,5 @@
       delete deleteNode;
     }
+    last = deleteNode;
   }
 
@@ -913,5 +923,5 @@
   int childNodeCount = 0;
   this->countChildNodes(childNodeCount);
-
+  printf("%p:", this);
   PRINT(0)("PNode(%s::%s) - absCoord: (%0.2f, %0.2f, %0.2f), relCoord(%0.2f, %0.2f, %0.2f), direction(%0.2f, %0.2f, %0.2f) - %s - %d childs\n",
            this->getClassCName(),
Index: /branches/new_class_id/src/lib/util/loading/resource.cc
===================================================================
--- /branches/new_class_id/src/lib/util/loading/resource.cc	(revision 9782)
+++ /branches/new_class_id/src/lib/util/loading/resource.cc	(revision 9783)
@@ -37,2 +37,16 @@
   // delete what has to be deleted here
 }
+
+
+
+
+
+
+
+
+void Resource::KeepLevel::setKeepLevelName(unsigned int level, const std::string& name)
+{
+  if (_keepLevelName.size() <= level)
+    _keepLevelName.resize(level+1);
+  _keepLevelName[level] = name;
+}
Index: /branches/new_class_id/src/lib/util/loading/resource.h
===================================================================
--- /branches/new_class_id/src/lib/util/loading/resource.h	(revision 9782)
+++ /branches/new_class_id/src/lib/util/loading/resource.h	(revision 9783)
@@ -24,23 +24,26 @@
   {
   public:
-    void setKeepLevelName(unsigned int level, const std::string& name)
-    {
-      if (_keepLevelName.size() <= level)
-        _keepLevelName.resize(level+1);
-      _keepLevelName[level] = name;
-    }
+    void setKeepLevelName(unsigned int level, const std::string& name);
   private:
     std::vector<std::string>     _keepLevelName;
   };
 
-
+protected:
   class Type
   {
   public:
-    Type(const ClassID& classID) : _classID(classID) { };
+    Type(const ClassID& classID) : _id(-1), _classID(classID) { };
 
     void addExtension(const std::string& extension);
 
+    const ClassID& storedClassID() const { return _classID; };
+    int id() const { return _id; };
+    const std::vector<std::string>& resourcePaths() const { return _resourcePaths; };
+
+
+    void setID(int id);
+
   private:
+    int                           _id;
     const ClassID&                _classID;
     std::vector<std::string>      _resourcePaths;
@@ -49,4 +52,5 @@
   };
 
+  class Pointer {};
 
 
@@ -55,10 +59,12 @@
   virtual ~Resource();
 
-  virtual bool load(std::string& fileName, const MultiType& param1, const MultiType& param2);
+  bool loadResource(std::string& fileName, Resource::Pointer* ptr);
   virtual bool reload();
   virtual bool unload();
 
 
+
 private:
+  std::string              _loadString;             //!< An identifier, to match when loading a File.
   std::string              _fileName;
   MultiType                _parameters[3];          //!< The Parameters given to this Resource.
Index: /branches/new_class_id/src/world_entities/projectiles/projectile.cc
===================================================================
--- /branches/new_class_id/src/world_entities/projectiles/projectile.cc	(revision 9782)
+++ /branches/new_class_id/src/world_entities/projectiles/projectile.cc	(revision 9783)
@@ -149,5 +149,5 @@
 {
   if (this->target == NULL)
-    this->target = new PNode(target, PNODE_PARENT_MODE_DEFAULT | PNODE_REPARENT_ON_PARENTS_REMOVE);
+    this->target = new PNode(target, PNODE_REPARENT_ON_PARENTS_REMOVE | PNODE_REPARENT_TO_NULL | PNODE_PROHIBIT_DELETE_WITH_PARENT);
   else
     this->target->setParent(target);
