Index: code/branches/libraries2/src/modules/objects/Attacher.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/Attacher.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/Attacher.cc	(revision 5728)
@@ -0,0 +1,120 @@
+/*
+ *   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 "Attacher.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(Attacher);
+
+    Attacher::Attacher(BaseObject* creator) : StaticEntity(creator)
+    {
+        RegisterObject(Attacher);
+
+        this->target_ = 0;
+    }
+
+    void Attacher::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Attacher, XMLPort, xmlelement, mode);
+
+        XMLPortParam(Attacher, "target", setTarget, getTarget, xmlelement, mode);
+        XMLPortObject(Attacher, WorldEntity, "", addObject, getObject, xmlelement, mode);
+    }
+
+    void Attacher::processEvent(Event& event)
+    {
+        for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+            (*it)->fireEvent(event);
+    }
+
+    void Attacher::changedActivity()
+    {
+        SUPER(Attacher, changedActivity);
+
+        for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+            (*it)->setActive(this->isActive());
+    }
+
+    void Attacher::changedVisibility()
+    {
+        SUPER(Attacher, changedVisibility);
+
+        for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+            (*it)->setVisible(this->isVisible());
+    }
+
+    void Attacher::addObject(WorldEntity* object)
+    {
+        this->objects_.push_back(object);
+
+        this->attach(object);
+    }
+
+    WorldEntity* Attacher::getObject(unsigned int index) const
+    {
+        unsigned int i = 0;
+        for (std::list<WorldEntity*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+        {
+            if (i == index)
+                return (*it);
+
+            ++i;
+        }
+        return 0;
+    }
+
+    void Attacher::setTarget(const std::string& target)
+    {
+        this->targetname_ = target;
+        this->target_ = 0;
+
+        if (this->targetname_ == "")
+            return;
+
+        for (ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it != ObjectList<WorldEntity>::end(); ++it)
+            if (it->getName() == this->targetname_)
+                this->attachToParent(*it);
+    }
+
+    void Attacher::loadedNewXMLName(BaseObject* object)
+    {
+        if (this->target_ || this->targetname_ == "")
+            return;
+
+        WorldEntity* entity = orxonox_cast<WorldEntity*>(object);
+        if (entity && entity->getName() == this->targetname_)
+        {
+            this->target_ = entity;
+            this->attachToParent(entity);
+        }
+    }
+}
Index: code/branches/libraries2/src/modules/objects/Attacher.h
===================================================================
--- code/branches/libraries2/src/modules/objects/Attacher.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/Attacher.h	(revision 5728)
@@ -0,0 +1,69 @@
+/*
+ *   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 _Attacher_H__
+#define _Attacher_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <list>
+#include <string>
+#include "core/XMLNameListener.h"
+#include "objects/worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Attacher : public StaticEntity, public XMLNameListener
+    {
+        public:
+            Attacher(BaseObject* creator);
+            virtual ~Attacher() {}
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            virtual void processEvent(Event& event);
+            virtual void changedActivity();
+            virtual void changedVisibility();
+
+            void addObject(WorldEntity* object);
+            WorldEntity* getObject(unsigned int index) const;
+
+            void setTarget(const std::string& target);
+            inline const std::string& getTarget() const
+                { return this->targetname_; }
+
+            void loadedNewXMLName(BaseObject* object);
+
+        private:
+            WorldEntity* target_;
+            std::string targetname_;
+            std::list<WorldEntity*> objects_;
+    };
+}
+
+#endif /* _Attacher_H__ */
Index: code/branches/libraries2/src/modules/objects/ForceField.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/ForceField.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/ForceField.cc	(revision 5728)
@@ -0,0 +1,87 @@
+/*
+ *   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:
+ *      Aurelian Jaggi
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ForceField.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "objects/worldentities/MobileEntity.h"
+
+namespace orxonox
+{
+    CreateFactory(ForceField);
+
+    ForceField::ForceField(BaseObject* creator) : StaticEntity(creator)
+    {
+        RegisterObject(ForceField);
+
+        //Standard Values
+        this->setDirection(Vector3::ZERO);
+        velocity_ = 100;
+        diameter_ = 500;
+        length_ = 5000;
+    }
+
+    ForceField::~ForceField() {}
+
+    void ForceField::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(ForceField, XMLPort, xmlelement, mode);
+ 
+        //For correct xml import use: position, direction, velocity, scale
+        XMLPortParam(ForceField, "velocity", setVelocity, getVelocity, xmlelement, mode).defaultValues(100);
+        XMLPortParam(ForceField, "diameter", setDiameter, getDiameter, xmlelement, mode).defaultValues(500);
+        XMLPortParam(ForceField, "length"  , setLength  , getLength  , xmlelement, mode).defaultValues(2000);
+    }
+
+    void ForceField::tick(float dt)
+    {
+        for (ObjectList<MobileEntity>::iterator it = ObjectList<MobileEntity>::begin(); it != ObjectList<MobileEntity>::end(); ++it)
+        {
+            //calculate from
+            Vector3 directionVec = this->getOrientation() * WorldEntity::FRONT;
+            directionVec.normalise();
+
+            Vector3 distanceVec = it->getWorldPosition() - (this->getWorldPosition() + (this->length_ / 2 * directionVec));
+
+            //distance from centervector of the field (
+            float distFromCenterVec = ((it->getWorldPosition() - this->getWorldPosition()).crossProduct(directionVec)).length();
+
+            if (distanceVec.length() < this->length_ / 2 && distFromCenterVec < diameter_ / 2)
+            {
+                //normalize distance from center
+                it->applyCentralForce(((diameter_ / 2 - distFromCenterVec) / (diameter_ / 2)) * directionVec * velocity_);
+            }
+        }
+    }
+}
+
+
+
+
+
Index: code/branches/libraries2/src/modules/objects/ForceField.h
===================================================================
--- code/branches/libraries2/src/modules/objects/ForceField.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/ForceField.h	(revision 5728)
@@ -0,0 +1,74 @@
+/*
+ *   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:
+ *      Aurelian Jaggi
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _ForceField_H__
+#define _ForceField_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "StaticEntity.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport ForceField : public StaticEntity, public Tickable
+    {
+    public:
+        ForceField(BaseObject* creator);
+        virtual ~ForceField();
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+        virtual void tick(float dt);
+
+        inline void setVelocity(float vel)
+            { this->velocity_ = vel; }
+
+        inline float getVelocity()
+            { return velocity_; }
+
+        inline void setDiameter(float diam)
+            { this->diameter_ = diam; }
+
+        inline float getDiameter()
+            { return diameter_; }
+
+        inline void setLength(float l)
+            { this->length_ = l; }
+
+        inline float getLength()
+            { return length_; }
+
+    private:
+        float velocity_;
+        float diameter_;
+        float length_;
+  };
+}
+
+#endif
+
Index: code/branches/libraries2/src/modules/objects/Planet.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/Planet.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/Planet.cc	(revision 5728)
@@ -0,0 +1,175 @@
+/*
+ *   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:
+ *      Marian Runo
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Planet.h"
+
+#include <OgreEntity.h>
+#include <OgreBillboardSet.h>
+#include <OgreProgressiveMesh.h>
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "core/XMLPort.h"
+#include "objects/Scene.h"
+#include "Camera.h"
+#include "CameraManager.h"
+
+namespace orxonox
+{
+    CreateFactory(Planet);    
+
+    /**
+     * @brief Constructor
+     */
+    Planet::Planet(BaseObject* creator): MovableEntity(creator)
+    {
+        RegisterObject(Planet);
+        this->registerVariables();
+    }
+
+    /**
+     * @brief Destructor
+     */
+    Planet::~Planet()
+    {
+        if (this->isInitialized() && this->mesh_.getEntity())
+            this->detachOgreObject(this->mesh_.getEntity());
+    }    
+
+    void Planet::tick(float dt)
+    {
+        if(!this->isVisible())
+            return;
+
+        if (GameMode::showsGraphics())
+        {
+            Camera* activeCamera = CameraManager::getInstance().getActiveCamera();
+            if(activeCamera)
+            {
+                float distance = this->getPosition().distance( activeCamera->getWorldPosition() );
+                //             COUT(2) << distance << std::endl;
+                float planetRadius = this->getScale();
+
+                float newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius);
+                float tempTest = newScale*(1+float(this->atmosphereSize)/float(this->imageSize));
+                newScale = tempTest;
+
+                this->billboard_.getBillboardSet()->setDefaultDimensions(newScale, newScale);
+            }
+        }
+
+        SUPER(Planet, tick, dt);
+    }
+
+    void Planet::init()
+    {
+        float scaleFactor = this->getScale();
+
+        this->distList.push_back(10.0f*scaleFactor);
+        this->distList.push_back(19.0f*scaleFactor);
+        this->distList.push_back(27.0f*scaleFactor);
+        this->distList.push_back(34.0f*scaleFactor);
+        this->distList.push_back(40.0f*scaleFactor);
+        this->distList.push_back(45.0f*scaleFactor);
+        this->distList.push_back(49.0f*scaleFactor);
+        this->distList.push_back(52.0f*scaleFactor);
+        this->distList.push_back(54.0f*scaleFactor);
+        this->distList.push_back(55.0f*scaleFactor);
+
+        float reductionValue = 0.2f;
+
+        this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
+        billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->atmosphere_, Vector3(0,0,0));
+
+        this->attachOgreObject(this->billboard_.getBillboardSet());    
+        this->billboard_.getBillboardSet()->setUseAccurateFacing(true);
+        this->setCastShadows(true);
+        this->billboard_.getBillboardSet()->setRenderQueueGroup(this->mesh_.getEntity()->getRenderQueueGroup());
+        this->mesh_.setCastShadows(true);
+    }
+
+    void Planet::changedMesh()
+    {
+        if (this->mesh_.getEntity())
+            this->detachOgreObject(this->mesh_.getEntity());
+
+        this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
+
+        if (this->mesh_.getEntity())
+        {
+            this->attachOgreObject(this->mesh_.getEntity());
+            this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
+            this->mesh_.setVisible(this->isVisible());
+        }
+        this->init();
+    }
+
+    void Planet::changedShadows()
+    {
+        this->mesh_.setCastShadows(this->bCastShadows_);
+    }
+
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    void Planet::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Planet, XMLPort, xmlelement, mode);
+
+        if (GameMode::showsGraphics())
+        {
+            XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere");
+            XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode);     
+            XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode);         
+            XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
+            XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
+        }
+    }
+
+    void Planet::registerVariables()
+    {
+        registerVariable(this->atmosphere_, VariableDirection::ToClient);
+        registerVariable(this->meshSrc_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedMesh));
+        registerVariable(this->bCastShadows_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedShadows));
+        registerVariable(this->atmosphereSize, VariableDirection::ToClient);
+        registerVariable(this->imageSize, VariableDirection::ToClient);
+    }
+
+    void Planet::changedVisibility()
+    {
+        SUPER(Planet, changedVisibility);
+        if (this->isInitialized())
+        {
+            this->mesh_.setVisible(this->isVisible());
+            this->billboard_.setVisible(this->isVisible());
+        }
+    }
+}
Index: code/branches/libraries2/src/modules/objects/Planet.h
===================================================================
--- code/branches/libraries2/src/modules/objects/Planet.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/Planet.h	(revision 5728)
@@ -0,0 +1,116 @@
+/*
+ *   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:
+ *      Marian Runo
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Planet_H__
+#define _Planet_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "tools/BillboardSet.h"
+#include "tools/Mesh.h"
+#include "MovableEntity.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Planet : public MovableEntity
+    {
+        public:
+            Planet(BaseObject* creator);
+            
+            virtual ~Planet();
+            
+            void init();
+            virtual void tick(float dt);
+            
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            
+            virtual void changedVisibility();
+            
+            inline void setMeshSource(const std::string& meshname)
+                { this->meshSrc_ = meshname; this->changedMesh(); }
+                
+            inline const std::string& getMeshSource() const
+                { return this->meshSrc_; }
+
+            inline void setCastShadows(bool bCastShadows)
+                { this->bCastShadows_ = bCastShadows; this->changedShadows(); }
+                
+            inline bool getCastShadows() const
+                { return this->bCastShadows_; }            
+            
+            inline const std::string& getMesh() const{
+                return this->meshSrc_;
+            }
+            
+            inline void setAtmosphereSize(float size){
+                this->atmosphereSize = size;
+            }
+            
+            inline float getAtmosphereSize(){
+                return this->atmosphereSize;
+            }
+            
+            inline void setAtmosphere(const std::string& atmosphere){
+                this->atmosphere_ = atmosphere;
+            }
+            
+            inline const std::string& getAtmosphere(){
+                return this->atmosphere_;
+            }
+            
+            inline void setImageSize(float size){
+                this->imageSize = size;
+            }
+            
+            inline float getImageSize(){
+                return this->imageSize;
+            }
+
+        protected:
+            void registerVariables();
+
+        private:
+        
+            void changedMesh();
+            void changedShadows();
+            
+            std::string meshSrc_;
+            std::string atmosphere_;
+            Mesh mesh_;
+            float atmosphereSize;
+            float imageSize;
+            std::vector<float> distList;
+            BillboardSet billboard_;
+            bool bCastShadows_;
+
+    };
+}
+
+#endif
+
Index: code/branches/libraries2/src/modules/objects/Script.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/Script.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/Script.cc	(revision 5728)
@@ -0,0 +1,64 @@
+/*
+ *   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:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Script.h"
+
+#include "core/CoreIncludes.h"
+#include "core/LuaState.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(Script);
+
+    Script::Script(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(Script);
+
+        // Get a new LuaState
+        luaState_ = new LuaState();
+    }
+
+    Script::~Script()
+    {
+        if (this->isInitialized())
+            delete luaState_;
+    }
+
+    void Script::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        BaseObject::XMLPort(xmlelement, mode);
+
+        XMLPortParam(Script, "code", setCode, getCode, xmlelement, mode);
+    }
+
+    void Script::execute()
+    {
+        luaState_->doString(code_);
+    }
+}
Index: code/branches/libraries2/src/modules/objects/Script.h
===================================================================
--- code/branches/libraries2/src/modules/objects/Script.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/Script.h	(revision 5728)
@@ -0,0 +1,56 @@
+/*
+ *   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:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Script_H__
+#define _Script_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Script : public BaseObject
+    {
+    public:
+        Script(BaseObject* creator);
+        ~Script();
+        void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+        void execute();
+
+        void setCode(const std::string& code) { code_ = code; }
+        const std::string& getCode() const { return code_; }
+
+    private:
+        std::string code_;
+        LuaState* luaState_;
+    };
+}
+
+#endif /* _Script_H__ */
Index: code/branches/libraries2/src/modules/objects/collisionshapes/BoxCollisionShape.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/collisionshapes/BoxCollisionShape.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/collisionshapes/BoxCollisionShape.cc	(revision 5728)
@@ -0,0 +1,76 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "BoxCollisionShape.h"
+
+#include <BulletCollision/CollisionShapes/btBoxShape.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "tools/BulletConversions.h"
+
+namespace orxonox
+{
+    CreateFactory(BoxCollisionShape);
+
+    BoxCollisionShape::BoxCollisionShape(BaseObject* creator) : CollisionShape(creator)
+    {
+        RegisterObject(BoxCollisionShape);
+
+        this->halfExtents_ = Vector3(1, 1, 1);
+        updateShape();
+
+        this->registerVariables();
+    }
+
+    BoxCollisionShape::~BoxCollisionShape()
+    {
+        if (this->isInitialized())
+            delete this->collisionShape_;
+    }
+
+    void BoxCollisionShape::registerVariables()
+    {
+        registerVariable(this->halfExtents_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+    }
+
+    void BoxCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(BoxCollisionShape, XMLPort, xmlelement, mode);
+
+        XMLPortParam(BoxCollisionShape, "halfExtents",  setHalfExtents,  getHalfExtents,  xmlelement, mode);
+        XMLPortParamLoadOnly(BoxCollisionShape, "width",  setWidth,  xmlelement, mode);
+        XMLPortParamLoadOnly(BoxCollisionShape, "height", setHeight, xmlelement, mode);    
+        XMLPortParamLoadOnly(BoxCollisionShape, "length", setLength, xmlelement, mode);    
+    }
+
+    btCollisionShape* BoxCollisionShape::createNewShape() const
+    {
+        return new btBoxShape(multi_cast<btVector3>(this->halfExtents_));
+    }
+}
Index: code/branches/libraries2/src/modules/objects/collisionshapes/BoxCollisionShape.h
===================================================================
--- code/branches/libraries2/src/modules/objects/collisionshapes/BoxCollisionShape.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/collisionshapes/BoxCollisionShape.h	(revision 5728)
@@ -0,0 +1,75 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _BoxCollisionShape_H__
+#define _BoxCollisionShape_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+#include "CollisionShape.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport BoxCollisionShape : public CollisionShape
+    {
+        public:
+            BoxCollisionShape(BaseObject* creator);
+            virtual ~BoxCollisionShape();
+
+            void registerVariables();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            inline void setHalfExtents(const Vector3& extents)
+                { this->halfExtents_ = extents; updateShape(); }
+            inline const Vector3& getHalfExtents() const
+                { return halfExtents_;}
+
+            inline void setWidth(float value)
+                { this->halfExtents_.z = value / 2; updateShape(); }
+            inline float getWidth() const
+                { return this->halfExtents_.z * 2; }
+
+            inline void setHeight(float value)
+                { this->halfExtents_.y = value / 2; updateShape(); }
+            inline float getHeight() const
+                { return this->halfExtents_.y * 2; }
+
+            inline void setLength(float value)
+                { this->halfExtents_.x = value / 2; updateShape(); }
+            inline float getLength() const
+                { return this->halfExtents_.x * 2; }
+
+        private:
+            btCollisionShape* createNewShape() const;
+
+            Vector3 halfExtents_;
+     };
+}
+
+#endif /* _BoxCollisionShape_H__ */
Index: code/branches/libraries2/src/modules/objects/collisionshapes/ConeCollisionShape.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/collisionshapes/ConeCollisionShape.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/collisionshapes/ConeCollisionShape.cc	(revision 5728)
@@ -0,0 +1,75 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ConeCollisionShape.h"
+
+#include <BulletCollision/CollisionShapes/btConeShape.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(ConeCollisionShape);
+
+    ConeCollisionShape::ConeCollisionShape(BaseObject* creator) : CollisionShape(creator)
+    {
+        RegisterObject(ConeCollisionShape);
+
+        this->radius_ = 1.0f;
+        this->height_ = 1.0f;
+        updateShape();
+
+        this->registerVariables();
+    }
+
+    ConeCollisionShape::~ConeCollisionShape()
+    {
+        if (this->isInitialized())
+            delete this->collisionShape_;
+    }
+
+    void ConeCollisionShape::registerVariables()
+    {
+        registerVariable(this->radius_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+        registerVariable(this->height_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+    }
+
+    void ConeCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(ConeCollisionShape, XMLPort, xmlelement, mode);
+
+        XMLPortParam(ConeCollisionShape, "radius", setRadius, getRadius, xmlelement, mode);
+        XMLPortParam(ConeCollisionShape, "height", setHeight, getHeight, xmlelement, mode);    
+    }
+
+    btCollisionShape* ConeCollisionShape::createNewShape() const
+    {
+        return new btConeShape(this->radius_, this->height_);
+    }
+}
Index: code/branches/libraries2/src/modules/objects/collisionshapes/ConeCollisionShape.h
===================================================================
--- code/branches/libraries2/src/modules/objects/collisionshapes/ConeCollisionShape.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/collisionshapes/ConeCollisionShape.h	(revision 5728)
@@ -0,0 +1,64 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ConeCollisionShape_H__
+#define _ConeCollisionShape_H__
+
+#include "OrxonoxPrereqs.h"
+#include "CollisionShape.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport ConeCollisionShape : public CollisionShape
+    {
+        public:
+            ConeCollisionShape(BaseObject* creator);
+            virtual ~ConeCollisionShape();
+
+            void registerVariables();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            inline void setRadius(float value)
+                { this->radius_ = value; updateShape(); }
+            inline float getRadius() const
+                { return radius_; }
+
+            inline void setHeight(float value)
+                { this->height_ = value; updateShape(); }
+            inline float getHeight() const
+                { return this->height_; }
+
+        private:
+            btCollisionShape* createNewShape() const;
+
+            float radius_;
+            float height_;
+     };
+}
+
+#endif /* _ConeCollisionShape_H__ */
Index: code/branches/libraries2/src/modules/objects/collisionshapes/PlaneCollisionShape.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/collisionshapes/PlaneCollisionShape.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/collisionshapes/PlaneCollisionShape.cc	(revision 5728)
@@ -0,0 +1,76 @@
+/*
+ *   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:
+ *      Martin Stypinski
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "PlaneCollisionShape.h"
+
+#include <BulletCollision/CollisionShapes/btStaticPlaneShape.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "tools/BulletConversions.h"
+
+namespace orxonox
+{
+    CreateFactory(PlaneCollisionShape);
+
+    PlaneCollisionShape::PlaneCollisionShape(BaseObject* creator) : CollisionShape(creator)
+    {
+        RegisterObject(PlaneCollisionShape);
+
+        this->normal_ = Vector3(0, 1, 0);
+        this->offset_ = 0.0f;
+        updateShape();
+
+        this->registerVariables();
+    }
+
+    PlaneCollisionShape::~PlaneCollisionShape()
+    {
+        if (this->isInitialized())
+            delete this->collisionShape_;
+    }
+
+    void PlaneCollisionShape::registerVariables()
+    {
+        registerVariable(this->normal_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+        registerVariable(this->offset_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+    }
+
+    void PlaneCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(PlaneCollisionShape, XMLPort, xmlelement, mode);
+
+        XMLPortParam(PlaneCollisionShape, "normal", setNormal, getNormal, xmlelement, mode);
+        XMLPortParam(PlaneCollisionShape, "offset", setOffset, getOffset, xmlelement, mode);    
+    }
+
+    btCollisionShape* PlaneCollisionShape::createNewShape() const
+    {
+        return new btStaticPlaneShape(multi_cast<btVector3>(this->normal_), this->offset_);
+    }
+}
Index: code/branches/libraries2/src/modules/objects/collisionshapes/PlaneCollisionShape.h
===================================================================
--- code/branches/libraries2/src/modules/objects/collisionshapes/PlaneCollisionShape.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/collisionshapes/PlaneCollisionShape.h	(revision 5728)
@@ -0,0 +1,66 @@
+/*
+ *   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:
+ *      Martin Stypinski
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _PlaneCollisionShape_H__
+#define _PlaneCollisionShape_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+#include "CollisionShape.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport PlaneCollisionShape : public CollisionShape
+    {
+        public:
+            PlaneCollisionShape(BaseObject* creator);
+            virtual ~PlaneCollisionShape();
+
+            void registerVariables();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            inline void setNormal(const Vector3& normal)
+                { this->normal_ = normal; updateShape(); }
+            inline const Vector3& getNormal()
+                { return normal_;}
+
+            inline void setOffset(float offset)
+                { this->offset_ = offset; updateShape(); }
+            inline float getOffset()
+                { return this->offset_;}
+
+        private:
+            btCollisionShape* createNewShape()const;
+
+            Vector3 normal_;
+            float   offset_;
+     };
+}
+
+#endif /* _PlaneCollisionShape_H__ */
Index: code/branches/libraries2/src/modules/objects/collisionshapes/SphereCollisionShape.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/collisionshapes/SphereCollisionShape.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/collisionshapes/SphereCollisionShape.cc	(revision 5728)
@@ -0,0 +1,72 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "SphereCollisionShape.h"
+
+#include <BulletCollision/CollisionShapes/btSphereShape.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(SphereCollisionShape);
+
+    SphereCollisionShape::SphereCollisionShape(BaseObject* creator) : CollisionShape(creator)
+    {
+        RegisterObject(SphereCollisionShape);
+
+        this->radius_ = 1.0f;
+        updateShape();
+
+        this->registerVariables();
+    }
+
+    SphereCollisionShape::~SphereCollisionShape()
+    {
+        if (this->isInitialized())
+            delete this->collisionShape_;
+    }
+
+    void SphereCollisionShape::registerVariables()
+    {
+        registerVariable(this->radius_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+    }
+
+    void SphereCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SphereCollisionShape, XMLPort, xmlelement, mode);
+
+        XMLPortParam(SphereCollisionShape, "radius", setRadius, getRadius, xmlelement, mode);
+    }
+
+    btCollisionShape* SphereCollisionShape::createNewShape() const
+    {
+        return new btSphereShape(this->radius_);
+    }
+}
Index: code/branches/libraries2/src/modules/objects/collisionshapes/SphereCollisionShape.h
===================================================================
--- code/branches/libraries2/src/modules/objects/collisionshapes/SphereCollisionShape.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/collisionshapes/SphereCollisionShape.h	(revision 5728)
@@ -0,0 +1,58 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _SphereCollisionShape_H__
+#define _SphereCollisionShape_H__
+
+#include "OrxonoxPrereqs.h"
+#include "CollisionShape.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport SphereCollisionShape : public CollisionShape
+    {
+        public:
+            SphereCollisionShape(BaseObject* creator);
+            virtual ~SphereCollisionShape();
+
+            void registerVariables();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            inline void setRadius(float radius)
+                { this->radius_ = radius; updateShape(); }
+            inline float getRadius() const
+                { return this->radius_; }
+
+        private:
+            btCollisionShape* createNewShape() const;
+
+            float radius_;
+    };
+}
+
+#endif /* _SphereCollisionShape_H__ */
Index: code/branches/libraries2/src/modules/objects/eventsystem/EventDispatcher.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/eventsystem/EventDispatcher.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/eventsystem/EventDispatcher.cc	(revision 5728)
@@ -0,0 +1,81 @@
+/*
+ *   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 "EventDispatcher.h"
+
+#include "core/CoreIncludes.h"
+#include "core/EventIncludes.h"
+#include "core/XMLPort.h"
+#include "EventTarget.h"
+
+namespace orxonox
+{
+    CreateFactory(EventDispatcher);
+
+    EventDispatcher::EventDispatcher(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(EventDispatcher);
+    }
+
+    EventDispatcher::~EventDispatcher()
+    {
+        if (this->isInitialized())
+            for (std::list<EventTarget*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
+                delete (*it);
+    }
+
+    void EventDispatcher::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(EventDispatcher, XMLPort, xmlelement, mode);
+
+        XMLPortObject(EventDispatcher, EventTarget, "targets", addTarget, getTarget, xmlelement, mode);
+    }
+
+    void EventDispatcher::processEvent(Event& event)
+    {
+        for (std::list<EventTarget*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
+            (*it)->fireEvent(event);
+    }
+
+    void EventDispatcher::addTarget(EventTarget* target)
+    {
+        this->targets_.push_back(target);
+    }
+
+    EventTarget* EventDispatcher::getTarget(unsigned int index) const
+    {
+        unsigned int i = 0;
+        for (std::list<EventTarget*>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
+        {
+            if (i == index)
+                return (*it);
+            ++i;
+        }
+        return 0;
+    }
+}
Index: code/branches/libraries2/src/modules/objects/eventsystem/EventDispatcher.h
===================================================================
--- code/branches/libraries2/src/modules/objects/eventsystem/EventDispatcher.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/eventsystem/EventDispatcher.h	(revision 5728)
@@ -0,0 +1,57 @@
+/*
+ *   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 _EventDispatcher_H__
+#define _EventDispatcher_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <list>
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport EventDispatcher : public BaseObject
+    {
+        public:
+            EventDispatcher(BaseObject* creator);
+            virtual ~EventDispatcher();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            virtual void processEvent(Event& event);
+
+            void addTarget(EventTarget* target);
+            EventTarget* getTarget(unsigned int index) const;
+
+        private:
+            std::list<EventTarget*> targets_;
+    };
+}
+
+#endif /* _EventDispatcher_H__ */
Index: code/branches/libraries2/src/modules/objects/eventsystem/EventListener.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/eventsystem/EventListener.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/eventsystem/EventListener.cc	(revision 5728)
@@ -0,0 +1,96 @@
+/*
+ *   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 "EventListener.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(EventListener);
+
+    EventListener::EventListener(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(EventListener);
+
+        this->bActive_ = false;
+    }
+
+    EventListener::~EventListener()
+    {
+    }
+
+    void EventListener::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(EventListener, XMLPort, xmlelement, mode);
+
+        XMLPortParam(EventListener, "event", setEventName, getEventName, xmlelement, mode);
+    }
+
+    void EventListener::processEvent(Event& event)
+    {
+        if (this->bActive_)
+        {
+            COUT(2) << "Warning: Detected Event loop in EventListener \"" << this->getName() << "\"" << std::endl;
+            return;
+        }
+
+        this->bActive_ = true;
+
+        this->fireEvent(event.activate_, event.originator_);
+
+        this->bActive_ = false;
+    }
+
+    void EventListener::setEventName(const std::string& eventname)
+    {
+        this->eventName_ = eventname;
+
+        if (this->eventName_ == "")
+            return;
+
+        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
+            if (it->getName() == this->eventName_)
+                this->registerAsListener(*it);
+    }
+
+    void EventListener::loadedNewXMLName(BaseObject* object)
+    {
+        if (this->eventName_ == "")
+            return;
+
+        if (object->getName() == this->eventName_)
+            this->registerAsListener(object);
+    }
+
+    void EventListener::registerAsListener(BaseObject* object)
+    {
+        object->registerEventListener(this, "");
+    }
+}
Index: code/branches/libraries2/src/modules/objects/eventsystem/EventListener.h
===================================================================
--- code/branches/libraries2/src/modules/objects/eventsystem/EventListener.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/eventsystem/EventListener.h	(revision 5728)
@@ -0,0 +1,63 @@
+/*
+ *   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 _EventListener_H__
+#define _EventListener_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "core/BaseObject.h"
+#include "core/XMLNameListener.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport EventListener : public BaseObject, public XMLNameListener
+    {
+        public:
+            EventListener(BaseObject* creator);
+            virtual ~EventListener();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            virtual void processEvent(Event& event);
+
+            void setEventName(const std::string& eventname);
+            inline const std::string& getEventName() const
+                { return this->eventName_; }
+
+        private:
+            virtual void loadedNewXMLName(BaseObject* object);
+            void registerAsListener(BaseObject* object);
+
+            std::string eventName_;
+            bool bActive_;
+    };
+}
+
+#endif /* _EventListener_H__ */
Index: code/branches/libraries2/src/modules/objects/eventsystem/EventTarget.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/eventsystem/EventTarget.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/eventsystem/EventTarget.cc	(revision 5728)
@@ -0,0 +1,68 @@
+/*
+ *   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 "EventTarget.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(EventTarget);
+
+    EventTarget::EventTarget(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(EventTarget);
+    }
+
+    EventTarget::~EventTarget()
+    {
+    }
+
+    void EventTarget::changedName()
+    {
+        SUPER(EventTarget, changedName);
+
+        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
+            if (it->getName() == this->getName())
+                this->addAsEvent(*it);
+    }
+
+    void EventTarget::loadedNewXMLName(BaseObject* object)
+    {
+        if (this->getName() == "")
+            return;
+
+        if (object->getName() == this->getName())
+            this->addAsEvent(object);
+    }
+
+    void EventTarget::addAsEvent(BaseObject* object)
+    {
+        if (object != static_cast<BaseObject*>(this))
+            object->addEvent(this, "");
+    }
+}
Index: code/branches/libraries2/src/modules/objects/eventsystem/EventTarget.h
===================================================================
--- code/branches/libraries2/src/modules/objects/eventsystem/EventTarget.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/eventsystem/EventTarget.h	(revision 5728)
@@ -0,0 +1,53 @@
+/*
+ *   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 _EventTarget_H__
+#define _EventTarget_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "core/BaseObject.h"
+#include "core/XMLNameListener.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport EventTarget : public BaseObject, public XMLNameListener
+    {
+        public:
+            EventTarget(BaseObject* creator);
+            virtual ~EventTarget();
+
+            virtual void changedName();
+
+        private:
+            virtual void loadedNewXMLName(BaseObject* object);
+            void addAsEvent(BaseObject* object);
+    };
+}
+
+#endif /* _EventTarget_H__ */
Index: code/branches/libraries2/src/modules/objects/triggers/CMakeLists.txt
===================================================================
--- code/branches/libraries2/src/modules/objects/triggers/CMakeLists.txt	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/triggers/CMakeLists.txt	(revision 5728)
@@ -0,0 +1,6 @@
+ADD_SOURCE_FILES(ORXONOX_SRC_FILES
+  Trigger.cc
+  DistanceTrigger.cc
+  EventTrigger.cc
+  CheckPoint.cc
+)
Index: code/branches/libraries2/src/modules/objects/triggers/CheckPoint.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/triggers/CheckPoint.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/triggers/CheckPoint.cc	(revision 5728)
@@ -0,0 +1,120 @@
+/*
+ *   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:
+ *      Aurelian Jaggi
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "CheckPoint.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "objects/gametypes/Asteroids.h"
+#include "objects/worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+    CreateFactory(CheckPoint);
+
+    CheckPoint::CheckPoint(BaseObject* creator) : DistanceTrigger(creator)
+    {
+        RegisterObject(CheckPoint);
+
+        this->setStayActive(true);
+        this->setDistance(50);
+        this->bIsFirst_ = false;
+        this->bIsDestination_ = false;
+
+        this->setRadarObjectColour(ColourValue::Green);
+        this->setRadarObjectShape(RadarViewable::Dot);
+        this->setRadarVisibility(false);
+
+        this->notifyMaskUpdate();
+    }
+
+    CheckPoint::~CheckPoint()
+    {
+    }
+
+    void CheckPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(CheckPoint, XMLPort, xmlelement, mode);
+
+        XMLPortParam(CheckPoint, "isfirst", setFirst, getFirst, xmlelement, mode).defaultValues(false);
+        XMLPortParam(CheckPoint, "isdestination", setDestination, getDestination, xmlelement, mode).defaultValues(false);
+        XMLPortParam(CheckPoint, "addtime", setAddTime, getAddTime, xmlelement, mode).defaultValues(30);
+    }
+
+    void CheckPoint::changedActivity()
+    {
+        SUPER(CheckPoint, changedActivity);
+
+        if (this->BaseObject::isActive())
+        {
+            this->setRadarVisibility(true);
+        }
+        else
+        {
+            this->setRadarVisibility(false);
+        }
+    }
+
+    void CheckPoint::triggered(bool bIsTriggered)
+    {
+        DistanceTrigger::triggered(bIsTriggered);
+
+        Asteroids* gametype = orxonox_cast<Asteroids*>(this->getGametype());
+        if (gametype)
+        {
+            gametype->addTime(addTime_);
+            this->setRadarVisibility(false);
+
+            if (bIsTriggered)
+            {
+                if (bIsFirst_)
+                {
+                    gametype->setTimeLimit(addTime_);
+                    gametype->firstCheckpointReached(true);
+                }
+
+                if (bIsDestination_)
+                {
+                    const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage("Congratulations - you have won the match!");
+                    gametype->end();
+                }
+
+                if (!bIsFirst_ && !bIsDestination_)
+                {
+                    const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage("Checkpoint reached");
+                }
+            }
+        }
+    }
+
+    void CheckPoint::notifyMaskUpdate()
+    {
+        this->targetMask_.exclude(Class(BaseObject));
+        this->targetMask_.include(Class(Pawn));
+    }
+}
Index: code/branches/libraries2/src/modules/objects/triggers/CheckPoint.h
===================================================================
--- code/branches/libraries2/src/modules/objects/triggers/CheckPoint.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/triggers/CheckPoint.h	(revision 5728)
@@ -0,0 +1,84 @@
+/*
+ *   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:
+ *      Aurelian Jaggi
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief
+*/
+
+#ifndef _CheckPoint_H__
+#define _CheckPoint_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "interfaces/RadarViewable.h"
+#include "DistanceTrigger.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport CheckPoint : public DistanceTrigger, public RadarViewable
+    {
+    public:
+        CheckPoint(BaseObject* creator);
+        virtual ~CheckPoint();
+
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a CheckPoint object through XML.
+        virtual void changedActivity();
+
+    private:
+        virtual void triggered(bool bIsTriggered);
+        virtual void notifyMaskUpdate();
+
+        inline void setDestination(bool isDestination)
+            { bIsDestination_ = isDestination; }
+
+        inline const WorldEntity* getWorldEntity() const
+            { return this; }
+
+        inline bool getDestination()
+            { return bIsDestination_; }
+
+        inline void setFirst(bool isFirst)
+            { this->bIsFirst_ = isFirst; }
+
+        inline bool getFirst()
+            { return this->bIsFirst_; }
+
+        inline void setAddTime(float time)
+            { this->addTime_ = time; }
+
+        inline bool getAddTime()
+            { return this->addTime_; }
+
+        bool bIsFirst_;
+        bool bIsDestination_;
+        float addTime_;
+    };
+}
+
+#endif /* _CheckPoint_H__ */
Index: code/branches/libraries2/src/modules/objects/triggers/DistanceTrigger.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/triggers/DistanceTrigger.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/triggers/DistanceTrigger.cc	(revision 5728)
@@ -0,0 +1,152 @@
+/*
+ *   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:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "DistanceTrigger.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "objects/worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+  CreateFactory(DistanceTrigger);
+
+  DistanceTrigger::DistanceTrigger(BaseObject* creator) : Trigger(creator)
+  {
+    RegisterObject(DistanceTrigger);
+
+    this->distance_ = 100;
+    this->targetMask_.exclude(Class(BaseObject));
+    this->setForPlayer(false); //!< Normally hasn't just ControllableEntities as targets.
+  }
+
+  DistanceTrigger::~DistanceTrigger()
+  {
+  }
+
+  void DistanceTrigger::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+  {
+    SUPER(DistanceTrigger, XMLPort, xmlelement, mode);
+
+    XMLPortParam(DistanceTrigger, "distance", setDistance, getDistance, xmlelement, mode).defaultValues(100.0f);
+    XMLPortParamLoadOnly(DistanceTrigger, "target", addTargets, xmlelement, mode).defaultValues("ControllableEntity");
+  }
+
+  void DistanceTrigger::addTarget(Ogre::Node* targetNode)
+  {
+    this->targetSet_.insert(targetNode);
+  }
+
+  void DistanceTrigger::removeTarget(Ogre::Node* targetNode)
+  {
+    int returnval = this->targetSet_.erase(targetNode);
+    if (returnval == 0)
+    {
+      COUT(2) << "Warning: Node " << targetNode << " did not exist in targetSet of trigger " << this << " !" << std::endl;
+      COUT(4) << "Content of targetSet of trigger " << this << " :" << std::endl;
+      std::set<Ogre::Node*>::iterator it;
+      for (it = this->targetSet_.begin(); it != this->targetSet_.end(); ++it)
+      {
+        COUT(4) << *it << std::endl;
+      }
+      COUT(4) << "End of targetSet of trigger " << this << std::endl;
+    }
+  }
+
+  void DistanceTrigger::addTargets(const std::string& targets)
+  {
+    Identifier* targetId = ClassByString(targets);
+
+    //! Checks whether the target is (or is derived from) a ControllableEntity.
+    Identifier* controllableEntityId = Class(ControllableEntity);
+    if(targetId->isA(controllableEntityId))
+    {
+      this->setForPlayer(true);
+    }
+
+    if (!targetId)
+    {
+        COUT(1) << "Error: \"" << targets << "\" is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ")" << std::endl;
+        return;
+    }
+
+    this->targetMask_.include(targetId);
+
+    // trigger shouldn't react on itself or other triggers
+    this->targetMask_.exclude(Class(Trigger), true);
+
+    // we only want WorldEntities
+    ClassTreeMask WEMask;
+    WEMask.include(Class(WorldEntity));
+    this->targetMask_ *= WEMask;
+
+    this->notifyMaskUpdate();
+  }
+
+  void DistanceTrigger::removeTargets(const std::string& targets)
+  {
+    Identifier* targetId = ClassByString(targets);
+    this->targetMask_.exclude(targetId);
+  }
+
+  bool DistanceTrigger::checkDistance()
+  {
+    // Iterate through all objects
+    for (ClassTreeMaskObjectIterator it = this->targetMask_.begin(); it != this->targetMask_.end(); ++it)
+    {
+      WorldEntity* entity = orxonox_cast<WorldEntity*>(*it);
+      if (!entity)
+        continue;
+
+      Vector3 distanceVec = entity->getWorldPosition() - this->getWorldPosition();
+      if (distanceVec.length() < this->distance_)
+      {
+
+        // If the target is a player (resp. is a, or is derived from a, ControllableEntity) the triggeringPlayer is set to the target entity.
+        if(this->isForPlayer())
+        {
+          Pawn* player = orxonox_cast<Pawn*>(entity);
+          this->setTriggeringPlayer(player);
+        }
+
+        return true;
+      }
+    }
+    return false;
+  }
+
+  bool DistanceTrigger::isTriggered(TriggerMode::Value mode)
+  {
+    if (Trigger::isTriggered(mode))
+    {
+      return checkDistance();
+    }
+    else
+      return false;
+  }
+}
Index: code/branches/libraries2/src/modules/objects/triggers/DistanceTrigger.h
===================================================================
--- code/branches/libraries2/src/modules/objects/triggers/DistanceTrigger.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/triggers/DistanceTrigger.h	(revision 5728)
@@ -0,0 +1,74 @@
+/*
+ *   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:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _DistanceTrigger_H__
+#define _DistanceTrigger_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <set>
+#include "core/ClassTreeMask.h"
+#include "Trigger.h"
+#include "interfaces/PlayerTrigger.h"
+
+namespace orxonox
+{
+  class _OrxonoxExport DistanceTrigger : public Trigger, public PlayerTrigger
+  {
+    public:
+      DistanceTrigger(BaseObject* creator);
+      virtual ~DistanceTrigger();
+
+      virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+      void addTarget(Ogre::Node* targetNode);
+      void addTargets(const std::string& targets);
+      void removeTarget(Ogre::Node* targetNode);
+      void removeTargets(const std::string& targets);
+
+      inline void setDistance(float distance)
+        { this->distance_ = distance; }
+      inline float getDistance() const
+        { return this->distance_; }
+
+      bool checkDistance();
+
+    protected:
+      virtual bool isTriggered(TriggerMode::Value mode);
+      virtual void notifyMaskUpdate() {}
+
+      ClassTreeMask targetMask_;
+
+    private:
+      std::set<Ogre::Node*> targetSet_;
+      float distance_;
+
+  };
+}
+
+#endif /* _DistanceTrigger_H__ */
Index: code/branches/libraries2/src/modules/objects/triggers/EventTrigger.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/triggers/EventTrigger.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/triggers/EventTrigger.cc	(revision 5728)
@@ -0,0 +1,63 @@
+/*
+ *   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 "EventTrigger.h"
+
+#include "core/CoreIncludes.h"
+#include "core/EventIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(EventTrigger);
+
+    EventTrigger::EventTrigger(BaseObject* creator) : Trigger(creator)
+    {
+        RegisterObject(EventTrigger);
+
+        this->bEventTriggered_ = false;
+    }
+
+    EventTrigger::~EventTrigger()
+    {
+    }
+
+    void EventTrigger::processEvent(Event& event)
+    {
+        SUPER(EventTrigger, processEvent, event);
+
+        ORXONOX_SET_EVENT(EventTrigger, "trigger", trigger, event);
+    }
+
+    bool EventTrigger::isTriggered(TriggerMode::Value mode)
+    {
+        if (Trigger::isTriggered(mode))
+            return this->bEventTriggered_;
+        else
+            return false;
+    }
+}
Index: code/branches/libraries2/src/modules/objects/triggers/EventTrigger.h
===================================================================
--- code/branches/libraries2/src/modules/objects/triggers/EventTrigger.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/triggers/EventTrigger.h	(revision 5728)
@@ -0,0 +1,56 @@
+/*
+ *   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 _EventTrigger_H__
+#define _EventTrigger_H__
+
+#include "OrxonoxPrereqs.h"
+#include "Trigger.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport EventTrigger : public Trigger
+    {
+        public:
+            EventTrigger(BaseObject* creator);
+            virtual ~EventTrigger();
+
+            virtual void processEvent(Event& event);
+
+            inline void trigger(bool bTriggered)
+                { this->bEventTriggered_ = bTriggered; this->tick(0); }
+
+        protected:
+            virtual bool isTriggered(TriggerMode::Value mode);
+
+        private:
+            bool bEventTriggered_;
+    };
+}
+
+#endif /* _EventTrigger_H__ */
Index: code/branches/libraries2/src/modules/objects/triggers/Trigger.cc
===================================================================
--- code/branches/libraries2/src/modules/objects/triggers/Trigger.cc	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/triggers/Trigger.cc	(revision 5728)
@@ -0,0 +1,328 @@
+/*
+ *   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:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Trigger.h"
+
+#include "core/CoreIncludes.h"
+#include "core/ConsoleCommand.h"
+#include "core/GameMode.h"
+#include "core/XMLPort.h"
+#include "objects/Scene.h"
+
+namespace orxonox
+{
+
+  SetConsoleCommand(Trigger, debugFlares, false).defaultValues(false);
+
+  CreateFactory(Trigger);
+
+  Trigger::Trigger(BaseObject* creator) : StaticEntity(creator)
+  {
+    RegisterObject(Trigger);
+
+    this->mode_ = TriggerMode::EventTriggerAND;
+
+    this->bFirstTick_ = true;
+    this->bActive_ = false;
+    this->bTriggered_ = false;
+    this->latestState_ = 0x0;
+
+    this->bInvertMode_ = false;
+    this->bSwitch_ = false;
+    this->bStayActive_ = false;
+    this->delay_ = 0.0f;
+    this->remainingTime_ = 0.0f;
+    this->timeSinceLastEvent_ = 0.0f;
+    this->remainingActivations_ = -1;
+
+//    this->bUpdating_ = false;
+
+    if (this->getScene() && GameMode::showsGraphics())
+    {
+      this->debugBillboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 0.0, 0.0), 1);
+      this->debugBillboard_.setVisible(false);
+
+      if (this->debugBillboard_.getBillboardSet())
+          this->attachOgreObject(this->debugBillboard_.getBillboardSet());
+    }
+
+    this->setObjectMode(0x0);
+  }
+
+  Trigger::~Trigger()
+  {
+  }
+
+  void Trigger::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+  {
+    SUPER(Trigger, XMLPort, xmlelement, mode);
+
+    XMLPortParam(Trigger, "delay",       setDelay,       getDelay,       xmlelement, mode).defaultValues(0.0f);
+    XMLPortParam(Trigger, "switch",      setSwitch,      getSwitch,      xmlelement, mode).defaultValues(false);
+    XMLPortParam(Trigger, "stayactive",  setStayActive,  getStayActive,  xmlelement, mode).defaultValues(false);
+    XMLPortParam(Trigger, "activations", setActivations, getActivations, xmlelement, mode).defaultValues(-1);
+    XMLPortParam(Trigger, "invert",      setInvert,      getInvert,      xmlelement, mode).defaultValues(false);
+    XMLPortParamTemplate(Trigger, "mode", setMode, getModeString, xmlelement, mode, const std::string&).defaultValues("or");
+
+    XMLPortObject(Trigger, Trigger, "", addTrigger, getTrigger, xmlelement, mode);
+  }
+
+  void Trigger::tick(float dt)
+  {
+    if (this->bFirstTick_)
+    {
+      this->bFirstTick_ = false;
+      this->triggered(false);
+    }
+
+    // Check if the object is active (this is NOT Trigger::isActive()!)
+    if (!this->BaseObject::isActive())
+        return;
+
+    SUPER(Trigger, tick, dt);
+
+    bool newTriggered = this->isTriggered() ^ this->bInvertMode_;
+
+    // check if new triggering event is really new
+    if ((this->latestState_ & 0x1) != newTriggered)
+    {
+      // create new state
+      if (newTriggered)
+      {
+        this->latestState_ |= 1; // set trigger bit to 1
+        this->switchState();
+      }
+      else
+      {
+        this->latestState_ &= 0xFE; // set trigger bit to 0
+        if (!this->bSwitch_)
+          this->switchState();
+      }
+    }
+
+    if (this->remainingTime_ > 0.0)
+    {
+      this->remainingTime_ -= dt;
+      // only increase when acctually waiting for a state in the queue
+      if (this->timeSinceLastEvent_ >= 0.0)
+        this->timeSinceLastEvent_ += dt;
+    }
+
+    while (this->remainingTime_ <= 0.0 && this->stateChanges_.size() > 0)
+    {
+      // time ran out, change state to new one
+      char newState = this->stateChanges_.front().second;
+      this->bTriggered_ = (newState & 0x1);
+      this->bActive_ = newState & 2;
+      this->triggered(this->bActive_);
+      this->stateChanges_.pop();
+      if (this->stateChanges_.size() != 0)
+        this->remainingTime_ = this->stateChanges_.front().first;
+      else
+        this->timeSinceLastEvent_ = this->delay_;
+    }
+
+    if (this->bTriggered_ && this->bActive_)
+      this->setBillboardColour(ColourValue(0.5, 1.0, 0.0));
+    else if (!this->bTriggered_ && this->bActive_)
+      this->setBillboardColour(ColourValue(0.0, 1.0, 0.0));
+    else if (this->bTriggered_ && !this->bActive_)
+      this->setBillboardColour(ColourValue(1.0, 0.5, 0.0));
+    else
+      this->setBillboardColour(ColourValue(1.0, 0.0, 0.0));
+  }
+
+  void Trigger::triggered(bool bIsTriggered)
+  {
+    this->fireEvent(bIsTriggered);
+  }
+
+  bool Trigger::isTriggered(TriggerMode::Value mode)
+  {
+//    if (this->bUpdating_)
+//      return this->bTriggered_;
+
+//    this->bUpdating_ = true;
+    if (this->children_.size() != 0)
+    {
+      bool returnval = false;
+
+      switch (mode)
+      {
+        case TriggerMode::EventTriggerAND:
+          returnval = checkAnd();
+          break;
+        case TriggerMode::EventTriggerOR:
+          returnval = checkOr();
+          break;
+        case TriggerMode::EventTriggerXOR:
+          returnval = checkXor();
+          break;
+        default:
+          returnval = false;
+          break;
+      }
+//      this->bUpdating_ = false;
+
+      return returnval;
+    }
+    return true;
+  }
+
+  bool Trigger::checkAnd()
+  {
+    std::set<Trigger*>::iterator it;
+    for(it = this->children_.begin(); it != this->children_.end(); ++it)
+    {
+      if (!(*it)->isActive())
+        return false;
+    }
+    return true;
+  }
+
+  bool Trigger::checkOr()
+  {
+    std::set<Trigger*>::iterator it;
+    for(it = this->children_.begin(); it != this->children_.end(); ++it)
+    {
+      if ((*it)->isActive())
+        return true;
+    }
+    return false;
+  }
+
+  bool Trigger::checkXor()
+  {
+    std::set<Trigger*>::iterator it;
+    bool test = false;
+    for(it = this->children_.begin(); it != this->children_.end(); ++it)
+    {
+      if (test && (*it)->isActive())
+        return false;
+      if ((*it)->isActive())
+        test = true;
+    }
+    return test;
+  }
+
+  bool Trigger::switchState()
+  {
+    if (( (this->latestState_ & 2) && this->bStayActive_ && (this->remainingActivations_ <= 0))
+     || (!(this->latestState_ & 2)                       && (this->remainingActivations_ == 0)))
+      return false;
+    else
+    {
+      this->latestState_ ^= 2; // toggle state bit
+
+      // increase activation count
+      if (this->latestState_ & 2 && this->remainingActivations_ > 0)
+        this->remainingActivations_--;
+
+      this->storeState();
+
+      return true;
+    }
+  }
+
+  void Trigger::storeState()
+  {
+    // put state change into queue
+    this->stateChanges_.push(std::pair<float, char>(this->timeSinceLastEvent_, this->latestState_));
+    // reset time since last event
+    this->timeSinceLastEvent_ = 0.0;
+
+    if (this->stateChanges_.size() == 1)
+      this->remainingTime_ = this->stateChanges_.front().first;
+  }
+
+  void Trigger::setDelay(float delay)
+  {
+    this->delay_ = delay;
+    this->timeSinceLastEvent_ = delay;
+  }
+
+  void Trigger::setMode(const std::string& modeName)
+  {
+    if (modeName == "and")
+      this->setMode(TriggerMode::EventTriggerAND);
+    else if (modeName == "or")
+      this->setMode(TriggerMode::EventTriggerOR);
+    else if (modeName == "xor")
+      this->setMode(TriggerMode::EventTriggerXOR);
+  }
+
+  std::string Trigger::getModeString() const
+  {
+    if (this->mode_ == TriggerMode::EventTriggerAND)
+      return std::string("and");
+    else if (this->mode_ == TriggerMode::EventTriggerOR)
+      return std::string("or");
+    else if (this->mode_ == TriggerMode::EventTriggerXOR)
+      return std::string("xor");
+    else
+      return std::string("and");
+  }
+
+  void Trigger::addTrigger(Trigger* trigger)
+  {
+    if (this != trigger)
+      this->children_.insert(trigger);
+  }
+
+  const Trigger* Trigger::getTrigger(unsigned int index) const
+  {
+    if (this->children_.size() <= index)
+      return NULL;
+
+    std::set<Trigger*>::const_iterator it;
+    it = this->children_.begin();
+
+    for (unsigned int i = 0; i != index; ++i)
+      ++it;
+
+    return (*it);
+  }
+
+  void Trigger::debugFlares(bool bVisible)
+  {
+    for (ObjectList<Trigger>::iterator it = ObjectList<Trigger>::begin(); it != ObjectList<Trigger>::end(); ++it)
+      it->setVisible(bVisible);
+  }
+
+  void Trigger::setBillboardColour(const ColourValue& colour)
+  {
+    this->debugBillboard_.setColour(colour);
+  }
+
+  void Trigger::changedVisibility()
+  {
+    SUPER(Trigger, changedVisibility);
+
+    this->debugBillboard_.setVisible(this->isVisible());
+  }
+}
Index: code/branches/libraries2/src/modules/objects/triggers/Trigger.h
===================================================================
--- code/branches/libraries2/src/modules/objects/triggers/Trigger.h	(revision 5728)
+++ code/branches/libraries2/src/modules/objects/triggers/Trigger.h	(revision 5728)
@@ -0,0 +1,143 @@
+/*
+ *   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:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Trigger_H__
+#define _Trigger_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <set>
+#include <queue>
+
+#include "tools/BillboardSet.h"
+#include "tools/interfaces/Tickable.h"
+#include "objects/worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+  namespace TriggerMode
+  {
+    enum Value
+    {
+      EventTriggerAND,
+      EventTriggerOR,
+      EventTriggerXOR,
+    };
+  }
+
+  class _OrxonoxExport Trigger : public StaticEntity, public Tickable
+  {
+    public:
+      Trigger(BaseObject* creator);
+      virtual ~Trigger();
+
+      virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+      virtual void tick(float dt);
+
+      inline bool isActive() const
+        { return bActive_; }
+
+      void addTrigger(Trigger* trigger);
+      const Trigger* getTrigger(unsigned int index) const;
+
+      void setMode(const std::string& modeName);
+      inline void setMode(TriggerMode::Value mode)
+        { this->mode_ = mode; }
+      inline TriggerMode::Value getMode() const
+        { return mode_; }
+
+      inline void setInvert(bool bInvert)
+        { this->bInvertMode_ = bInvert; }
+      inline bool getInvert() const
+        { return this->bInvertMode_; }
+
+      inline void setSwitch(bool bSwitch)
+        { this->bSwitch_ = bSwitch; }
+      inline bool getSwitch() const
+        { return this->bSwitch_; }
+
+      inline void setStayActive(bool bStayActive)
+        { this->bStayActive_ = bStayActive; }
+      inline bool getStayActive() const
+        { return this->bStayActive_; }
+
+      inline void setActivations(int activations)
+        { this->remainingActivations_ = activations; }
+      inline int getActivations() const
+        { return this->remainingActivations_; }
+
+      inline void setVisible(bool visibility)
+        { this->debugBillboard_.setVisible(visibility); }
+
+      void setDelay(float delay);
+      inline float getDelay() const
+        { return this->delay_; }
+
+      bool switchState();
+
+      static void debugFlares(bool bVisible);
+      virtual void changedVisibility();
+
+    protected:
+      inline bool isTriggered() { return this->isTriggered(this->mode_); }
+      virtual bool isTriggered(TriggerMode::Value mode);
+      virtual void triggered(bool bIsTriggered);
+
+    private:
+      bool checkAnd();
+      bool checkOr();
+      bool checkXor();
+      void setBillboardColour(const ColourValue& colour);
+      void storeState();
+      std::string getModeString() const;
+
+      bool bActive_;
+      bool bTriggered_;
+      bool bFirstTick_;
+
+      TriggerMode::Value mode_;
+      bool bInvertMode_;
+      bool bSwitch_;
+      bool bStayActive_;
+      float delay_;
+      int remainingActivations_;
+
+      char latestState_;
+      float remainingTime_;
+      float timeSinceLastEvent_;
+
+//      bool bUpdating_;
+      BillboardSet debugBillboard_;
+
+      std::set<Trigger*> children_;
+      std::queue<std::pair<float, char> > stateChanges_;
+  };
+
+}
+
+#endif /* _Trigger_H__ */
