Index: code/branches/objecthierarchy/src/core/BaseObject.cc
===================================================================
--- code/branches/objecthierarchy/src/core/BaseObject.cc	(revision 2072)
+++ code/branches/objecthierarchy/src/core/BaseObject.cc	(revision 2074)
@@ -38,4 +38,5 @@
 #include "XMLPort.h"
 #include "XMLFile.h"
+#include "XMLNameListener.h"
 #include "Template.h"
 #include "util/String.h"
@@ -81,5 +82,8 @@
     {
         for (std::list<BaseObject*>::const_iterator it = this->events_.begin(); it != this->events_.end(); ++it)
-            (*it)->eventListeners_.erase(this);
+            (*it)->unregisterEventListener(this);
+
+        for (std::map<BaseObject*, std::string>::const_iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); ++it)
+            it->first->removeEvent(this);
     }
 
@@ -92,5 +96,5 @@
     void BaseObject::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
-        XMLPortParam(BaseObject, "name", setName, getName, xmlelement, mode);
+        XMLPortParam(BaseObject, "name", setXMLName, getName, xmlelement, mode);
         XMLPortParam(BaseObject, "visible", setVisible, isVisible, xmlelement, mode);
         XMLPortParam(BaseObject, "active", setActive, isActive, xmlelement, mode);
@@ -135,4 +139,16 @@
 
     /**
+        @brief Loads the name of the object through XML and calls all XMLNameListener.
+        @param name The name of the object
+    */
+    void BaseObject::setXMLName(const std::string& name)
+    {
+        this->setName(name);
+
+        for (ObjectList<XMLNameListener>::iterator it = ObjectList<XMLNameListener>::begin(); it != ObjectList<XMLNameListener>::end(); ++it)
+            it->loadedNewXMLName(this);
+    }
+
+    /**
         @brief Returns the levelfile that loaded this object.
         @return The levelfile
@@ -187,6 +203,11 @@
     void BaseObject::addEvent(BaseObject* event, const std::string& sectionname)
     {
-        event->eventListeners_[this] = sectionname;
+        event->registerEventListener(this, sectionname);
         this->events_.push_back(event);
+    }
+
+    void BaseObject::removeEvent(BaseObject* event)
+    {
+        this->events_.remove(event);
     }
 
@@ -232,5 +253,10 @@
     void BaseObject::fireEvent(bool activate)
     {
-        Event event(activate, this);
+        this->fireEvent(activate, this);
+    }
+
+    void BaseObject::fireEvent(bool activate, BaseObject* originator)
+    {
+        Event event(activate, originator);
 
         for (std::map<BaseObject*, std::string>::iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); ++it)
@@ -241,4 +267,10 @@
     }
 
+    void BaseObject::fireEvent(Event& event)
+    {
+        for (std::map<BaseObject*, std::string>::iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); ++it)
+            it->first->processEvent(event);
+    }
+
     void BaseObject::processEvent(Event& event)
     {
Index: code/branches/objecthierarchy/src/core/BaseObject.h
===================================================================
--- code/branches/objecthierarchy/src/core/BaseObject.h	(revision 2072)
+++ code/branches/objecthierarchy/src/core/BaseObject.h	(revision 2074)
@@ -115,8 +115,16 @@
             void fireEvent();
             void fireEvent(bool activate);
+            void fireEvent(bool activate, BaseObject* originator);
+            void fireEvent(Event& event);
 
             virtual void processEvent(Event& event);
 
+            inline void registerEventListener(BaseObject* object, const std::string& sectionname)
+                { this->eventListeners_[object] = sectionname; }
+            inline void unregisterEventListener(BaseObject* object)
+                { this->eventListeners_.erase(object); }
+
             void addEvent(BaseObject* event, const std::string& sectionname);
+            void removeEvent(BaseObject* event);
             BaseObject* getEvent(unsigned int index) const;
 
@@ -136,4 +144,5 @@
 
         private:
+            void setXMLName(const std::string& name);
             Template* getTemplate(unsigned int index) const;
 
Index: code/branches/objecthierarchy/src/core/CMakeLists.txt
===================================================================
--- code/branches/objecthierarchy/src/core/CMakeLists.txt	(revision 2072)
+++ code/branches/objecthierarchy/src/core/CMakeLists.txt	(revision 2074)
@@ -34,4 +34,5 @@
   Template.cc
   XMLPort.cc
+  XMLNameListener.cc
 
   # shell
Index: code/branches/objecthierarchy/src/core/CorePrereqs.h
===================================================================
--- code/branches/objecthierarchy/src/core/CorePrereqs.h	(revision 2072)
+++ code/branches/objecthierarchy/src/core/CorePrereqs.h	(revision 2074)
@@ -155,4 +155,5 @@
   class Tickable;
   class XMLFile;
+  class XMLNameListener;
   template <class T, class O>
   class XMLPortClassObjectContainer;
Index: code/branches/objecthierarchy/src/core/XMLNameListener.cc
===================================================================
--- code/branches/objecthierarchy/src/core/XMLNameListener.cc	(revision 2074)
+++ code/branches/objecthierarchy/src/core/XMLNameListener.cc	(revision 2074)
@@ -0,0 +1,38 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "XMLNameListener.h"
+#include "CoreIncludes.h"
+
+namespace orxonox
+{
+    XMLNameListener::XMLNameListener()
+    {
+        RegisterRootObject(XMLNameListener);
+    }
+}
Index: code/branches/objecthierarchy/src/core/XMLNameListener.h
===================================================================
--- code/branches/objecthierarchy/src/core/XMLNameListener.h	(revision 2074)
+++ code/branches/objecthierarchy/src/core/XMLNameListener.h	(revision 2074)
@@ -0,0 +1,47 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _XMLNameListener_H__
+#define _XMLNameListener_H__
+
+#include "CorePrereqs.h"
+#include "OrxonoxClass.h"
+
+namespace orxonox
+{
+    class _CoreExport XMLNameListener : virtual public OrxonoxClass
+    {
+        public:
+            XMLNameListener();
+            virtual ~XMLNameListener() {}
+
+            virtual void loadedNewXMLName(BaseObject* object) = 0;
+    };
+}
+
+#endif /* _XMLNameListener_H__ */
