Index: code/trunk/src/orxonox/LevelManager.cc
===================================================================
--- code/trunk/src/orxonox/LevelManager.cc	(revision 8521)
+++ code/trunk/src/orxonox/LevelManager.cc	(revision 8706)
@@ -222,4 +222,5 @@
                 this->nextLevel_ = this->availableLevels_.begin();
             }
+
             while(this->nextIndex_ != index)
             {
Index: code/trunk/src/orxonox/MoodManager.cc
===================================================================
--- code/trunk/src/orxonox/MoodManager.cc	(revision 8521)
+++ code/trunk/src/orxonox/MoodManager.cc	(revision 8706)
@@ -93,6 +93,4 @@
 
 
-    std::string MoodListener::mood_s;
-
     MoodListener::MoodListener()
     {
@@ -102,7 +100,6 @@
     /*static*/ void MoodListener::changedMood(const std::string& mood)
     {
-        mood_s = mood;
         for (ObjectList<MoodListener>::iterator it = ObjectList<MoodListener>::begin(); it; ++it)
-            it->moodChanged(mood_s);
+            it->moodChanged(mood);
     }
 }
Index: code/trunk/src/orxonox/MoodManager.h
===================================================================
--- code/trunk/src/orxonox/MoodManager.h	(revision 8521)
+++ code/trunk/src/orxonox/MoodManager.h	(revision 8706)
@@ -50,11 +50,8 @@
             virtual ~MoodListener() {}
 
-            const std::string& getMood() const { return mood_s; }
-
         private:
             virtual void moodChanged(const std::string& mood) = 0;
 
             static void changedMood(const std::string& mood);
-            static std::string mood_s;
     };
 
Index: code/trunk/src/orxonox/collisionshapes/CollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/collisionshapes/CollisionShape.cc	(revision 8521)
+++ code/trunk/src/orxonox/collisionshapes/CollisionShape.cc	(revision 8706)
@@ -26,4 +26,9 @@
  *
  */
+
+/**
+    @file CollisionShape.cc
+    @brief Implementation of the CollisionShape class.
+*/
 
 #include "CollisionShape.h"
@@ -39,4 +44,9 @@
 namespace orxonox
 {
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    */
     CollisionShape::CollisionShape(BaseObject* creator)
         : BaseObject(creator)
@@ -51,11 +61,16 @@
         this->orientation_ = Quaternion::IDENTITY;
         this->scale_ = Vector3::UNIT_SCALE;
+        this->uniformScale_ = true;
 
         this->registerVariables();
     }
 
+    /**
+    @brief
+        Destructor. Detaches the CollisionShape from its parent.
+    */
     CollisionShape::~CollisionShape()
     {
-        // Detach from parent
+        // Detach from parent CompoundCollisionShape.
         if (this->isInitialized() && this->parent_)
             this->parent_->detach(this);
@@ -75,19 +90,82 @@
     }
 
+    /**
+    @brief
+        Register variables that need synchronizing over the network.
+    */
     void CollisionShape::registerVariables()
     {
+        // Keep the shape's parent (can be either a CompoundCollisionShape or a WorldEntity) consistent over the network.
         registerVariable(this->parentID_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::parentChanged));
     }
 
+    /**
+    @brief
+        Notifies the CollisionShape of being attached to a CompoundCollisionShape.
+    @param newParent
+        A pointer to the CompoundCollisionShape the CollisionShape was attached to.
+    @return
+        Returns 
+    */
+    bool CollisionShape::notifyBeingAttached(CompoundCollisionShape* newParent)
+    {
+        // If the CollisionShape is attached to a CompoundCollisionShapes, detach it.
+        if (this->parent_)
+            this->parent_->detach(this);
+
+        this->parent_ = newParent;
+
+        // If the new parent is a WorldEntityCollisionShape, the parentID is set to the objectID of the WorldEntity that is its owner.
+        // TODO: Why?
+        WorldEntityCollisionShape* parentWECCS = orxonox_cast<WorldEntityCollisionShape*>(newParent);
+        if (parentWECCS)
+            this->parentID_ = parentWECCS->getWorldEntityOwner()->getObjectID();
+        // Else it is set to the objectID of the CompoundCollisionShape.
+        else
+            this->parentID_ = newParent->getObjectID();
+
+        return true;
+    }
+
+    /**
+    @brief
+        Notifies the CollisionShape of being detached from a CompoundCollisionShape.
+    */
+    void CollisionShape::notifyDetached()
+    {
+        this->parent_ = 0;
+        this->parentID_ = OBJECTID_UNKNOWN;
+    }
+
+    /**
+    @brief
+        Updates the CompoundCollisionShape the CollisionShape belongs to (if it belongs to one), after the CollisionShape has changed.
+    */
+    void CollisionShape::updateParent()
+    {
+        if (this->parent_)
+            this->parent_->updateAttachedShape(this);
+    }
+
+    /**
+    @brief
+        Is called when the parentID of the CollisionShape has changed.
+        Attaches it to the object with the changed parentID, which can either be a CompoundCollisionShape or a WorldEntity.
+    */
     void CollisionShape::parentChanged()
     {
+        // Get the parent object from the network.
         Synchronisable* parent = Synchronisable::getSynchronisable(this->parentID_);
+
         // Parent can either be a WorldEntity or a CompoundCollisionShape. The reason is that the
         // internal collision shape (which is compound) of a WE doesn't get synchronised.
         CompoundCollisionShape* parentCCS = orxonox_cast<CompoundCollisionShape*>(parent);
+
+        // If the parent is a CompoundCollisionShape, attach the CollisionShape to it.
         if (parentCCS)
             parentCCS->attach(this);
         else
         {
+            // If the parent is a WorldEntity, attach the CollisionShape to its collision shapes.
             WorldEntity* parentWE = orxonox_cast<WorldEntity*>(parent);
             if (parentWE)
@@ -96,32 +174,10 @@
     }
 
-    bool CollisionShape::notifyBeingAttached(CompoundCollisionShape* newParent)
-    {
-        if (this->parent_)
-            this->parent_->detach(this);
-
-        this->parent_ = newParent;
-
-        WorldEntityCollisionShape* parentWECCS = orxonox_cast<WorldEntityCollisionShape*>(newParent);
-        if (parentWECCS)
-            this->parentID_ = parentWECCS->getWorldEntityOwner()->getObjectID();
-        else
-            this->parentID_ = newParent->getObjectID();
-
-        return true;
-    }
-
-    void CollisionShape::notifyDetached()
-    {
-        this->parent_ = 0;
-        this->parentID_ = OBJECTID_UNKNOWN;
-    }
-
-    void CollisionShape::updateParent()
-    {
-        if (this->parent_)
-            this->parent_->updateAttachedShape(this);
-    }
-
+    /**
+    @brief
+        Check whether the CollisionShape has been either moved or rotated or both. (i.e. it doesn't have position zero and identity orientation any more)
+    @return
+        Returns true if it has been moved.
+    */
     bool CollisionShape::hasTransform() const
     {
@@ -130,18 +186,71 @@
     }
 
+    /**
+    @brief
+        Set the scale of the CollisionShape.
+        Since the scale is a vector the CollisionShape can be scaled independently in each direction, allowing for linear distortions.
+        If the scale changes, this causes the parent CompoundCollisionShape (if there is one) to be updated.
+        Beware, non-uniform scaling (i.e. distortions) might not be supported by all CollisionShapes.
+    @param scale
+        The new scale to be set. Vector3::UNIT_SCALE is the initial scale.
+    */
     void CollisionShape::setScale3D(const Vector3& scale)
     {
-        CCOUT(2) << "Warning: Cannot set the scale of a collision shape: Not yet implemented." << std::endl;
-    }
-
+        if(this->scale_ == scale)
+            return;
+
+        // If the vectors are not in the same direction, then this is no longer a uniform scaling.
+        if(scale_.crossProduct(scale).squaredLength() != 0.0f)
+        {
+            CCOUT(2) << "Warning: Non-uniform scaling is not yet supported." << endl;
+            return;
+        }
+
+        this->scale_ = scale;
+
+        this->changedScale();
+        this->updateParent();
+    }
+
+    /**
+    @brief
+        Set the (uniform) scale of the CollisionShape.
+        If the scale changes, this causes the parent CompoundCollisionShape (if there is one) to be updated.
+    @param scale
+        The scale to scale the CollisionShape with. 1.0f is the initial scale.
+    */
     void CollisionShape::setScale(float scale)
     {
-        CCOUT(2) << "Warning: Cannot set the scale of a collision shape: Not yet implemented." << std::endl;
-    }
-
+        if(this->scale_.length() == scale)
+            return;
+
+        this->scale_ = Vector3::UNIT_SCALE*scale;
+
+        this->changedScale();
+        this->updateParent();
+    }
+
+    /**
+    @brief
+        Is called when the scale of the CollisionShape has changed.
+    */
+    void CollisionShape::changedScale()
+    {
+        // Adjust the position of the CollisionShape.
+        this->position_ *= this->getScale3D();
+    }
+
+    /**
+    @brief
+        Updates the shape.
+        Is called when the internal parameters of the shape have changed such that a new shape needs to be created.
+    */
     void CollisionShape::updateShape()
     {
         btCollisionShape* oldShape = this->collisionShape_;
         this->collisionShape_ = this->createNewShape();
+        // If the CollisionShape has been rescaled, scale the shape to fit the current scale.
+        if(this->scale_ != Vector3::UNIT_SCALE)
+            this->changedScale();
         // When we recreate the shape, we have to inform the parent about this to update the shape
         this->updateParent();
@@ -150,4 +259,10 @@
     }
 
+    /**
+    @brief
+        Calculates the local inertia of the collision shape.
+    @todo
+        Document.
+    */
     void CollisionShape::calculateLocalInertia(float mass, btVector3& inertia) const
     {
Index: code/trunk/src/orxonox/collisionshapes/CollisionShape.h
===================================================================
--- code/trunk/src/orxonox/collisionshapes/CollisionShape.h	(revision 8521)
+++ code/trunk/src/orxonox/collisionshapes/CollisionShape.h	(revision 8706)
@@ -27,4 +27,10 @@
  */
 
+/**
+    @file CollisionShape.h
+    @brief Definition of the CollisionShape class.
+    @ingroup Collisionshapes
+*/
+
 #ifndef _CollisionShape_H__
 #define _CollisionShape_H__
@@ -38,4 +44,15 @@
 namespace orxonox
 {
+
+    /**
+    @brief
+        Wrapper for bullet collision shape class btCollisionShape.
+
+    @author
+        Reto Grieder
+
+    @see btCollisionShape
+    @ingroup Collisionshapes
+    */
     class _OrxonoxExport CollisionShape : public BaseObject, public Synchronisable
     {
@@ -46,50 +63,132 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
 
+            /**
+            @brief Set the position of the CollisionShape.
+                   If the position changes, this causes the parent CompoundCollisionShape (if there is one) to be updated.
+            @param position A vector indicating the new position.
+            */
             inline void setPosition(const Vector3& position)
-                { this->position_ = position; this->updateParent(); }
+                { if(this->position_ == position) return; this->position_ = position; this->updateParent(); }
+            /**
+            @brief Get the position of the CollisionShape.
+            @return Returns the position of the CollisionShape as a vector.
+            */
             inline const Vector3& getPosition() const
                 { return this->position_; }
 
+            /**
+            @brief Set the orientation of the CollisionShape.
+                   If the orientation changes, this causes the parent CompoundCollisionShape (if there is one) to be updated.
+            @param orientation A quaternion indicating the new orientation.
+            */
             inline void setOrientation(const Quaternion& orientation)
-                { this->orientation_ = orientation; this->updateParent(); }
+                { if(this->orientation_ == orientation) return; this->orientation_ = orientation; this->updateParent(); }
+            /**
+            @brief Get the orientation of the CollisionShape.
+            @return Returns the orientation of the CollisionShape as a quaternion.
+            */
             inline const Quaternion& getOrientation() const
                 { return this->orientation_; }
 
-            void yaw(const Degree& angle)   { this->setOrientation(this->orientation_ * Quaternion(angle, Vector3::UNIT_Y)); }
-            void pitch(const Degree& angle) { this->setOrientation(this->orientation_ * Quaternion(angle, Vector3::UNIT_X)); }
-            void roll(const Degree& angle)  { this->setOrientation(this->orientation_ * Quaternion(angle, Vector3::UNIT_Z)); }
+            /**
+            @brief Rotate the CollisionShape around the y-axis by the specified angle.
+                   If the orientation changes, this causes the parent CompoundCollisionShape (if there is one) to be updated.
+            @param angle The angle by which the CollisionShape is rotated.
+            */
+            void yaw(const Degree& angle)
+                { this->setOrientation(this->orientation_ * Quaternion(angle, Vector3::UNIT_Y)); }
+            /**
+            @brief Rotate the CollisionShape around the x-axis by the specified angle.
+                   If the orientation changes, this causes the parent CompoundCollisionShape (if there is one) to be updated.
+            @param angle The angle by which the CollisionShape is rotated.
+            */
+            void pitch(const Degree& angle)
+                { this->setOrientation(this->orientation_ * Quaternion(angle, Vector3::UNIT_X)); }
+            /**
+            @brief Rotate the CollisionShape around the z-axis by the specified angle.
+                   If the orientation changes, this causes the parent CompoundCollisionShape (if there is one) to be updated.
+            @param angle The angle by which the CollisionShape is rotated.
+            */
+            void roll(const Degree& angle)
+                { this->setOrientation(this->orientation_ * Quaternion(angle, Vector3::UNIT_Z)); }
 
-            virtual void setScale3D(const Vector3& scale);
-            virtual void setScale(float scale);
+            /**
+            @brief Scale the CollisionShape by the input vector.
+                   Since the scale is a vector the CollisionShape can be scaled independently in each direction, allowing for linear distortions.
+                   If the scale changes, this causes the parent CompoundCollisionShape (if there is one) to be updated.
+                   Beware, non-uniform scaling (i.e. distortions) might not be supported by all CollisionShapes.
+            @param scale The scaling vector by which the CollisionShape is scaled.
+            */
+            inline void scale3D(const Vector3& scale)
+                { this->setScale3D(this->getScale3D()*scale); }
+            void setScale3D(const Vector3& scale); // Set the scale of the CollisionShape.
+            /**
+            @brief Get the scale of the CollisionShape.
+            @return Returns a vector indicating the scale of the CollisionShape.
+            */
             inline const Vector3& getScale3D() const
                 { return this->scale_; }
 
-            void updateShape();
+            /**
+            @brief (Uniformly) scale the CollisionShape by the input scale.
+                   If the scale changes, this causes the parent CompoundCollisionShape (if there is one) to be updated.
+            @param scale The value by which the CollisionShape is scaled.
+            */
+            inline void scale(float scale)
+                { this->setScale3D(this->getScale3D()*scale); }
+            void setScale(float scale); // Set the (uniform) scale of the CollisionShape.
+            /**
+            @brief Get the (uniform) scale of the CollisionShape.
+                   This is only meaningful if the CollisionShape has uniform scaling.
+            @return Returns the (uniform) scale of the CollisionShape. Returns 0.0f if the scaling is non-uniform.
+            */
+            inline float getScale()
+                { if(this->hasUniformScaling()) return this->scale_.x; return 0.0f; }
 
-            void calculateLocalInertia(float mass, btVector3& inertia) const;
+            /**
+            @brief Check whether the CollisionShape is uniformly scaled.
+            @return Returns true if the CollisionShape is uniformly scaled, false if not.
+            */
+            inline bool hasUniformScaling()
+                { return this->uniformScale_; }
+            virtual void changedScale(); // Is called when the scale of the CollisionShape has changed.
 
+            void updateShape(); // Updates the shape.
+
+            void calculateLocalInertia(float mass, btVector3& inertia) const; // Calculates the local inertia of the collision shape.
+
+            /**
+            @brief Get the bullet collision shape of this CollisionShape.
+            @return Returns a pointer to the bullet collision shape of this CollisionShape.
+            */
             inline btCollisionShape* getCollisionShape() const
                 { return this->collisionShape_; }
 
-            bool hasTransform() const;
+            bool hasTransform() const; // Check whether the CollisionShape has been either moved or rotated or both.
 
-            bool notifyBeingAttached(CompoundCollisionShape* newParent);
-            void notifyDetached();
+            bool notifyBeingAttached(CompoundCollisionShape* newParent); // Notifies the CollisionShape of being attached to a CompoundCollisionShape.
+            void notifyDetached(); // Notifies the CollisionShape of being detached from a CompoundCollisionShape.
 
         protected:
-            virtual void updateParent();
-            virtual void parentChanged();
+            virtual void updateParent(); // Updates the CompoundCollisionShape the CollisionShape belongs to, after the CollisionShape has changed.
+            virtual void parentChanged(); // Is called when the parentID of the CollisionShape has changed.
+
+            /**
+            @brief Create a new bullet collision shape depending on the internal parameters of the specific CollisionShape.
+            @return Returns a pointer to the new bullet collision shape.
+            */
             virtual btCollisionShape* createNewShape() const = 0;
 
-            btCollisionShape*       collisionShape_;
-            CompoundCollisionShape* parent_;
-            unsigned int            parentID_;
+            btCollisionShape*       collisionShape_; //!< The bullet collision shape of this CollisionShape.
+            CompoundCollisionShape* parent_; //!< The CompoundCollisionShape this CollisionShape belongs to, NULL if it doesn't belong to one.
+            unsigned int            parentID_; //!< The objectID of the parent of this CollisionShape, which can either be a CompoundCollisionShape or a WorldEntity.
 
         private:
             void registerVariables();
 
-            Vector3                 position_;
-            Quaternion              orientation_;
-            Vector3                 scale_;
+            Vector3                 position_; //!< The position of the CollisionShape.
+            Quaternion              orientation_; //!< The orientation of the CollisionShape.
+            Vector3                 scale_; //!< The scale of the CollisionShape.
+            bool                    uniformScale_; //!< Whether the scale is uniform.
     };
 }
Index: code/trunk/src/orxonox/collisionshapes/CompoundCollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/collisionshapes/CompoundCollisionShape.cc	(revision 8521)
+++ code/trunk/src/orxonox/collisionshapes/CompoundCollisionShape.cc	(revision 8706)
@@ -27,4 +27,9 @@
  */
 
+/**
+    @file CompoundCollisionShape.cc
+    @brief Implementation of the CompoundCollisionShape class.
+*/
+
 #include "CompoundCollisionShape.h"
 
@@ -39,4 +44,8 @@
     CreateFactory(CompoundCollisionShape);
 
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    */
     CompoundCollisionShape::CompoundCollisionShape(BaseObject* creator) : CollisionShape(creator)
     {
@@ -46,4 +55,9 @@
     }
 
+    /**
+    @brief
+        Destructor.
+        Deletes all its children.
+    */
     CompoundCollisionShape::~CompoundCollisionShape()
     {
@@ -70,8 +84,16 @@
     }
 
+    /**
+    @brief
+        Attach the input CollisionShape to the CompoundCollisionShape.
+    @param shape
+        A pointer to the CollisionShape that is to be attached.
+    */
     void CompoundCollisionShape::attach(CollisionShape* shape)
     {
+        // If either the input shape is NULL or we try to attach the CollisionShape to itself.
         if (!shape || static_cast<CollisionShape*>(this) == shape)
             return;
+
         if (this->attachedShapes_.find(shape) != this->attachedShapes_.end())
         {
@@ -80,13 +102,16 @@
         }
 
+        // Notify the CollisionShape that it is being attached to the CompoundCollisionShape.
         if (!shape->notifyBeingAttached(this))
             return;
 
+        // Attach it.
         this->attachedShapes_[shape] = shape->getCollisionShape();
 
+        // Only actually attach if we didn't pick a CompoundCollisionShape with no content.
         if (shape->getCollisionShape())
         {
-            // Only actually attach if we didn't pick a CompoundCollisionShape with no content
             btTransform transf(multi_cast<btQuaternion>(shape->getOrientation()), multi_cast<btVector3>(shape->getPosition()));
+            // Add the btCollisionShape of the CollisionShape as a child shape to the btCompoundShape of the CompoundCollisionShape.
             this->compoundShape_->addChildShape(transf, shape->getCollisionShape());
 
@@ -95,11 +120,18 @@
     }
 
+    /**
+    @brief
+        Detach the input CollisionShape form the CompoundCollisionShape.
+    @param shape
+        A pointer to the CollisionShape to be detached.
+    */
     void CompoundCollisionShape::detach(CollisionShape* shape)
     {
+        // If the input CollisionShape is actually attached.
         if (this->attachedShapes_.find(shape) != this->attachedShapes_.end())
         {
             this->attachedShapes_.erase(shape);
             if (shape->getCollisionShape())
-                this->compoundShape_->removeChildShape(shape->getCollisionShape());
+                this->compoundShape_->removeChildShape(shape->getCollisionShape()); // TODO: Apparently this is broken?
             shape->notifyDetached();
 
@@ -110,4 +142,8 @@
     }
 
+    /**
+    @brief
+        Detach all attached CollisionShapes.
+    */
     void CompoundCollisionShape::detachAll()
     {
@@ -116,9 +152,18 @@
     }
 
+    /**
+    @brief
+        Update the input CollisionShape that is attached to the CompoundCollisionShape.
+        This is called when the input shape's internal collision shape (a btCollisionShape) has changed.
+    @param shape
+        A pointer to the CollisionShape to be updated.
+    */
     void CompoundCollisionShape::updateAttachedShape(CollisionShape* shape)
     {
         if (!shape)
             return;
+
         std::map<CollisionShape*, btCollisionShape*>::iterator it = this->attachedShapes_.find(shape);
+        // Check whether the input shape belongs to this CompoundCollisionShape.
         if (it == this->attachedShapes_.end())
         {
@@ -129,8 +174,9 @@
         // Remove old btCollisionShape, stored in the children map
         if (it->second)
-            this->compoundShape_->removeChildShape(it->second);
+            this->compoundShape_->removeChildShape(it->second); // TODO: Apparently this is broken?
+
+        // Only actually attach if we didn't pick a CompoundCollisionShape with no content
         if (shape->getCollisionShape())
         {
-            // Only actually attach if we didn't pick a CompoundCollisionShape with no content
             btTransform transf(multi_cast<btQuaternion>(shape->getOrientation()), multi_cast<btVector3>(shape->getPosition()));
             this->compoundShape_->addChildShape(transf, shape->getCollisionShape());
@@ -141,42 +187,57 @@
     }
 
+    /**
+    @brief
+        Updates the public shape, the collision shape this CompoundCollisionShape has to the outside.
+    */
     void CompoundCollisionShape::updatePublicShape()
     {
-        btCollisionShape* primitive = 0;
-        bool bPrimitive = true;
-        bool bEmpty = true;
+        btCollisionShape* primitive = 0; // The primitive shape, if there is one.
+        bool bPrimitive = true; // Whether the CompoundCollisionShape has just one non-empty CollisionShape. And that shape also has no transformation.
+        bool bEmpty = true; // Whether the CompoundCollisionShape is empty.
+        // Iterate over all CollisionShapes that belong to this CompoundCollisionShape.
         for (std::map<CollisionShape*, btCollisionShape*>::const_iterator it = this->attachedShapes_.begin(); it != this->attachedShapes_.end(); ++it)
         {
+            // TODO: Make sure this is correct.
             if (it->second)
             {
                 bEmpty = false;
-                if (!it->first->hasTransform() && !bPrimitive)
+                if (!it->first->hasTransform() && bPrimitive)
                     primitive = it->second;
                 else
+                {
                     bPrimitive = false;
+                    break;
+                }
             }
         }
+
+        // If there is no non-empty CollisionShape.
         if (bEmpty)
         {
+            // If there was none all along, nothing needs to be changed.
             if (this->collisionShape_ == 0)
-            {
-                this->collisionShape_ = 0;
                 return;
-            }
             this->collisionShape_ = 0;
         }
+        // If the CompoundCollisionShape is just a primitive.
+        // Only one shape to be added, no transform; return it directly.
         else if (bPrimitive)
-        {
-            // --> Only one shape to be added, no transform; return it directly
             this->collisionShape_ = primitive;
-        }
+        // Make sure we use the compound shape when returning a btCollisionShape.
         else
-        {
-            // Make sure we use the compound shape when returning a btCollisionShape
             this->collisionShape_ = this->compoundShape_;
-        }
+
         this->updateParent();
     }
 
+    /**
+    @brief
+        Get the attached CollisionShape at the given index.
+    @param index
+        The index of the desired CollisionShape.
+    @return
+        Returns a pointer to the attached CollisionShape at the given index.
+    */
     CollisionShape* CompoundCollisionShape::getAttachedShape(unsigned int index) const
     {
@@ -190,3 +251,49 @@
         return 0;
     }
+
+    /**
+    @brief
+        Is called when the scale of the CompoundCollisionShape has changed.
+        Iterates over all attached CollisionShapes and scales them, then recomputes their compound shape.
+    */
+    void CompoundCollisionShape::changedScale()
+    {
+        CollisionShape::changedScale();
+
+        std::vector<CollisionShape*> shapes;
+        // Iterate through all attached CollisionShapes and add them to the list of shapes.
+        for(std::map<CollisionShape*, btCollisionShape*>::iterator it = this->attachedShapes_.begin(); it != this->attachedShapes_.end(); it++)
+            shapes.push_back(it->first);
+
+        // Delete the compound shape and create a new one.
+        delete this->compoundShape_;
+        this->compoundShape_ = new btCompoundShape();
+
+        // Re-attach all CollisionShapes.
+        for(std::vector<CollisionShape*>::iterator it = shapes.begin(); it != shapes.end(); it++)
+        {
+            CollisionShape* shape = *it;
+            shape->setScale3D(this->getScale3D());
+            // Only actually attach if we didn't pick a CompoundCollisionShape with no content.
+            if (shape->getCollisionShape())
+            {
+                btTransform transf(multi_cast<btQuaternion>(shape->getOrientation()), multi_cast<btVector3>(shape->getPosition()));
+                // Add the btCollisionShape of the CollisionShape as a child shape to the btCompoundShape of the CompoundCollisionShape.
+                this->compoundShape_->addChildShape(transf, shape->getCollisionShape());
+            }
+        }
+
+        this->updatePublicShape();
+
+        /*
+        // Iterate through all attached CollisionShapes
+        for(std::map<CollisionShape*, btCollisionShape*>::const_iterator it = this->attachedShapes_.begin(); it != this->attachedShapes_.end(); it++)
+        {
+            // Rescale the CollisionShape.
+            it->first->setScale3D(this->getScale3D());
+            this->updateAttachedShape(it->first);
+        }
+
+        this->updatePublicShape();*/
+    }
 }
Index: code/trunk/src/orxonox/collisionshapes/CompoundCollisionShape.h
===================================================================
--- code/trunk/src/orxonox/collisionshapes/CompoundCollisionShape.h	(revision 8521)
+++ code/trunk/src/orxonox/collisionshapes/CompoundCollisionShape.h	(revision 8706)
@@ -27,4 +27,10 @@
  */
 
+/**
+    @file CompoundCollisionShape.h
+    @brief Definition of the CompoundCollisionShape class.
+    @ingroup Collisionshapes
+*/
+
 #ifndef _CompoundCollisionShape_H__
 #define _CompoundCollisionShape_H__
@@ -38,4 +44,15 @@
 namespace orxonox
 {
+
+    /**
+    @brief
+        Wrapper for the bullet compound collision shape class btCompoundShape.
+
+    @author
+        Reto Grieder
+
+    @see btCompoundShape
+    @ingroup Collisionshapes
+    */
     class _OrxonoxExport CompoundCollisionShape : public CollisionShape
     {
@@ -53,4 +70,6 @@
             void updateAttachedShape(CollisionShape* shape);
 
+            virtual void changedScale();
+
         private:
             void updatePublicShape();
Index: code/trunk/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc	(revision 8521)
+++ code/trunk/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc	(revision 8706)
@@ -43,5 +43,5 @@
         this->worldEntityOwner_ = creator;
         // suppress synchronisation
-        this->setSyncMode(0x0);
+        this->setSyncMode(ObjectDirection::None);
     }
 
Index: code/trunk/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/ArtificialController.cc	(revision 8521)
+++ code/trunk/src/orxonox/controllers/ArtificialController.cc	(revision 8706)
@@ -381,4 +381,9 @@
             }
         }
+
+        if (distance < 10)
+        {
+            this->positionReached();
+        }
     }
 
@@ -387,5 +392,4 @@
         this->moveToPosition(this->targetPosition_);
     }
-
 
     /**
Index: code/trunk/src/orxonox/controllers/ArtificialController.h
===================================================================
--- code/trunk/src/orxonox/controllers/ArtificialController.h	(revision 8521)
+++ code/trunk/src/orxonox/controllers/ArtificialController.h	(revision 8706)
@@ -97,4 +97,6 @@
             void moveToTargetPosition();
 
+            virtual void positionReached() {}
+
             void removeFromFormation();
             void unregisterSlave();
Index: code/trunk/src/orxonox/controllers/Controller.h
===================================================================
--- code/trunk/src/orxonox/controllers/Controller.h	(revision 8521)
+++ code/trunk/src/orxonox/controllers/Controller.h	(revision 8706)
@@ -50,5 +50,11 @@
                 { return this->player_; }
 
-            virtual inline void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) {};
+            virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) {};
+
+/* Override needed for different visual effects (e.g. in "NewHumanController.cc") depending on
+   the DIFFERENT AMOUNT OF DAMAGE done to the shield and to the health of "victim" (see Projectile.cc, Pawn.cc)
+
+//            virtual inline void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage, float shielddamage) {};
+*/
 
             void setGodMode( bool mode ){ this->bGodMode_ = mode; }
Index: code/trunk/src/orxonox/controllers/HumanController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/HumanController.cc	(revision 8521)
+++ code/trunk/src/orxonox/controllers/HumanController.cc	(revision 8706)
@@ -42,4 +42,5 @@
     extern const std::string __CC_fire_name = "fire";
     extern const std::string __CC_suicide_name = "suicide";
+    const std::string __CC_boost_name = "boost";
 
     SetConsoleCommand("HumanController", "moveFrontBack",          &HumanController::moveFrontBack ).addShortcut().setAsInputCommand();
@@ -51,5 +52,5 @@
     SetConsoleCommand("HumanController", __CC_fire_name,           &HumanController::fire          ).addShortcut().keybindMode(KeybindMode::OnHold);
     SetConsoleCommand("HumanController", "reload",                 &HumanController::reload        ).addShortcut();
-    SetConsoleCommand("HumanController", "boost",                  &HumanController::boost         ).addShortcut().keybindMode(KeybindMode::OnHold);
+    SetConsoleCommand("HumanController", __CC_boost_name,          &HumanController::keepBoost     ).addShortcut().keybindMode(KeybindMode::OnHold);
     SetConsoleCommand("HumanController", "greet",                  &HumanController::greet         ).addShortcut();
     SetConsoleCommand("HumanController", "switchCamera",           &HumanController::switchCamera  ).addShortcut();
@@ -66,4 +67,5 @@
 
     HumanController* HumanController::localController_s = 0;
+    /*static*/ const float HumanController::BOOSTING_TIME = 0.1f;
 
     HumanController::HumanController(BaseObject* creator) : Controller(creator)
@@ -71,7 +73,11 @@
         RegisterObject(HumanController);
 
-        controlPaused_ = false;
+        this->controlPaused_ = false;
+        this->boosting_ = false;
+        this->boosting_ = false;
 
         HumanController::localController_s = this;
+        this->boostingTimeout_.setTimer(HumanController::BOOSTING_TIME, false, createExecutor(createFunctor(&HumanController::terminateBoosting, this)));
+        this->boostingTimeout_.stopTimer();
     }
 
@@ -163,8 +169,47 @@
     }
 
-    void HumanController::boost()
-    {
-        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
-            HumanController::localController_s->controllableEntity_->boost();
+    /**
+    @brief
+        Static method,keeps boosting.
+    */
+    /*static*/ void HumanController::keepBoost()
+    {
+        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
+            HumanController::localController_s->keepBoosting();
+    }
+    
+    /**
+    @brief
+        Starts, or keeps the boosting mode.
+        Resets the boosting timeout and ells the ControllableEntity to boost (or not boost anymore).
+    */
+    void HumanController::keepBoosting(void)
+    {
+        if(this->boostingTimeout_.isActive())
+        {
+            this->boostingTimeout_.stopTimer();
+            this->boostingTimeout_.startTimer();
+        }
+        else
+        {
+            this->boosting_ = true;
+            this->boostingTimeout_.startTimer();
+            
+            this->controllableEntity_->boost(this->boosting_);
+            COUT(4) << "Start boosting" << endl;
+        }
+    }
+
+    /**
+    @brief
+        Terminates the boosting mode.
+    */
+    void HumanController::terminateBoosting(void)
+    {
+        this->boosting_ = false;
+        this->boostingTimeout_.stopTimer();
+
+        this->controllableEntity_->boost(this->boosting_);
+        COUT(4) << "Stop boosting" << endl;
     }
 
Index: code/trunk/src/orxonox/controllers/HumanController.h
===================================================================
--- code/trunk/src/orxonox/controllers/HumanController.h	(revision 8521)
+++ code/trunk/src/orxonox/controllers/HumanController.h	(revision 8706)
@@ -32,4 +32,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include "tools/Timer.h"
 #include "tools/interfaces/Tickable.h"
 #include "Controller.h"
@@ -64,5 +65,14 @@
             static void reload();
 
-            static void boost();
+            static void keepBoost(); // Static method, keeps boosting.
+            /**
+            @brief Check whether the HumanController is in boosting mode.
+            @return Returns true if it is, false if not.
+            */
+            inline bool isBoosting(void)
+                { return this->boosting_; }
+            void keepBoosting(void);
+            void terminateBoosting(void);
+            
             static void greet();
             static void switchCamera();
@@ -92,4 +102,10 @@
             static HumanController* localController_s;
             bool controlPaused_;
+        
+        private:
+            bool boosting_; // Whether the HumanController is in boosting mode or not.
+            Timer boostingTimeout_; // A timer to check whether the player is no longer boosting.
+            static const float BOOSTING_TIME; // The time after it is checked, whether the player is no longer boosting.
+
     }; // tolua_export
 } // tolua_export
Index: code/trunk/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSRoot.cc	(revision 8521)
+++ code/trunk/src/orxonox/gamestates/GSRoot.cc	(revision 8706)
@@ -45,4 +45,5 @@
 
     static const std::string __CC_setTimeFactor_name = "setTimeFactor";
+    static const std::string __CC_getTimeFactor_name = "getTimeFactor";
     static const std::string __CC_setPause_name = "setPause";
     static const std::string __CC_pause_name = "pause";
@@ -52,4 +53,5 @@
     SetConsoleCommand("printObjects", &GSRoot::printObjects).hide();
     SetConsoleCommand(__CC_setTimeFactor_name, &GSRoot::setTimeFactor).accessLevel(AccessLevel::Master).defaultValues(1.0);
+    SetConsoleCommand(__CC_getTimeFactor_name, &GSRoot::getTimeFactor).accessLevel(AccessLevel::Master);
     SetConsoleCommand(__CC_setPause_name,      &GSRoot::setPause     ).accessLevel(AccessLevel::Master).hide();
     SetConsoleCommand(__CC_pause_name,         &GSRoot::pause        ).accessLevel(AccessLevel::Master);
@@ -89,4 +91,5 @@
 
         ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(this);
+        ModifyConsoleCommand(__CC_getTimeFactor_name).setObject(this);
         ModifyConsoleCommand(__CC_setPause_name).setObject(this);
         ModifyConsoleCommand(__CC_pause_name).setObject(this);
@@ -96,4 +99,5 @@
     {
         ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(0);
+        ModifyConsoleCommand(__CC_getTimeFactor_name).setObject(0);
         ModifyConsoleCommand(__CC_setPause_name).setObject(0);
         ModifyConsoleCommand(__CC_pause_name).setObject(0);
@@ -151,4 +155,9 @@
                 this->timeFactorPauseBackup_ = factor;
         }
+    }
+
+    float GSRoot::getTimeFactor()
+    {
+        return TimeFactorListener::getTimeFactor();
     }
 
Index: code/trunk/src/orxonox/gamestates/GSRoot.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSRoot.h	(revision 8521)
+++ code/trunk/src/orxonox/gamestates/GSRoot.h	(revision 8706)
@@ -54,4 +54,6 @@
         void pause();
 
+        float getTimeFactor();
+
         static void delayedStartMainMenu(void);
 
Index: code/trunk/src/orxonox/gametypes/Dynamicmatch.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/Dynamicmatch.cc	(revision 8521)
+++ code/trunk/src/orxonox/gametypes/Dynamicmatch.cc	(revision 8706)
@@ -151,12 +151,5 @@
                 //Give new pig boost
                 SpaceShip* spaceship = dynamic_cast<SpaceShip*>(victim);
-                if (spaceship && spaceship->getEngine())
-                {
-                    spaceship->getEngine()->setSpeedFactor(5);
-                    WeakPtr<Engine>* ptr = new WeakPtr<Engine>(spaceship->getEngine());
-                    ExecutorPtr executor = createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this));
-                    executor->setDefaultValue(0, ptr);
-                    new Timer(10, false, executor, true);
-                }
+                grantPigBoost(spaceship);
             }
 
@@ -252,13 +245,5 @@
                 //Give new pig boost
                 SpaceShip* spaceship = dynamic_cast<SpaceShip*>(victim);
-                if (spaceship && spaceship->getEngine())
-                {
-                    spaceship->getEngine()->setSpeedFactor(5);
-                    WeakPtr<Engine>* ptr = new WeakPtr<Engine>(spaceship->getEngine());
-                    ExecutorPtr executor = createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this));
-                    executor->setDefaultValue(0, ptr);
-                    new Timer(10, false, executor, true);
-                }
-
+                grantPigBoost(spaceship);
             }
             // killer vs piggy
@@ -321,4 +306,17 @@
     }
 
+    void Dynamicmatch::grantPigBoost(orxonox::SpaceShip* spaceship)
+    {
+        // Give pig boost
+        if (spaceship)
+        {
+            spaceship->setSpeedFactor(5);
+            WeakPtr<SpaceShip>* ptr = new WeakPtr<SpaceShip>(spaceship);
+            ExecutorPtr executor = createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this));
+            executor->setDefaultValue(0, ptr);
+            new Timer(10, false, executor, true);
+        }
+    }
+
     void Dynamicmatch::playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn) //set party + colouring
     {
@@ -597,5 +595,5 @@
     }
 
-    void Dynamicmatch::resetSpeedFactor(WeakPtr<Engine>* ptr)// helper function
+    void Dynamicmatch::resetSpeedFactor(WeakPtr<SpaceShip>* ptr)// helper function
     {
         if (*ptr)
Index: code/trunk/src/orxonox/gametypes/Dynamicmatch.h
===================================================================
--- code/trunk/src/orxonox/gametypes/Dynamicmatch.h	(revision 8521)
+++ code/trunk/src/orxonox/gametypes/Dynamicmatch.h	(revision 8706)
@@ -73,5 +73,6 @@
             virtual void furtherInstructions();*/
             virtual void rewardPig();
-            void resetSpeedFactor(WeakPtr<Engine>* ptr);
+            void grantPigBoost(SpaceShip* spaceship); // Added this, since it's used twice on different occasions.
+            void resetSpeedFactor(WeakPtr<SpaceShip>* ptr);
             void tick (float dt);// used to end the game
             SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const;
Index: code/trunk/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/Gametype.cc	(revision 8521)
+++ code/trunk/src/orxonox/gametypes/Gametype.cc	(revision 8706)
@@ -121,10 +121,19 @@
         }
 
-        if (this->gtinfo_->bStartCountdownRunning_ && !this->gtinfo_->bStarted_)
-            this->gtinfo_->startCountdown_ -= dt;
-
-        if (!this->gtinfo_->bStarted_)
+        if (this->gtinfo_->isStartCountdownRunning() && !this->gtinfo_->hasStarted())
+            this->gtinfo_->countdownStartCountdown(dt);
+
+        if (!this->gtinfo_->hasStarted())
+        {
+            for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+            {
+                // Inform the GametypeInfo that the player is ready to spawn.
+                if(it->first->isHumanPlayer() && it->first->isReadyToSpawn())
+                    this->gtinfo_->playerReadyToSpawn(it->first);
+            }
+                    
             this->checkStart();
-        else if (!this->gtinfo_->bEnded_)
+        }
+        else if (!this->gtinfo_->hasEnded())
             this->spawnDeadPlayersIfRequested();
 
@@ -136,5 +145,5 @@
         this->addBots(this->numberOfBots_);
 
-        this->gtinfo_->bStarted_ = true;
+        this->gtinfo_->start();
 
         this->spawnPlayersIfRequested();
@@ -143,5 +152,5 @@
     void Gametype::end()
     {
-        this->gtinfo_->bEnded_ = true;
+        this->gtinfo_->end();
 
         for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
@@ -173,4 +182,5 @@
     {
         this->players_[player].state_ = PlayerState::Joined;
+        this->gtinfo_->playerEntered(player);
     }
 
@@ -270,4 +280,7 @@
                 }
 
+                if(victim->getPlayer()->isHumanPlayer())
+                    this->gtinfo_->pawnKilled(victim->getPlayer());
+
                 ControllableEntity* entity = this->defaultControllableEntity_.fabricate(victim->getCreator());
                 if (victim->getCamera())
@@ -306,10 +319,12 @@
     SpawnPoint* Gametype::getBestSpawnPoint(PlayerInfo* player) const
     {
+        // If there is at least one SpawnPoint.
         if (this->spawnpoints_.size() > 0)
         {
+            // Fallback spawn point if there is no active one, choose a random one.
             SpawnPoint* fallbackSpawnPoint = NULL;
             unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(this->spawnpoints_.size())));
             unsigned int index = 0;
-            std::set<SpawnPoint*> activeSpawnPoints = this->spawnpoints_;
+            std::vector<SpawnPoint*> activeSpawnPoints;
             for (std::set<SpawnPoint*>::const_iterator it = this->spawnpoints_.begin(); it != this->spawnpoints_.end(); ++it)
             {
@@ -317,20 +332,17 @@
                     fallbackSpawnPoint = (*it);
 
-                if (!(*it)->isActive())
-                    activeSpawnPoints.erase(*it);
+                if (*it != NULL && (*it)->isActive())
+                    activeSpawnPoints.push_back(*it);
 
                 ++index;
             }
 
-            randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(this->spawnpoints_.size())));
-            index = 0;
-            for (std::set<SpawnPoint*>::const_iterator it = activeSpawnPoints.begin(); it != activeSpawnPoints.end(); ++it)
-            {
-                if (index == randomspawn)
-                    return (*it);
-
-                ++index;
-            }
-
+            if(activeSpawnPoints.size() > 0)
+            {
+                randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(activeSpawnPoints.size())));
+                return activeSpawnPoints[randomspawn];
+            }
+
+            COUT(2) << "Warning: Fallback SpawnPoint was used, because there were no active SpawnPoints." << endl;
             return fallbackSpawnPoint;
         }
@@ -346,5 +358,5 @@
                 it->second.state_ = PlayerState::Dead;
 
-                if (!it->first->isReadyToSpawn() || !this->gtinfo_->bStarted_)
+                if (!it->first->isReadyToSpawn() || !this->gtinfo_->hasStarted())
                 {
                     this->spawnPlayerAsDefaultPawn(it->first);
@@ -357,12 +369,12 @@
     void Gametype::checkStart()
     {
-        if (!this->gtinfo_->bStarted_)
-        {
-            if (this->gtinfo_->bStartCountdownRunning_)
-            {
-                if (this->gtinfo_->startCountdown_ <= 0)
-                {
-                    this->gtinfo_->bStartCountdownRunning_ = false;
-                    this->gtinfo_->startCountdown_ = 0;
+        if (!this->gtinfo_->hasStarted())
+        {
+            if (this->gtinfo_->isStartCountdownRunning())
+            {
+                if (this->gtinfo_->getStartCountdown() <= 0.0f)
+                {
+                    this->gtinfo_->stopStartCountdown();
+                    this->gtinfo_->setStartCountdown(0.0f);;
                     this->start();
                 }
@@ -389,8 +401,8 @@
                         // If in developer's mode, there is no start countdown.
                         if(Core::getInstance().inDevMode())
-                            this->gtinfo_->startCountdown_ = 0;
+                            this->start();
                         else
-                            this->gtinfo_->startCountdown_ = this->initialStartCountdown_;
-                        this->gtinfo_->bStartCountdownRunning_ = true;
+                            this->gtinfo_->setStartCountdown(this->initialStartCountdown_);
+                        this->gtinfo_->startStartCountdown();
                     }
                 }
@@ -402,6 +414,8 @@
     {
         for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+        {
             if (it->first->isReadyToSpawn() || this->bForceSpawn_)
                 this->spawnPlayer(it->first);
+        }
     }
 
@@ -422,4 +436,8 @@
             player->startControl(spawnpoint->spawn());
             this->players_[player].state_ = PlayerState::Alive;
+
+            if(player->isHumanPlayer())
+                this->gtinfo_->playerSpawned(player);
+            
             this->playerPostSpawn(player);
         }
Index: code/trunk/src/orxonox/gametypes/Gametype.h
===================================================================
--- code/trunk/src/orxonox/gametypes/Gametype.h	(revision 8521)
+++ code/trunk/src/orxonox/gametypes/Gametype.h	(revision 8706)
@@ -78,7 +78,7 @@
 
             inline bool hasStarted() const
-                { return this->gtinfo_->bStarted_; }
+                { return this->gtinfo_->hasStarted(); }
             inline bool hasEnded() const
-                { return this->gtinfo_->bEnded_; }
+                { return this->gtinfo_->hasEnded(); }
 
             virtual void start();
@@ -114,12 +114,12 @@
 
             inline bool isStartCountdownRunning() const
-                { return this->gtinfo_->bStartCountdownRunning_; }
+                { return this->gtinfo_->isStartCountdownRunning(); }
             inline float getStartCountdown() const
-                { return this->gtinfo_->startCountdown_; }
+                { return this->gtinfo_->getStartCountdown(); }
 
             inline void setHUDTemplate(const std::string& name)
-                { this->gtinfo_->hudtemplate_ = name; }
+                { this->gtinfo_->setHUDTemplate(name); }
             inline const std::string& getHUDTemplate() const
-                { return this->gtinfo_->hudtemplate_; }
+                { return this->gtinfo_->getHUDTemplate(); }
 
             void addBots(unsigned int amount);
Index: code/trunk/src/orxonox/gametypes/LastTeamStanding.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/LastTeamStanding.cc	(revision 8521)
+++ code/trunk/src/orxonox/gametypes/LastTeamStanding.cc	(revision 8706)
@@ -55,8 +55,8 @@
         this->setHUDTemplate("lastTeamStandingHUD");
     }
-    
+
     LastTeamStanding::~LastTeamStanding()
     {
-    }   
+    }
 
     void LastTeamStanding::playerEntered(PlayerInfo* player)
@@ -69,10 +69,10 @@
         else
             playerLives_[player]=getMinLives();//new players only get minimum of lives */
-        
+
         this->timeToAct_[player] = timeRemaining;
         this->playerDelayTime_[player] = respawnDelay;
         this->inGame_[player] = true;
         unsigned int team = getTeam(player);
-        if( team < 0|| team > teams_) // make sure getTeam returns a regular value
+        if(team >= eachTeamsPlayers.size()) // make sure getTeam returns a regular value
             return;
         if(this->eachTeamsPlayers[team]==0) //if a player is the first in his group, a new team is alive
@@ -91,5 +91,5 @@
             this->inGame_.erase(player);
             unsigned int team = getTeam(player);
-            if( team < 0|| team > teams_) // make sure getTeam returns a regular value
+            if(team >= eachTeamsPlayers.size()) // make sure getTeam returns a regular value
                 return valid_player;
             this->eachTeamsPlayers[team]--;       // a player left the team
@@ -107,5 +107,5 @@
         bool allow = TeamDeathmatch::allowPawnDeath(victim, originator);
         if(!allow) {return allow;}
-        
+
         playerLives_[victim->getPlayer()] = playerLives_[victim->getPlayer()] - 1; //player lost a live
         this->inGame_[victim->getPlayer()] = false; //if player dies, he isn't allowed to respawn immediately
@@ -113,5 +113,5 @@
         {
             unsigned int team = getTeam(victim->getPlayer());
-            if(team < 0|| team > teams_) // make sure getTeam returns a regular value
+            if(team >= eachTeamsPlayers.size()) // make sure getTeam returns a regular value
                 return allow;
             this->eachTeamsPlayers[team]--;
@@ -140,5 +140,5 @@
                 const std::string& message = ""; // resets Camper-Warning-message
                 this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
-            }    
+            }
         }
         return allow;
@@ -163,8 +163,8 @@
             return;
         TeamDeathmatch::playerStartsControllingPawn(player,pawn);
-        
+
         this->timeToAct_[player] = timeRemaining + 3.0f + respawnDelay;//reset timer
         this->playerDelayTime_[player] = respawnDelay;
-        
+
         std::map<PlayerInfo*, Player>::iterator it = this->players_.find(player);
         if (it != this->players_.end())
@@ -174,5 +174,5 @@
             const std::string& message = ""; // resets Camper-Warning-message
             this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
-        }  
+        }
     }
 
@@ -187,9 +187,9 @@
             }
             for (std::map<PlayerInfo*, float>::iterator it = this->timeToAct_.begin(); it != this->timeToAct_.end(); ++it)
-            {   
+            {
                 if (playerGetLives(it->first) <= 0)//Players without lives shouldn't be affected by time.
-                    continue;     
+                    continue;
                 it->second -= dt;//Decreases punishment time.
-                if (!inGame_[it->first])//Manages respawn delay - player is forced to respawn after the delaytime is used up. 
+                if (!inGame_[it->first])//Manages respawn delay - player is forced to respawn after the delaytime is used up.
                 {
                     playerDelayTime_[it->first] -= dt;
@@ -309,5 +309,5 @@
             return 0;
     }
-    
+
     void LastTeamStanding::setConfigValues()
     {
Index: code/trunk/src/orxonox/graphics/Billboard.cc
===================================================================
--- code/trunk/src/orxonox/graphics/Billboard.cc	(revision 8521)
+++ code/trunk/src/orxonox/graphics/Billboard.cc	(revision 8706)
@@ -23,5 +23,5 @@
  *      Fabian 'x3n' Landau
  *   Co-authors:
- *      ...
+ *      Maurus Kaufmann
  *
  */
@@ -30,5 +30,4 @@
 
 #include "OgreBillboard.h"
-#include "OgreBillboardSet.h"
 
 #include "core/CoreIncludes.h"
@@ -46,5 +45,5 @@
 
         this->colour_ = ColourValue::White;
-        //this->rotation_ = 0;
+        this->rotation_ = 0;
 
         this->registerVariables();
@@ -66,5 +65,5 @@
         XMLPortParam(Billboard, "material", setMaterial, getMaterial, xmlelement, mode);
         XMLPortParam(Billboard, "colour",   setColour,   getColour,   xmlelement, mode).defaultValues(ColourValue::White);
-        //XMLPortParam(Billboard, "rotation", setRotation, getRotation, xmlelement, mode).defaultValues(0);
+        XMLPortParam(Billboard, "rotation", setRotation, getRotation, xmlelement, mode).defaultValues(0);
     }
 
@@ -73,5 +72,5 @@
         registerVariable(this->material_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
         registerVariable(this->colour_,   VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
-        //registerVariable(this->rotation_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation));
+        registerVariable(this->rotation_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation));
     }
 
@@ -89,5 +88,5 @@
                      this->attachOgreObject(this->billboard_.getBillboardSet());
                 this->billboard_.setVisible(this->isVisible());
-                //this->changedRotation();
+                this->changedRotation();
             }
         }
@@ -114,5 +113,5 @@
     }
 
-/*
+
     void Billboard::changedRotation()
     {
@@ -128,5 +127,5 @@
         }
     }
-*/
+
 
     void Billboard::changedVisibility()
@@ -136,3 +135,39 @@
         this->billboard_.setVisible(this->isVisible());
     }
+    
+    void Billboard::setBillboardType(Ogre::BillboardType bbt)
+    {
+        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
+        if( bSet != NULL )
+        {
+            bSet->setBillboardType(bbt);
+        }
+    }
+    
+    void Billboard::setCommonDirection(Vector3 vec)
+    {
+        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
+        if( bSet != NULL )
+        {
+            bSet->setCommonDirection( vec );
+        }
+    }
+            
+    void Billboard::setCommonUpVector(Vector3 vec)
+    {
+        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
+        if( bSet != NULL )
+        {
+            bSet->setCommonUpVector( vec );
+        }
+    }
+    
+    void Billboard::setDefaultDimensions(float width, float height)
+    {
+        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
+        if( bSet != NULL )
+        {
+            bSet->setDefaultDimensions(width, height);
+        }
+    }
 }
Index: code/trunk/src/orxonox/graphics/Billboard.h
===================================================================
--- code/trunk/src/orxonox/graphics/Billboard.h	(revision 8521)
+++ code/trunk/src/orxonox/graphics/Billboard.h	(revision 8706)
@@ -23,5 +23,5 @@
  *      Fabian 'x3n' Landau
  *   Co-authors:
- *      ...
+ *      Maurus Kaufmann
  *
  */
@@ -31,4 +31,6 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include "OgreBillboardSet.h"
 
 #include "util/Math.h"
@@ -62,13 +64,22 @@
                 { return this->colour_; }
 
-/*
+
             inline void setRotation(const Radian& rotation)
                 { this->rotation_ = rotation; this->changedRotation(); }
             inline const Radian& getRotation() const
                 { return this->rotation_; }
-*/
+
 
             virtual void setTeamColour(const ColourValue& colour)
                 { this->setColour(colour); }
+                
+            void setBillboardType(Ogre::BillboardType bbt);
+            
+            void setCommonDirection(Vector3 vec); //!< normalised Vector vec as argument
+            
+            void setCommonUpVector(Vector3 vec); //!< normalised Vector vec as argument
+            
+            void setDefaultDimensions(float width, float height);
+
 
         protected:
@@ -81,10 +92,10 @@
             void registerVariables();
             void changedMaterial();
-            //void changedRotation();
+            void changedRotation();
 
             BillboardSet billboard_;
             std::string material_;
             ColourValue colour_;
-            //Radian rotation_;
+            Radian rotation_;
     };
 }
Index: code/trunk/src/orxonox/graphics/Camera.cc
===================================================================
--- code/trunk/src/orxonox/graphics/Camera.cc	(revision 8521)
+++ code/trunk/src/orxonox/graphics/Camera.cc	(revision 8706)
@@ -71,5 +71,5 @@
         this->lastDtLagged_ = false;
 
-        this->setSyncMode(0x0);
+        this->setSyncMode(ObjectDirection::None);
 
         this->setConfigValues();
Index: code/trunk/src/orxonox/graphics/Camera.h
===================================================================
--- code/trunk/src/orxonox/graphics/Camera.h	(revision 8521)
+++ code/trunk/src/orxonox/graphics/Camera.h	(revision 8706)
@@ -40,5 +40,6 @@
 namespace orxonox
 {
-    class _OrxonoxExport Camera : public StaticEntity, public Tickable, public TimeFactorListener, public WindowEventListener
+
+    class _OrxonoxExport Camera : public StaticEntity, public Tickable,  public TimeFactorListener, public WindowEventListener
     {
         friend class CameraManager;
Index: code/trunk/src/orxonox/infos/GametypeInfo.cc
===================================================================
--- code/trunk/src/orxonox/infos/GametypeInfo.cc	(revision 8521)
+++ code/trunk/src/orxonox/infos/GametypeInfo.cc	(revision 8706)
@@ -23,7 +23,12 @@
  *      Fabian 'x3n' Landau
  *   Co-authors:
- *      ...
+ *      Damian 'Mozork' Frick
  *
  */
+
+/**
+    @file GametypeInfo.cc
+    @brief Implementation of the GametypeInfo class
+*/
 
 #include "GametypeInfo.h"
@@ -31,7 +36,13 @@
 #include "core/CoreIncludes.h"
 #include "core/GameMode.h"
+#include "network/Host.h"
 #include "network/NetworkFunction.h"
-#include "network/Host.h"
+#include "util/Convert.h"
+
+#include "controllers/HumanController.h"
 #include "interfaces/GametypeMessageListener.h"
+#include "interfaces/NotificationListener.h"
+
+#include "PlayerInfo.h"
 
 namespace orxonox
@@ -45,12 +56,24 @@
     registerMemberNetworkFunction(GametypeInfo, dispatchFadingMessage);
 
+    registerMemberNetworkFunction(GametypeInfo, changedReadyToSpawn);
+    registerMemberNetworkFunction(GametypeInfo, changedSpawned);
+
+    /*static*/ const std::string GametypeInfo::NOTIFICATION_SENDER("gameinfo");
+
+    /**
+    @brief
+        Registers and initializes the object.
+    */
     GametypeInfo::GametypeInfo(BaseObject* creator) : Info(creator)
     {
         RegisterObject(GametypeInfo);
-
+        
         this->bStarted_ = false;
         this->bEnded_ = false;
-        this->startCountdown_ = 0;
+        this->startCountdown_ = 0.0f;
         this->bStartCountdownRunning_ = false;
+        this->counter_ = 0;
+        this->spawned_ = false;
+        this->readyToSpawn_ = false;
 
         this->registerVariables();
@@ -63,10 +86,310 @@
     void GametypeInfo::registerVariables()
     {
-        registerVariable(this->bStarted_,               VariableDirection::ToClient);
-        registerVariable(this->bEnded_,                 VariableDirection::ToClient);
+        registerVariable(this->bStarted_,               VariableDirection::ToClient, new NetworkCallback<GametypeInfo>(this, &GametypeInfo::changedStarted));
+        registerVariable(this->bEnded_,                 VariableDirection::ToClient, new NetworkCallback<GametypeInfo>(this, &GametypeInfo::changedEnded));
+        registerVariable(this->bStartCountdownRunning_, VariableDirection::ToClient, new NetworkCallback<GametypeInfo>(this, &GametypeInfo::changedStartCountdownRunning));
         registerVariable(this->startCountdown_,         VariableDirection::ToClient);
-        registerVariable(this->bStartCountdownRunning_, VariableDirection::ToClient);
+        registerVariable(this->counter_,                VariableDirection::ToClient, new NetworkCallback<GametypeInfo>(this, &GametypeInfo::changedCountdownCounter));
         registerVariable(this->hudtemplate_,            VariableDirection::ToClient);
     }
+
+    /**
+    @brief
+        Is called when the game has changed to started.
+    */
+    void GametypeInfo::changedStarted(void)
+    {
+        NotificationListener::sendCommand("clear", GametypeInfo::NOTIFICATION_SENDER);
+    }
+
+    /**
+    @brief
+        Is called when the game has changed to ended.
+    */
+    void GametypeInfo::changedEnded(void)
+    {
+        // If the game has ended, a "Game has ended" notification is displayed.
+        if(this->hasEnded())
+            NotificationListener::sendNotification("Game has ended", GametypeInfo::NOTIFICATION_SENDER);
+    }
+
+    /**
+    @brief
+        Is called when the start countdown has been either started or stopped.
+    */
+    void GametypeInfo::changedStartCountdownRunning(void)
+    {
+        // Send first countdown notification if the countdown has started.
+        if(this->isReadyToSpawn() && !this->hasStarted() && this->isStartCountdownRunning() && !this->hasEnded())
+            NotificationListener::sendNotification(multi_cast<std::string>(this->counter_), GametypeInfo::NOTIFICATION_SENDER);
+    }
+
+    /**
+    @brief
+        Is called when the start countdown counter has changed.
+    */
+    void GametypeInfo::changedCountdownCounter(void)
+    {
+        // Send countdown notification if the counter has gone down.
+        if(this->isReadyToSpawn() &&  !this->hasStarted() && this->isStartCountdownRunning() && !this->hasEnded())
+            NotificationListener::sendNotification(multi_cast<std::string>(this->counter_), GametypeInfo::NOTIFICATION_SENDER);
+    }
+
+    /**
+    @brief
+        Inform the GametypeInfo that the local player has changed its ready to spawn status.
+    @param ready
+        Whether the player has become ready to spawn or not.
+    */
+    void GametypeInfo::changedReadyToSpawn(bool ready)
+    {
+        if(this->readyToSpawn_ == ready)
+            return;
+
+        this->readyToSpawn_ = ready;
+
+        // Send "Waiting for other players" if the player is ready to spawn but the game has not yet started nor is the countdown running.
+        if(this->readyToSpawn_ && !this->hasStarted() && !this->isStartCountdownRunning() && !this->hasEnded())
+            NotificationListener::sendNotification("Waiting for other players", GametypeInfo::NOTIFICATION_SENDER);
+        // Send current countdown if the player is ready to spawn and the countdown has already started.
+        else if(this->readyToSpawn_ && !this->hasStarted() && this->isStartCountdownRunning() && !this->hasEnded())
+            NotificationListener::sendNotification(multi_cast<std::string>(this->counter_), GametypeInfo::NOTIFICATION_SENDER);
+    }
+
+    /**
+    @brief
+        Inform the GametypeInfo that the game has started.
+    */
+    void GametypeInfo::start(void)
+    {
+        if(this->bStarted_)
+            return;
+        
+        this->bStarted_ = true;
+        this->changedStarted();
+    }
+
+    /**
+    @brief
+        Inform the GametypeInfo that the game has ended.
+    */
+    void GametypeInfo::end(void)
+    {
+        if(this->bEnded_)
+            return;
+
+        this->bEnded_ = true;
+        this->changedEnded();
+    }
+
+    /**
+    @brief
+        Set the start countdown to the input value.
+    @param countdown
+        The countdown to be set.
+    */
+    void GametypeInfo::setStartCountdown(float countdown)
+    {
+        if(this->startCountdown_ == countdown || countdown < 0.0f)
+            return;
+        
+        this->startCountdown_ = countdown;
+        // Set the counter to the ceiling of the current countdown.
+        this->counter_ = std::ceil(countdown);
+        this->changedCountdownCounter();
+    }
+
+    /**
+    @brief
+        Count down the start countdown by the specified value.
+    @param countDown
+        The amount by which we count down.
+    */
+    void GametypeInfo::countdownStartCountdown(float countDown)
+    {
+        float newCountdown = this->startCountdown_ - countDown;
+        // If we have switched integers or arrived at zero, we also count down the start countdown counter.
+        if(ceil(newCountdown) != ceil(this->startCountdown_) || newCountdown <= 0.0f)
+            this->countDown();
+        this->startCountdown_ = newCountdown;
+    }
+
+    /**
+    @brief
+        Count down the start countdown counter.
+    */
+    void GametypeInfo::countDown()
+    {
+        if(this->counter_ == 0)
+            return;
+        
+        this->counter_--;
+        this->changedCountdownCounter();
+    }
+
+    /**
+    @brief
+        Inform the GametypeInfo about the start of the start countdown.
+    */
+    void GametypeInfo::startStartCountdown(void)
+    {
+        if(GameMode::isMaster())
+        {
+            if(this->bStartCountdownRunning_)
+                return;
+
+            this->bStartCountdownRunning_ = true;
+            this->changedStartCountdownRunning();
+        }
+    }
+
+    /**
+    @brief
+        Inform the GametypeInfo about the stop of the start countdown.
+    */
+    void GametypeInfo::stopStartCountdown(void)
+    {
+        if(GameMode::isMaster())
+        {
+            if(!this->bStartCountdownRunning_)
+                return;
+
+            this->bStartCountdownRunning_ = false;
+            this->changedStartCountdownRunning();
+        }
+    }
+
+    /**
+    @brief
+        Inform the GametypeInfo about a player that is ready to spawn.
+    @param player
+        The player that is ready to spawn.
+    */
+    void GametypeInfo::playerReadyToSpawn(PlayerInfo* player)
+    {
+        if(GameMode::isMaster())
+        {
+            // If the player has spawned already.
+            if(this->spawnedPlayers_.find(player) != this->spawnedPlayers_.end())
+                return;
+
+            this->spawnedPlayers_.insert(player);
+            this->setReadyToSpawnHelper(player, true);
+        }
+    }
+
+    /**
+    @brief
+        Inform the GametypeInfo about a player whose Pawn has been killed.
+    @param player
+        The player whose Pawn has been killed.
+    */
+    void GametypeInfo::pawnKilled(PlayerInfo* player)
+    {
+        if(GameMode::isMaster())
+        {
+            NotificationListener::sendNotification("Press [Fire] to respawn", GametypeInfo::NOTIFICATION_SENDER, notificationMessageType::info, notificationSendMode::network, player->getClientID());
+            // Remove the player from the list of players that have spawned, since it currently is not.
+            this->spawnedPlayers_.erase(player);
+            this->setReadyToSpawnHelper(player, false);
+            this->setSpawnedHelper(player, false);
+        }
+    }
+
+    /**
+    @brief
+        Inform the GametypeInfo about a player that has spawned.
+    @param player
+        The player that has spawned.
+    */
+    void GametypeInfo::playerSpawned(PlayerInfo* player)
+    {
+        if(GameMode::isMaster())
+        {
+            if(this->hasStarted() && !this->hasEnded())
+
+                this->setSpawnedHelper(player, true);
+        }
+    }
+
+    /**
+    @brief
+        Inform the GametypeInfo that the local player has changed its spawned status.
+    @param spawned
+        Whether the local player has changed to spawned or to not spawned.
+    */
+    void GametypeInfo::changedSpawned(bool spawned)
+    {
+        if(this->spawned_ == spawned)
+            return;
+        
+        this->spawned_ = spawned;
+        // Clear the notifications if the Player has spawned.
+        if(this->spawned_ && !this->hasEnded())
+            NotificationListener::sendCommand("clear", GametypeInfo::NOTIFICATION_SENDER);
+    }
+
+    /**
+    @brief
+        Inform the GametypeInfo about a player that has entered,
+    @param player
+        The player that has entered.
+    */
+    void GametypeInfo::playerEntered(PlayerInfo* player)
+    {
+        if(GameMode::isMaster())
+        {
+            if( player->isHumanPlayer() )
+            {
+                // Display "Press [Fire] to start the match" if the game has not yet ended.
+                if(!this->hasEnded())
+                    NotificationListener::sendNotification("Press [Fire] to start the match", GametypeInfo::NOTIFICATION_SENDER, notificationMessageType::info, notificationSendMode::network, player->getClientID());
+                // Else display "Game has ended".
+                else
+                    NotificationListener::sendNotification("Game has ended", GametypeInfo::NOTIFICATION_SENDER, notificationMessageType::info, notificationSendMode::network, player->getClientID());
+            }
+        }
+    }
+
+    /**
+    @brief
+        Helper method. Sends changedReadyToSpawn notifiers over the network.
+    @param player
+        The player that has changed its ready to spawn status.
+    @param ready
+        The new ready to spawn status.
+    */
+    void GametypeInfo::setReadyToSpawnHelper(PlayerInfo* player, bool ready)
+    {
+        if(GameMode::isMaster())
+        {
+            if(player->getClientID() == CLIENTID_SERVER)
+                this->changedReadyToSpawn(ready);
+            else
+                callMemberNetworkFunction(GametypeInfo, changedReadyToSpawn, this->getObjectID(), player->getClientID(), ready);
+        }
+    }
+
+    /**
+    @brief
+        Helper method. Sends changedSpawned notifiers over the network.
+    @param player
+        The player that has changed its spawned status.
+    @param ready
+        The new spawned status.
+    */
+    void GametypeInfo::setSpawnedHelper(PlayerInfo* player, bool spawned)
+    {
+        if(GameMode::isMaster())
+        {
+            if(player->getClientID() == CLIENTID_SERVER)
+                    this->changedSpawned(spawned);
+            else
+                callMemberNetworkFunction(GametypeInfo, changedSpawned, this->getObjectID(), player->getClientID(), spawned);
+        }
+    }
+
+    // Announce messages.
+    // TODO: Replace with notifications.
 
     void GametypeInfo::sendAnnounceMessage(const std::string& message)
Index: code/trunk/src/orxonox/infos/GametypeInfo.h
===================================================================
--- code/trunk/src/orxonox/infos/GametypeInfo.h	(revision 8521)
+++ code/trunk/src/orxonox/infos/GametypeInfo.h	(revision 8706)
@@ -23,7 +23,12 @@
  *      Fabian 'x3n' Landau
  *   Co-authors:
- *      ...
+ *      Damian 'Mozork' Frick
  *
  */
+
+/**
+    @file GametypeInfo.h
+    @brief Definition of the GametypeInfo class
+*/
 
 #ifndef _GametypeInfo_H__
@@ -33,8 +38,19 @@
 
 #include <string>
+
 #include "Info.h"
 
 namespace orxonox
 {
+
+    /**
+    @brief
+        The GametypeInfo class keeps track of the state of the game and provides facilities to inform the player about it.
+
+    @author
+        Fabian 'x3n' Landau
+    @author
+        Damian 'Mozork' Frick
+    */
     class _OrxonoxExport GametypeInfo : public Info
     {
@@ -45,13 +61,59 @@
             virtual ~GametypeInfo();
 
+            /**
+            @brief Get whether the game has started yet.
+            @return Returns true if the game has started, false if not.
+            */
             inline bool hasStarted() const
                 { return this->bStarted_; }
+            void changedStarted(void); // Is called when the game has changed to started.
+            
+            /**
+            @brief Get whether the game has ended yet.
+            @return Returns true if the game has ended, false if not.
+            */
             inline bool hasEnded() const
                 { return this->bEnded_; }
+            void changedEnded(void); // Is called when the game has changed to ended.
 
+            /**
+            @brief Get whether the start countdown is currently running.
+            @return Returns true if the countdown is running, false if not.
+            */
             inline bool isStartCountdownRunning() const
                 { return this->bStartCountdownRunning_; }
+            void changedStartCountdownRunning(void); // Is called when the start countdown has been either started or stopped.
+
+            /**
+            @brief Get the current value of the start countdown.
+            @return Returns the current value of the start countdown.
+            */
             inline float getStartCountdown() const
                 { return this->startCountdown_; }
+
+            /**
+            @brief Get the current start countdown counter.
+                   The start countdown counter only has integer values that correspond to the actually displayed countdown.
+            @return Returns the current integer countdown counter.
+            */
+            inline unsigned int getStartCountdownCounter() const
+                { return this->counter_; }
+            void changedCountdownCounter(void); // Is called when the start countdown counter has changed.
+
+            /**
+            @brief Get whether the local player is ready to spawn.
+            @return Returns true if the player is ready to spawn, false if not.
+            */
+            inline bool isReadyToSpawn() const
+                { return this->readyToSpawn_; }
+            void changedReadyToSpawn(bool ready); // Inform the GametypeInfo that the local player has changed its spawned status.
+            
+            /**
+            @brief Get whether the local player is spawned.
+            @return Returns true if the local player is currently spawned, false if not.
+            */
+            inline bool isSpawned() const
+                { return this->spawned_; }
+            void changedSpawned(bool spawned); // Inform the GametypeInfo that the local player has changed its spawned status.
 
             inline const std::string& getHUDTemplate() const
@@ -70,13 +132,38 @@
             void dispatchStaticMessage(const std::string& message,const ColourValue& colour);
             void dispatchFadingMessage(const std::string& message);
+            
+        protected:
+            void start(void); // Inform the GametypeInfo that the game has started.
+            void end(void); // Inform the GametypeInfo that the game has ended.
+            void setStartCountdown(float countdown); // Set the start countdown to the input value.
+            void countdownStartCountdown(float countDown); // Count down the start countdown by the specified value.
+            void countDown(); // Count down the start countdown counter.
+            void startStartCountdown(void); // Inform the GametypeInfo about the start of the start countdown.
+            void stopStartCountdown(void); // Inform the GametypeInfo about the stop of the start countdown.
+            void playerReadyToSpawn(PlayerInfo* player); // Inform the GametypeInfo about a player that is ready to spawn.
+            void pawnKilled(PlayerInfo* player); // Inform the GametypeInfo about a player whose Pawn has been killed.
+            void playerSpawned(PlayerInfo* player); // Inform the GametypeInfo about a player that has spawned.
+            void playerEntered(PlayerInfo* player); // Inform the GametypeInfo about a player that has entered,
+
+            inline void setHUDTemplate(const std::string& templateName)
+                { this->hudtemplate_ = templateName; };
 
         private:
             void registerVariables();
+            void setSpawnedHelper(PlayerInfo* player, bool spawned); // Helper method. Sends changedReadyToSpawn notifiers over the network.
+            void setReadyToSpawnHelper(PlayerInfo* player, bool ready); // Helper method. Sends changedSpawned notifiers over the network.
 
-            bool bStarted_;
-            bool bEnded_;
-            bool bStartCountdownRunning_;
-            float startCountdown_;
+            static const std::string NOTIFICATION_SENDER; //!< The name of the sender for the sending of notifications.
+
+            bool bStarted_; //!< Whether the game has started,
+            bool bEnded_; //!< Whether the game has ended.
+            bool bStartCountdownRunning_; //!< Whether the start countdown is running.
+            float startCountdown_; //!< The current value of the start countdown.
+            unsigned int counter_; //!< The current integer value of the start countdown, the start countdown counter.
             std::string hudtemplate_;
+            
+            std::set<PlayerInfo*> spawnedPlayers_; //!< A set of players that are currently spawned.
+            bool spawned_; //!< Whether the local Player is currently spawned.
+            bool readyToSpawn_; //!< Whether the local Player is ready to spawn.
     };
 }
Index: code/trunk/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- code/trunk/src/orxonox/infos/PlayerInfo.cc	(revision 8521)
+++ code/trunk/src/orxonox/infos/PlayerInfo.cc	(revision 8706)
@@ -51,5 +51,4 @@
         this->controllableEntity_ = 0;
         this->controllableEntityID_ = OBJECTID_UNKNOWN;
-        this->oldControllableEntity_ = 0;
 
         this->gtinfo_ = 0;
@@ -151,6 +150,7 @@
             return;
 
-        if (this->oldControllableEntity_)
+        while (this->previousControllableEntity_.size() > 0)
             this->stopTemporaryControl();
+        
         if (this->controllableEntity_)
             this->stopControl();
@@ -177,7 +177,6 @@
             return;
 
-        assert( this->oldControllableEntity_==0 );
-
-        this->oldControllableEntity_ = this->controllableEntity_;
+        this->controllableEntity_->destroyHud(); // HACK-ish
+        this->previousControllableEntity_.push_back(WeakPtr<ControllableEntity>(this->controllableEntity_));
         this->controllableEntity_ = entity;
         this->controllableEntityID_ = entity->getObjectID();
@@ -194,5 +193,5 @@
     void PlayerInfo::stopControl()
     {
-        if ( this->oldControllableEntity_ )
+        while ( this->previousControllableEntity_.size() > 0)
             this->stopTemporaryControl();
 
@@ -215,20 +214,40 @@
     }
 
+    void PlayerInfo::pauseControl()
+    {
+        ControllableEntity* entity = this->controllableEntity_;
+
+        if (!entity)
+            return;
+
+        this->controllableEntity_->getController()->setActive(false);
+        //this->controllableEntity_->getController()->setControllableEntity(NULL);
+        this->controllableEntity_->setController(0);
+    }
+
     void PlayerInfo::stopTemporaryControl()
     {
         ControllableEntity* entity = this->controllableEntity_;
 
-        assert( this->controllableEntity_ && this->oldControllableEntity_ );
-        if( !entity || !this->oldControllableEntity_ )
+        assert(this->controllableEntity_ != NULL);
+        if( !entity || this->previousControllableEntity_.size() == 0 )
             return;
 
         this->controllableEntity_->setController(0);
+        this->controllableEntity_->destroyHud(); // HACK-ish
         
-        this->controllableEntity_ = this->oldControllableEntity_;
+//        this->controllableEntity_ = this->previousControllableEntity_.back();
+        do {
+            this->controllableEntity_ = this->previousControllableEntity_.back();
+        } while(this->controllableEntity_ == NULL && this->previousControllableEntity_.size() > 0);
         this->controllableEntityID_ = this->controllableEntity_->getObjectID();
-        this->oldControllableEntity_ = 0;
-
-        if ( this->controllableEntity_ && this->controller_)
+        this->previousControllableEntity_.pop_back();
+
+        if ( this->controllableEntity_ != NULL && this->controller_ != NULL)
             this->controller_->setControllableEntity(this->controllableEntity_);
+
+         // HACK-ish
+        if(this->controllableEntity_ != NULL)
+            this->controllableEntity_->createHud();
 
         if ( GameMode::isMaster() )
Index: code/trunk/src/orxonox/infos/PlayerInfo.h
===================================================================
--- code/trunk/src/orxonox/infos/PlayerInfo.h	(revision 8521)
+++ code/trunk/src/orxonox/infos/PlayerInfo.h	(revision 8706)
@@ -68,4 +68,5 @@
             void startControl(ControllableEntity* entity);
             void stopControl();
+            void pauseControl();
             void startTemporaryControl(ControllableEntity* entity);
             void stopTemporaryControl();
@@ -98,5 +99,5 @@
             Controller* controller_;
             ControllableEntity* controllableEntity_;
-            ControllableEntity* oldControllableEntity_;
+            std::vector< WeakPtr<ControllableEntity> > previousControllableEntity_; //!< List of the previous ControllableEntities if repeatedly startTemporary control was called. The ControllableEntity at the back is the most recent.
             unsigned int controllableEntityID_;
 
Index: code/trunk/src/orxonox/interfaces/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/interfaces/CMakeLists.txt	(revision 8521)
+++ code/trunk/src/orxonox/interfaces/CMakeLists.txt	(revision 8706)
@@ -1,4 +1,5 @@
 ADD_SOURCE_FILES(ORXONOX_SRC_FILES
   InterfaceCompilation.cc
+  NotificationListener.cc
   Pickupable.cc
   PickupCarrier.cc
Index: code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc	(revision 8521)
+++ code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc	(revision 8706)
@@ -42,4 +42,7 @@
 #include "core/CoreIncludes.h"
 
+#include "infos/PlayerInfo.h"
+#include "worldentities/pawns/Pawn.h"
+
 namespace orxonox
 {
@@ -59,6 +62,13 @@
         RegisterRootObject(PlayerTrigger);
 
-        this->player_ = NULL;
         this->isForPlayer_ = false;
+    }
+
+    void PlayerTrigger::setTriggeringPawn(Pawn* pawn)
+    {
+        assert(pawn);
+        this->pawn_ = WeakPtr<Pawn>(pawn);
+        if (pawn)
+            this->player_ = WeakPtr<PlayerInfo>(pawn->getPlayer());
     }
 
@@ -86,11 +96,3 @@
         RegisterRootObject(Rewardable);
     }
-
-    //----------------------------
-    // NotificationListener
-    //----------------------------
-    NotificationListener::NotificationListener()
-    {
-        RegisterRootObject(NotificationListener);
-    }
 }
Index: code/trunk/src/orxonox/interfaces/NotificationListener.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/NotificationListener.cc	(revision 8706)
+++ code/trunk/src/orxonox/interfaces/NotificationListener.cc	(revision 8706)
@@ -0,0 +1,161 @@
+/*
+ *   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:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file NotificationListener.cc
+    @brief Implementation of the NotificationListener class.
+*/
+
+#include "core/CoreIncludes.h"
+#include "network/Host.h"
+#include "network/NetworkFunction.h"
+#include "util/SubString.h"
+
+#include "interfaces/NotificationListener.h"
+
+namespace orxonox
+{
+    
+    /*static*/ const std::string NotificationListener::ALL("all");
+    /*static*/ const std::string NotificationListener::NONE("none");
+    
+    // Commands
+    /*static*/ const std::string NotificationListener::COMMAND_CLEAR("clear");
+    /*static*/ const std::string NotificationListener::COMMAND_NONE("none");
+    
+    registerStaticNetworkFunction(NotificationListener::sendHelper);
+    
+    NotificationListener::NotificationListener()
+    {
+        RegisterRootObject(NotificationListener);
+    }
+
+    /**
+    @brief
+        Helper method to send both notifications and commands over the network.
+    @param message
+        The message/command that should be sent.
+    @param sender
+        The sender that sent the notification/command.
+    @param sendMode
+        The mode in which the notification/command is sent, can be 'local' to send the notification to the client where this function is executed, 'network' if the notification is to be sent to the client with the specified clientID, or 'broadcast' if the notification should be sent to all hosts.
+    @param clientId
+        The id of the client the notification/command should be sent to.
+    @param isCommand
+        Whether the message is a notification or a command.
+    @param messageType
+        The type of the notification, can be either 'info' or 'important'.
+    */
+    /*static*/ void NotificationListener::sendNetworkHelper(const std::string& message, const std::string& sender, notificationSendMode::Value sendMode, unsigned int clientId, bool isCommand, notificationMessageType::Value messageType)
+    {
+        // If we're in standalone mode or we're already no the right client we create and send the notification/command.
+        if(GameMode::isStandalone() || sendMode == notificationSendMode::local || (sendMode ==  notificationSendMode::network && Host::getPlayerID() == clientId))
+        {
+            sendHelper(message, sender, isCommand, messageType);
+        }
+        // If we're on the server (and the server is not the intended recipient of the notification/command) we send it over the network.
+        else if(GameMode::isServer() && sendMode == notificationSendMode::network && Host::getPlayerID() != clientId)
+        {
+            callStaticNetworkFunction(NotificationListener::sendHelper, clientId, message, sender, isCommand, (unsigned int)messageType);
+        }
+        else if(GameMode::isServer() && sendMode == notificationSendMode::broadcast)
+        {
+            // TODO: Works as intended?
+            callStaticNetworkFunction(NotificationListener::sendHelper, NETWORK_PEER_ID_BROADCAST, message, sender, isCommand, (unsigned int)messageType);
+        }
+    }
+
+    /**
+    @brief
+        Helper method to register a notification/execute a command with all NotificationListeners after it has been sent over the network.
+    @param message
+        The notification/command to be sent/executed.
+    @param sender
+        The sender that sent the notification/command.
+    @param isCommand
+        Whether the message is a command or a notification.
+    @param messageType
+        The type of the notification.
+    */
+    /*static*/ void NotificationListener::sendHelper(const std::string& message, const std::string& sender, bool isCommand, unsigned int messageType)
+    {
+        // Iterate through all NotificationListeners and notify them by calling the method they overloaded.
+        for(ObjectList<NotificationListener>::iterator it = ObjectList<NotificationListener>::begin(); it != ObjectList<NotificationListener>::end(); ++it)
+        {
+            // If the notification is a message.
+            if(!isCommand)
+                it->registerNotification(message, sender, notificationMessageType::Value(messageType));
+
+            // If the notification is a command.
+            if(isCommand)
+            {
+                notificationCommand::Value command = str2Command(message);
+                if(command != notificationCommand::none)
+                    it->executeCommand(command, sender);
+            }
+        }
+    }
+
+    /**
+    @brief
+        Helper method. Converts a string into the enum for a command.
+    @param string
+        The string to be converted.
+    @return
+        Returns the corresponding enum, notificationCommand::none if the command doesn't exist.
+    */
+    /*static*/ notificationCommand::Value NotificationListener::str2Command(const std::string& string)
+    {
+        notificationCommand::Value command = notificationCommand::none;
+
+        if(string == NotificationListener::COMMAND_CLEAR)
+            command = notificationCommand::clear;
+
+        return command;
+    }
+
+    /**
+    @brief
+        Helper method. Converts a command enum into its corresponding string.
+    @param command
+        The command to be converted.
+    @return
+        Returns the corresponding string.
+    */
+    /*static*/ const std::string& NotificationListener::command2Str(notificationCommand::Value command)
+    {
+        switch(command)
+        {
+            case notificationCommand::clear:
+                return NotificationListener::COMMAND_CLEAR;
+            default:
+                return NotificationListener::COMMAND_NONE;
+        }
+    }
+    
+}
Index: code/trunk/src/orxonox/interfaces/NotificationListener.h
===================================================================
--- code/trunk/src/orxonox/interfaces/NotificationListener.h	(revision 8521)
+++ code/trunk/src/orxonox/interfaces/NotificationListener.h	(revision 8706)
@@ -21,5 +21,5 @@
  *
  *   Author:
- *      Fabian 'x3n' Landau
+ *      Damian 'Mozork' Frick
  *   Co-authors:
  *      ...
@@ -48,17 +48,45 @@
 namespace orxonox
 {
-    class Notification;
+    // TODO: Document.
+    namespace notificationMessageType
+    {
+        enum Value {
+            info,
+            important
+        };
+    }
+    
+    namespace notificationSendMode
+    {
+        enum Value {
+            local,
+            network,
+            broadcast
+        };
+    }
+    
+    namespace notificationCommand
+    {
+        enum Value {
+            none,
+            clear
+        };
+    }
 
+    // TODO: Update doc.
     /**
     @brief
         NotificationListener interface.
 
-        The NotificationListener interface presents a means to being informed when @ref orxonox::Notification "Notifications" in the target set of this NotificationListener change. (e.g. @ref orxonox::Notification "Notifications" were added or removed)
-        When inheriting from a NotificationListener it is important to register (in the constructor) and unregister (in the destructor) it to and from the @ref orxonox::NotificationManager "NotificationManager".
+        The NotificationListener interface (or more precisely abstract class) presents a means of being informed when a new @ref orxonox::Notification "Notification" is sent.
+        The NotificationListener can be used to send a new notification message (with NotificationListener::sendNotification() ) or a new notification command (with NotificationListener::sendCommand() ). Each NotificationListener is then informed about the new @ref orxonox::Notification "Notification" and can take appropriate action. Currently the only NotificationListener ist the @ref orxonox::NotificationManager "NotificationManager" singleton.
+
+        When inheriting from a NotificationListener it is important to provide an appropriate implementation of registerNotification() and executeCommand().
 
     @author
-        Fabian 'x3n' Landau
-
+        Damian 'Mozork' Frick
+        
     @ingroup Notifications
+    @todo Consistent terminology between message, notification and command.
     */
     class _OrxonoxExport NotificationListener : virtual public OrxonoxClass
@@ -69,20 +97,60 @@
 
             /**
-            @brief Get the senders that are targets of this NotificationListener.
-            @return Returns the set of senders that are targets of this NotificationListener.
+            @brief Sends a Notification with the specified message to the specified client from the specified sender.
+            @param message The message that should be sent.
+            @param sender The sender that sent the notification. Default is 'none'.
+            @param messageType The type of the message, can be either 'info' or 'important'. Default is 'info'.
+            @param sendMode The mode in which the notification is sent, can be 'local' to send the notification to the client where this function is executed, 'network' if the notification is to be sent to the client with the specified clientID, or 'broadcast' if the notification should be sent to all hosts. Default is notificationSendMode::local.
+            @param clientId The id of the client the notification should be sent to. Default is 0.
             */
-            virtual const std::set<std::string> & getTargetsSet(void) = 0;
+            static void sendNotification(const std::string& message, const std::string& sender = NotificationListener::NONE, notificationMessageType::Value messageType = notificationMessageType::info, notificationSendMode::Value sendMode = notificationSendMode::local, unsigned int clientId = 0)
+                { NotificationListener::sendNetworkHelper(message, sender, sendMode, clientId, false, messageType); }
+            /**
+            @brief Sends a specified command to the specified client from the specified sender.
+            @param command The command that should be sent (and later executed).
+            @param sender The sender that sent the notification. Default is 'none'.
+            @param sendMode The mode in which the command is sent, can be 'local' to send the command to the client where this function is executed, 'network' if the command is to be sent to the client with the specified clientID, or 'broadcast' if the command should be sent to all hosts. Default is notificationSendMode::local.
+            @param clientId The id of the client the command should be sent to. Default is 0.
+            */
+            static void sendCommand(const std::string& command, const std::string& sender = NotificationListener::NONE, notificationSendMode::Value sendMode = notificationSendMode::local, unsigned int clientId = 0)
+                { NotificationListener::sendNetworkHelper(command, sender, sendMode, clientId, true); }
 
+            static void sendHelper(const std::string& message, const std::string& sender, bool isCommand = false, unsigned int messageMode = 0); // Helper method to register a notification/execute a command with all NotificationListeners after it has been sent over the network.
+
+            //TODO: Make protected?
+            
             /**
-            @brief Updates the whole NotificationListener.
-                   This is called by the @ref orxonox::NotificationManager "NotificationManager" when the @ref orxonox::Notification "Notifications" have changed so much, that the NotificationListener may have to re-initialize his operations.
+            @brief Registers a notification with the NotificationListener.
+                   This needs to be overloaded by each class inheriting from NotificationListener.
+            @param message The notification's message.
+            @param sender The sender of the notification.
+            @param type The type of the notification.
+            @return Returns true if the notification was successfully registered, false if not.
             */
-            virtual void update(void) = 0;
+            virtual bool registerNotification(const std::string& message, const std::string& sender, notificationMessageType::Value type)
+                { return false; }
             /**
-            @brief Updates the NotificationListener, when a new Notification has come in at the specified time.
-            @param notification A pointer to the @ref orxonox::Notification "Notification".
-            @param time The time the @ref orxonox::Notification "Notification" has come in.
+            @brief Executes a command with the NotificationListener
+                   This needs to be overloaded by each class inheriting from NotificationListener.
+            @param command The command to be executed.
+            @param sender The sender of the command.
+            @return Returns true if the command was successfully executed, false if not.
             */
-            virtual void update(Notification* notification, const std::time_t & time) = 0;
+            virtual bool executeCommand(notificationCommand::Value command, const std::string& sender) { return false; }
+
+        public:
+            
+            static const std::string ALL; //!< Static string to indicate a sender that sends to all NotificationQueues.
+            static const std::string NONE; //!< Static string to indicate a sender that sends to no specific NotificationQueues.
+            
+            //! Commands
+            static const std::string COMMAND_CLEAR;
+            static const std::string COMMAND_NONE;
+            
+        protected:
+            static void sendNetworkHelper(const std::string& message, const std::string& sender, notificationSendMode::Value sendMode, unsigned int clientId, bool isCommand = false, notificationMessageType::Value messageType = notificationMessageType::info); // Helper method to send both notifications and commands over the network.
+
+            static notificationCommand::Value str2Command(const std::string& string); // Helper method. Converts a string into the enum for a command.
+            static const std::string& command2Str(notificationCommand::Value command); // Helper method. Converts a command enum into its corresponding string.
     };
 }
Index: code/trunk/src/orxonox/interfaces/PlayerTrigger.h
===================================================================
--- code/trunk/src/orxonox/interfaces/PlayerTrigger.h	(revision 8521)
+++ code/trunk/src/orxonox/interfaces/PlayerTrigger.h	(revision 8706)
@@ -39,4 +39,5 @@
 
 #include "core/OrxonoxClass.h"
+#include "core/WeakPtr.h"
 
 namespace orxonox
@@ -44,5 +45,5 @@
     /**
     @brief
-        PlayerTrigger is an interface if implemented by a specific trigger can be used to recover the Player (or more precisely the @ref orxonox::Pawn "Pawn") that triggered it.
+        PlayerTrigger is an interface if implemented by a specific trigger can be used to recover the Player (or the @ref orxonox::Pawn "Pawn") that triggered it.
 
     @author
@@ -58,13 +59,20 @@
 
         /**
-        @brief Returns the player that triggered the PlayerTrigger.
+        @brief Returns the Pawn that triggered the PlayerTrigger.
         @return Returns a pointer to the Pawn that triggered the PlayerTrigger.
         */
-        inline Pawn* getTriggeringPlayer(void) const
+        inline Pawn* getTriggeringPawn(void) const
+            { return this->pawn_.get(); }
+
+        /**
+        @brief Returns the player that triggered the PlayerTrigger.
+        @return Returns a pointer to the PlayerInfo that triggered the PlayerTrigger.
+        */
+        inline PlayerInfo* getTriggeringPlayer(void) const
             { return this->player_; }
 
         /**
-        @brief Checks whether the PlayerTrigger normally returns a Pawn.
-        @return Returns true if the PlayerTrigger normally returns a Pawn.
+        @brief Checks whether the PlayerTrigger normally returns a Pawn/PlayerInfo.
+        @return Returns true if the PlayerTrigger normally returns a Pawn/PlayerInfo.
         */
         inline bool isForPlayer(void) const
@@ -76,6 +84,5 @@
         @param player A pointer to the Pawn that triggered the PlayerTrigger.
         */
-        inline void setTriggeringPlayer(Pawn* player)
-           { this->player_ = player; }
+        void setTriggeringPawn(Pawn* pawn);
 
         /**
@@ -87,5 +94,6 @@
 
     private:
-        Pawn* player_; //!< The player that triggered the PlayerTrigger.
+        WeakPtr<PlayerInfo> player_; //!< The player that triggered the PlayerTrigger.
+        WeakPtr<Pawn> pawn_; //!< The Pawn that triggered the PlayerTrigger.
         bool isForPlayer_; //!< Is true when the PlayerTrigger should be set to normally be triggered by Pawns.
 
Index: code/trunk/src/orxonox/items/Engine.cc
===================================================================
--- code/trunk/src/orxonox/items/Engine.cc	(revision 8521)
+++ code/trunk/src/orxonox/items/Engine.cc	(revision 8706)
@@ -35,5 +35,5 @@
 #include "Scene.h"
 #include "worldentities/pawns/SpaceShip.h"
-#include "tools/Shader.h"
+#include "core/Template.h"
 
 namespace orxonox
@@ -47,4 +47,5 @@
         this->ship_ = 0;
         this->shipID_ = OBJECTID_UNKNOWN;
+        this->relativePosition_ = Vector3(0,0,0);
 
         this->boostFactor_ = 1.5;
@@ -62,6 +63,4 @@
         this->accelerationUpDown_ = 0.0;
 
-        this->boostBlur_ = 0;
-
         this->speedAdd_ = 0.0;
         this->speedMultiply_ = 1.0;
@@ -73,10 +72,8 @@
     Engine::~Engine()
     {
-        if (this->isInitialized() && this->ship_)
-        {
-            this->ship_->setEngine(0);
-
-            if (this->boostBlur_)
-                this->boostBlur_->destroy();
+        if (this->isInitialized())
+        {
+            if (this->ship_ && this->ship_->hasEngine(this))
+                this->ship_->removeEngine(this);
         }
     }
@@ -98,13 +95,11 @@
         XMLPortParam(Engine, "accelerationleftright", setAccelerationLeftRight, setAccelerationLeftRight, xmlelement, mode);
         XMLPortParam(Engine, "accelerationupdown",    setAccelerationUpDown,    setAccelerationUpDown,    xmlelement, mode);
+
+        XMLPortParam(Engine, "position", setRelativePosition, getRelativePosition, xmlelement, mode);
+        XMLPortParam(Engine, "template", setEngineTemplate, getEngineTemplate, xmlelement, mode);
     }
 
     void Engine::setConfigValues()
     {
-        SetConfigValueExternal(bEnableMotionBlur_, "GraphicsSettings", "enableMotionBlur", true)
-            .description("Enable or disable the motion blur effect when moving very fast")
-            .callback(this, &Engine::changedEnableMotionBlur);
-        SetConfigValueExternal(blurStrength_, "GraphicsSettings", "blurStrength", 3.0f)
-            .description("Defines the strength of the motion blur effect");
     }
 
@@ -163,5 +158,9 @@
         SUPER(Engine, tick, dt);
 
-        const Vector3& direction = this->getDirection();
+        Vector3 direction = this->getDirection();
+        float directionLength = direction.length();
+        if (directionLength > 1.0f)
+            direction /= directionLength; // normalize
+        
         Vector3 velocity = this->ship_->getLocalVelocity();
         Vector3 acceleration = Vector3::ZERO;
@@ -202,22 +201,13 @@
         }
 
-        this->ship_->setAcceleration(this->ship_->getOrientation() * (acceleration*this->getSpeedMultiply()+Vector3(0,0,-this->getSpeedAdd())));
-
-        if (!this->ship_->getPermanentBoost())
-            this->ship_->setBoost(false);
-        this->ship_->setSteeringDirection(Vector3::ZERO);
-
-        if (this->bEnableMotionBlur_ && !this->boostBlur_ && this->ship_->hasLocalController() && this->ship_->hasHumanController())
-        {
-            this->boostBlur_ = new Shader(this->ship_->getScene()->getSceneManager());
-            this->boostBlur_->setCompositorName("Radial Blur");
-        }
-
-        if (this->boostBlur_ && this->maxSpeedFront_ != 0 && this->boostFactor_ != 1)
-        {
-            float blur = this->blurStrength_ * clamp((-velocity.z - this->maxSpeedFront_) / ((this->boostFactor_ - 1) * this->maxSpeedFront_), 0.0f, 1.0f);
-
-            this->boostBlur_->setVisible(blur > 0);
-            this->boostBlur_->setParameter(0, 0, "sampleStrength", blur);
+        // NOTE: Bullet always uses global coordinates.
+        this->ship_->addAcceleration(this->ship_->getOrientation() * (acceleration*this->getSpeedMultiply()+Vector3(0,0,-this->getSpeedAdd())), this->ship_->getOrientation() * this->relativePosition_);
+
+        // Hack to reset a temporary variable "direction"
+        this->ship_->oneEngineTickDone();
+        if(!this->ship_->hasEngineTicksRemaining())
+        {
+            this->ship_->setSteeringDirection(Vector3::ZERO);
+            this->ship_->resetEngineTicks();
         }
     }
@@ -226,7 +216,4 @@
     {
         SUPER(Engine, changedActivity);
-
-        if (this->boostBlur_)
-            this->boostBlur_->setVisible(this->isVisible());
     }
 
@@ -238,12 +225,6 @@
         {
             this->shipID_ = ship->getObjectID();
-            if (ship->getEngine() != this)
-                ship->setEngine(this);
-
-            if (this->boostBlur_)
-            {
-                this->boostBlur_->destroy();
-                this->boostBlur_ = 0;
-            }
+            if (!ship->hasEngine(this))
+                ship->addEngine(this);
         }
     }
@@ -267,10 +248,14 @@
     }
 
-    void Engine::changedEnableMotionBlur()
-    {
-        if (!this->bEnableMotionBlur_)
-        {
-            this->boostBlur_->destroy();
-            this->boostBlur_ = 0;
+    void Engine::loadEngineTemplate()
+    {
+        if(!this->engineTemplate_.empty())
+        {
+            COUT(4)<<"Loading an engine template: "<<this->engineTemplate_<<"\n";
+            Template *temp = Template::getTemplate(this->engineTemplate_);
+            if(temp)
+            {
+                this->addTemplate(temp);
+            }
         }
     }
Index: code/trunk/src/orxonox/items/Engine.h
===================================================================
--- code/trunk/src/orxonox/items/Engine.h	(revision 8521)
+++ code/trunk/src/orxonox/items/Engine.h	(revision 8706)
@@ -54,4 +54,9 @@
             inline SpaceShip* getShip() const
                 { return this->ship_; }
+
+            inline void setRelativePosition(const Vector3 &position)
+                { this->relativePosition_ = position; }
+            inline Vector3& getRelativePosition()
+                { return this->relativePosition_; }
 
             inline void setBoostFactor(float factor)
@@ -119,16 +124,26 @@
                 { this->speedMultiply_=speedMultiply; }
 
+            
+            inline void setEngineTemplate(const std::string& temp)
+                { this->engineTemplate_ = temp; this->loadEngineTemplate(); }
+            inline const std::string& getEngineTemplate() const
+                { return this->engineTemplate_; }
+
         protected:
             virtual std::vector<PickupCarrier*>* getCarrierChildren(void) const
                 { return new std::vector<PickupCarrier*>(); }
             virtual PickupCarrier* getCarrierParent(void) const;
+            
+            void loadEngineTemplate();
 
         private:
             void registerVariables();
             void networkcallback_shipID();
-            void changedEnableMotionBlur();
+
+            std::string engineTemplate_;
 
             SpaceShip* ship_;
             unsigned int shipID_;
+            Vector3 relativePosition_;
 
             float boostFactor_;
@@ -148,8 +163,4 @@
             float accelerationLeftRight_;
             float accelerationUpDown_;
-
-            Shader* boostBlur_;
-            float blurStrength_;
-            bool bEnableMotionBlur_;
     };
 }
Index: code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 8521)
+++ code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 8706)
@@ -137,4 +137,5 @@
         XMLPortParam(OrxonoxOverlay, "correctaspect", setAspectCorrection,   getAspectCorrection,   xmlelement, mode);
         XMLPortParam(OrxonoxOverlay, "background",    setBackgroundMaterial, getBackgroundMaterial, xmlelement, mode);
+        XMLPortParam(OrxonoxOverlay, "backgroundtex", setBackgroundTexture,  getBackgroundTexture,  xmlelement, mode);
     }
 
@@ -163,4 +164,32 @@
         if (this->background_)
             return this->background_->getMaterialName();
+        else
+            return BLANKSTRING;
+    }
+
+    //! Sets the background texture name and creates a new material if necessary
+    void OrxonoxOverlay::setBackgroundTexture(const std::string& texture)
+    {
+        if (this->background_ && this->background_->getMaterial().isNull() && !texture.empty())
+        {
+            // create new material
+            const std::string& materialname = "generated_material" + getUniqueNumberString();
+            Ogre::MaterialPtr material = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().create(materialname, "General"));
+            material->getTechnique(0)->getPass(0)->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
+            Ogre::TextureUnitState* textureUnitState_ = material->getTechnique(0)->getPass(0)->createTextureUnitState();
+            textureUnitState_->setTextureName(texture);
+            textureUnitState_->setNumMipmaps(0);
+            this->background_->setMaterialName(materialname);
+        }
+    }
+
+    //! Returns the the texture name of the background
+    const std::string& OrxonoxOverlay::getBackgroundTexture() const
+    {
+        if (this->background_)
+        {
+            Ogre::TextureUnitState* tempTx = this->background_->getMaterial()->getTechnique(0)->getPass(0)->getTextureUnitState(0);
+            return tempTx->getTextureName();
+        }
         else
             return BLANKSTRING;
@@ -406,8 +435,16 @@
     }
 
-    void OrxonoxOverlay::setBackgroundAlpha(float alpha) {
+    void OrxonoxOverlay::setBackgroundAlpha(float alpha)
+    {
         Ogre::MaterialPtr ptr = this->background_->getMaterial();
         Ogre::TextureUnitState* tempTx = ptr->getTechnique(0)->getPass(0)->getTextureUnitState(0);
         tempTx->setAlphaOperation(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, alpha);
     }
+
+    void OrxonoxOverlay::setBackgroundColour(ColourValue colour)
+    {
+        Ogre::MaterialPtr ptr = this->background_->getMaterial();
+        Ogre::TextureUnitState* tempTx = ptr->getTechnique(0)->getPass(0)->getTextureUnitState(0);
+        tempTx->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, colour);
+    }
 }
Index: code/trunk/src/orxonox/overlays/OrxonoxOverlay.h
===================================================================
--- code/trunk/src/orxonox/overlays/OrxonoxOverlay.h	(revision 8521)
+++ code/trunk/src/orxonox/overlays/OrxonoxOverlay.h	(revision 8706)
@@ -160,5 +160,10 @@
         const std::string& getBackgroundMaterial() const;
 
+        void setBackgroundTexture(const std::string& texture);
+        const std::string& getBackgroundTexture() const;
+
         void setBackgroundAlpha(float alpha);
+
+        void setBackgroundColour(ColourValue colour);
 
         virtual void changedVisibility();
Index: code/trunk/src/orxonox/sound/AmbientSound.cc
===================================================================
--- code/trunk/src/orxonox/sound/AmbientSound.cc	(revision 8521)
+++ code/trunk/src/orxonox/sound/AmbientSound.cc	(revision 8706)
@@ -82,5 +82,5 @@
     {
         this->ambientSource_ = source;
-        this->moodChanged(this->getMood());
+        this->moodChanged(MoodManager::getInstance().getMood());
     }
 
@@ -89,5 +89,5 @@
         if (GameMode::playsSound())
         {
-            const std::string& path = "ambient/" + MoodManager::getInstance().getMood() + '/' + this->ambientSource_;
+            const std::string& path = "ambient/" + mood + '/' + this->ambientSource_;
             shared_ptr<ResourceInfo> fileInfo = Resource::getInfo(path);
             if (fileInfo != NULL)
Index: code/trunk/src/orxonox/weaponsystem/Munition.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/Munition.cc	(revision 8521)
+++ code/trunk/src/orxonox/weaponsystem/Munition.cc	(revision 8706)
@@ -253,4 +253,6 @@
     bool Munition::canAddMunition(unsigned int amount) const
     {
+        // TODO: 'amount' is not used
+
         if (!this->bAllowMunitionRefilling_)
             return false;
@@ -334,4 +336,6 @@
     bool Munition::canAddMagazines(unsigned int amount) const
     {
+        // TODO: 'amount' is not used
+
         if (this->bStackMunition_)
             // If we stack munition, we can always add new magazines because they contribute directly to the munition
Index: code/trunk/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponMode.cc	(revision 8521)
+++ code/trunk/src/orxonox/weaponsystem/WeaponMode.cc	(revision 8706)
@@ -66,4 +66,6 @@
 
         this->damage_ = 0;
+        this->healthdamage_ = 0;
+        this->shielddamage_ = 0;
 
         this->muzzleOffset_ = Vector3::ZERO;
@@ -106,4 +108,6 @@
 
         XMLPortParam(WeaponMode, "damage",           setDamage,           getDamage,           xmlelement, mode);
+        XMLPortParam(WeaponMode, "healthdamage",     setHealthDamage,     getHealthDamage,     xmlelement, mode);
+        XMLPortParam(WeaponMode, "shielddamage",     setShieldDamage,     getShieldDamage,     xmlelement, mode);
         XMLPortParam(WeaponMode, "muzzleoffset",     setMuzzleOffset,     getMuzzleOffset,     xmlelement, mode);
     }
Index: code/trunk/src/orxonox/weaponsystem/WeaponMode.h
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponMode.h	(revision 8521)
+++ code/trunk/src/orxonox/weaponsystem/WeaponMode.h	(revision 8706)
@@ -104,7 +104,16 @@
             // Fire
             inline void setDamage(float damage)
-                { this->damage_ = damage; }
+                { this->damage_ = damage;}
             inline float getDamage() const
                 { return this->damage_; }
+            inline void setHealthDamage(float healthdamage)
+                { this->healthdamage_ = healthdamage; }
+            inline float getHealthDamage() const
+                { return this->healthdamage_; }
+
+            inline void setShieldDamage(float shielddamage)
+                { this->shielddamage_ = shielddamage;}
+            inline float getShieldDamage() const
+                { return this->shielddamage_; }
 
             inline void setMuzzleOffset(const Vector3& offset)
@@ -146,4 +155,6 @@
 
             float damage_;
+            float healthdamage_;
+            float shielddamage_;
             Vector3 muzzleOffset_;
 
Index: code/trunk/src/orxonox/weaponsystem/WeaponSlot.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponSlot.cc	(revision 8521)
+++ code/trunk/src/orxonox/weaponsystem/WeaponSlot.cc	(revision 8706)
@@ -46,5 +46,5 @@
         this->weapon_ = 0;
 
-        this->setSyncMode(0x0);
+        this->setSyncMode(ObjectDirection::None);
     }
 
Index: code/trunk/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/worldentities/CMakeLists.txt	(revision 8521)
+++ code/trunk/src/orxonox/worldentities/CMakeLists.txt	(revision 8706)
@@ -12,5 +12,4 @@
   SpawnPoint.cc
   TeamSpawnPoint.cc
-  SpaceBoundaries.cc
 )
 
Index: code/trunk/src/orxonox/worldentities/CameraPosition.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/CameraPosition.cc	(revision 8521)
+++ code/trunk/src/orxonox/worldentities/CameraPosition.cc	(revision 8706)
@@ -46,5 +46,5 @@
         this->bRenderCamera_ = false;
 
-        this->setSyncMode(0x0);
+        this->setSyncMode(ObjectDirection::None);
     }
 
Index: code/trunk/src/orxonox/worldentities/ControllableEntity.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/ControllableEntity.cc	(revision 8521)
+++ code/trunk/src/orxonox/worldentities/ControllableEntity.cc	(revision 8706)
@@ -84,5 +84,4 @@
         this->client_angular_velocity_ = Vector3::ZERO;
 
-
         this->setConfigValues();
         this->setPriority( Priority::VeryHigh );
@@ -121,5 +120,5 @@
 
         XMLPortParam(ControllableEntity, "hudtemplate", setHudTemplate, getHudTemplate, xmlelement, mode);
-        XMLPortParam(ControllableEntity, "camerapositiontemplate", setCameraPositionTemplate, getCameraPositionTemkplate, xmlelement, mode);
+        XMLPortParam(ControllableEntity, "camerapositiontemplate", setCameraPositionTemplate, getCameraPositionTemplate, xmlelement, mode);
 
         XMLPortObject(ControllableEntity, CameraPosition, "camerapositions", addCameraPosition, getCameraPosition, xmlelement, mode);
@@ -171,4 +170,38 @@
         }
         return 0;
+    }
+
+    unsigned int ControllableEntity::getCurrentCameraIndex() const
+    {
+        if (this->cameraPositions_.size() <= 0)
+            return 0;
+
+        unsigned int counter = 0;
+        for (std::list<SmartPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
+        {
+            if ((*it) == this->currentCameraPosition_)
+                break;
+            counter++;
+        }
+        if (counter >= this->cameraPositions_.size())
+            return 0;
+
+        return counter;
+    }
+    
+    bool ControllableEntity::setCameraPosition(unsigned int index)
+    {
+        if(this->camera_ != NULL && this->cameraPositions_.size() > 0)
+        {
+            if(index >= this->cameraPositions_.size())
+                index = 0;
+
+            CameraPosition* position = this->getCameraPosition(index);
+            position->attachCamera(this->camera_);
+            this->currentCameraPosition_ = position;
+            return true;
+        }
+
+        return false;
     }
 
@@ -373,4 +406,10 @@
         }
 
+        this->createHud();
+    }
+
+    // HACK-ish
+    void ControllableEntity::createHud(void)
+    {
         if (!this->hud_ && GameMode::showsGraphics())
         {
@@ -381,4 +420,13 @@
                 this->hud_->setOwner(this);
             }
+        }
+    }
+
+    void ControllableEntity::destroyHud(void)
+    {
+        if (this->hud_ != NULL)
+        {
+            this->hud_->destroy();
+            this->hud_ = NULL;
         }
     }
Index: code/trunk/src/orxonox/worldentities/ControllableEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/ControllableEntity.h	(revision 8521)
+++ code/trunk/src/orxonox/worldentities/ControllableEntity.h	(revision 8706)
@@ -93,5 +93,11 @@
             virtual void reload() {}
 
-            virtual void boost() {}
+            /**
+            @brief Tells the ControllableEntity to either start or stop boosting.
+                   This doesn't mean, that the ControllableEntity will do so, there might be additional restrictions on boosting, but if it can, then it will.
+            @param bBoost If true the ControllableEntity is told to start boosting, if false it is told to stop.
+            */
+            virtual void boost(bool bBoost) {}
+            
             virtual void greet() {}
             virtual void switchCamera();
@@ -110,8 +116,10 @@
             inline const std::list<SmartPtr<CameraPosition> >& getCameraPositions() const
                 { return this->cameraPositions_; }
+            unsigned int getCurrentCameraIndex() const;
+            bool setCameraPosition(unsigned int index);
 
             inline void setCameraPositionTemplate(const std::string& name)
                 { this->cameraPositionTemplate_ = name; }
-            inline const std::string& getCameraPositionTemkplate() const
+            inline const std::string& getCameraPositionTemplate() const
                 { return this->cameraPositionTemplate_; }
 
@@ -168,4 +176,7 @@
             inline void setHudTemplate(const std::string& name)
                 { this->hudtemplate_ = name; }
+            // HACK-ish
+            void createHud(void);
+            void destroyHud(void);
 
             Ogre::SceneNode* cameraPositionRootNode_;
Index: code/trunk/src/orxonox/worldentities/MobileEntity.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/MobileEntity.cc	(revision 8521)
+++ code/trunk/src/orxonox/worldentities/MobileEntity.cc	(revision 8706)
@@ -143,7 +143,18 @@
     {
         if (this->isDynamic())
+        {
             this->physicalBody_->applyCentralForce(btVector3(acceleration.x * this->getMass(), acceleration.y * this->getMass(), acceleration.z * this->getMass()));
-
+        }
+
+        // If not bullet-managed (deprecated? SpaceShip doesn't use this anymore for movement)
         this->linearAcceleration_ = acceleration;
+    }
+
+    void MobileEntity::addAcceleration(const Vector3 &acceleration, const Vector3 &relativePosition)
+    {
+        if(this->isDynamic())
+        {
+            this->physicalBody_->applyForce(this->getMass() * btVector3(acceleration.x, acceleration.y, acceleration.z), btVector3(relativePosition.x, relativePosition.y, relativePosition.z));
+        }
     }
 
Index: code/trunk/src/orxonox/worldentities/MobileEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/MobileEntity.h	(revision 8521)
+++ code/trunk/src/orxonox/worldentities/MobileEntity.h	(revision 8706)
@@ -70,4 +70,10 @@
                 { return this->linearAcceleration_; }
 
+            // Added for making N engines work with spaceships
+            void addAcceleration(const Vector3& acceleration, const Vector3 &relativePosition);
+            inline void addAcceleration(float x, float y, float z)
+                { this->addAcceleration(Vector3(x, y, z), Vector3(0,0,0)); }
+            // Getter function above
+
             void setAngularAcceleration(const Vector3& acceleration);
             inline void setAngularAcceleration(float x, float y, float z)
@@ -83,5 +89,5 @@
                 { this->setAngularVelocity(this->getAngularVelocity().normalisedCopy() * rate.valueRadians()); }
             inline Degree getRotationRate() const
-                { return Degree(this->getAngularVelocity().length()); }
+                { return Radian(this->getAngularVelocity().length()); }
 
             inline void setRotationAxis(const Vector3& axis)
Index: code/trunk/src/orxonox/worldentities/SpaceBoundaries.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/SpaceBoundaries.cc	(revision 8521)
+++ 	(revision )
@@ -1,300 +1,0 @@
-/*
- *   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:
- *      Maurus Kaufmann
- *   Co-authors:
- *      ...
- *
- */
-
-#include "SpaceBoundaries.h"
-
-#include "worldentities/MobileEntity.h"
-#include "worldentities/ControllableEntity.h"
-#include "core/ObjectListIterator.h"
-#include "core/XMLPort.h"
-#include "worldentities/pawns/Pawn.h"
-#include "infos/PlayerInfo.h"
-#include "interfaces/RadarViewable.h"
-#include "graphics/Billboard.h"
-
-namespace orxonox
-{
-    CreateFactory(SpaceBoundaries);
-
-    SpaceBoundaries::SpaceBoundaries(BaseObject* creator) : StaticEntity(creator)
-    {
-        /* Standardwerte, die zum Tragen kommen,
-         * falls im XML-File keine Werte spezifiziert wurden. */
-        this->setMaxDistance(3000);
-        this->setWarnDistance(2000);
-        this->setShowDistance(2500);
-        this->setHealthDecrease(1);
-        this->setReaction(0);
-        
-        RegisterObject(SpaceBoundaries);
-        
-        // Show Boundaries on the radar.
-        this->centerRadar_ = new RadarViewable(this, this);
-        this->centerRadar_->setRadarObjectShape(RadarViewable::Dot);
-        this->centerRadar_->setRadarVisibility(false);
-    }
-    SpaceBoundaries::~SpaceBoundaries()
-    {
-        if (this->isInitialized())
-        {
-            delete this->centerRadar_;
-        
-            this->pawnsIn_.clear();
-        
-            for( std::vector<billboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++)
-            {
-                if( current->billy != NULL)
-                {
-                    delete current->billy;
-                }
-            }
-            this->billboards_.clear();
-        }
-    }
-    
-    void SpaceBoundaries::checkWhoIsIn()
-    {
-        pawnsIn_.clear();
-        for(ObjectListIterator<Pawn> current = ObjectList<Pawn>::begin(); current != ObjectList<Pawn>::end(); ++current)
-        {
-            Pawn* currentPawn = *current;
-            float distance = this->computeDistance(currentPawn);
-            if(distance <= this->maxDistance_)
-            {
-                pawnsIn_.push_back(currentPawn);
-            }
-        }
-    }
-    
-    void SpaceBoundaries::positionBillboard(const Vector3 position)
-    {
-        std::vector<billboardAdministration>::iterator current;
-        for( current = this->billboards_.begin(); current != this->billboards_.end(); current++)
-        {
-            if(!current->usedYet)
-            {
-                break;
-            }
-        }
-        if( current == this->billboards_.end() )
-        {
-            Billboard *tmp = new Billboard(this);
-            this->setBillboardOptions( tmp );
-            tmp->setPosition(position);
-            billboardAdministration tmp2 = { true, tmp };
-            this->billboards_.push_back( tmp2 );
-            
-        } else {
-            current->billy->setPosition(position);
-            current->billy->setVisible(true);
-            current->usedYet = true;
-        }
-    }
-    
-    void SpaceBoundaries::setBillboardOptions(Billboard *billy)
-    {
-        if(billy != NULL)
-        {
-            billy->setMaterial("Shield");
-            billy->setVisible(true);
-        }
-    }
-    
-    void SpaceBoundaries::removeAllBillboards()
-    {
-        for( std::vector<billboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++ )
-        {
-            current->usedYet = false;
-            current->billy->setVisible(false);
-        }
-    }
-    
-    void SpaceBoundaries::setMaxDistance(float r)
-    {
-        this->maxDistance_ = r;
-    }
-    float SpaceBoundaries::getMaxDistance()
-    {
-        return this->maxDistance_;
-    }
-    
-    void SpaceBoundaries::setWarnDistance(float r)
-    {
-        this->warnDistance_ = r;
-    }
-    float SpaceBoundaries::getWarnDistance()
-    {
-        return this->warnDistance_;
-    }
-    
-    void SpaceBoundaries::setShowDistance(float r)
-    {
-        this->showDistance_ = r;
-    }
-    float SpaceBoundaries::getShowDistance()
-    {
-        return this->showDistance_;
-    }
-    
-    void SpaceBoundaries::setHealthDecrease(float amount)
-    {
-        this->healthDecrease_ = amount/1000;
-    }
-    float SpaceBoundaries::getHealthDecrease()
-    {
-        return this->healthDecrease_;
-    }
-    
-    void SpaceBoundaries::setReaction(int mode)
-    {
-        this->reaction_ = mode;
-    }
-    int SpaceBoundaries::getReaction()
-    {
-        return this->reaction_;
-    }
-
-    void SpaceBoundaries::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(SpaceBoundaries, XMLPort, xmlelement, mode);
-
-        XMLPortParam(SpaceBoundaries, "maxDistance", setMaxDistance, getMaxDistance, xmlelement, mode);
-        XMLPortParam(SpaceBoundaries, "warnDistance", setWarnDistance, getWarnDistance, xmlelement, mode);
-        XMLPortParam(SpaceBoundaries, "healthDecrease", setHealthDecrease, getHealthDecrease, xmlelement, mode);
-        XMLPortParam(SpaceBoundaries, "reactionMode", setReaction, getReaction, xmlelement, mode);
-    }
-    
-    void SpaceBoundaries::tick(float dt)
-    {
-        this->checkWhoIsIn();
-        this->removeAllBillboards();
-        //COUT(0) << "Groesse der Liste: " << (int) pawnsIn_.size() << std::endl;
-        
-        float distance;
-        bool humanItem;
-        for( std::list<WeakPtr<Pawn> >::iterator current = pawnsIn_.begin(); current != pawnsIn_.end(); current++ )
-        {
-            Pawn* currentPawn = current->get();
-            if( currentPawn && currentPawn->getNode() ) 
-            {
-                distance = this->computeDistance(currentPawn);
-                humanItem = this->isHumanPlayer(currentPawn);
-                //COUT(0) << "Distanz:" << distance << std::endl; // message for debugging
-                if(distance > this->warnDistance_ && distance < this->maxDistance_) // Zeige Warnung an!
-                {
-                    //COUT(0) << "You are near by the boundaries!" << std::endl; // message for debugging
-                    if(humanItem)
-                    {
-                        //COUT(0) << "humanItem ist true" << std::endl;
-                        this->displayWarning("Attention! You are near by the boundaries!");
-                    }
-                }
-                if( (this->maxDistance_ - distance) < this->showDistance_ )
-                {
-                    this->displayBoundaries(currentPawn); // Zeige Grenze an!
-                }
-                if(distance > this->maxDistance_ && (this->reaction_ == 1) )
-                {
-                    if( humanItem )
-                    {
-                        //COUT(0) << "Health should be decreasing!" << std::endl;
-                        this->displayWarning("You are out of the area now!");
-                    }
-                    currentPawn->removeHealth( (distance - this->maxDistance_) * this->healthDecrease_);
-                }
-                if( (this->reaction_ == 0) && (distance + 100 > this->maxDistance_)) // Annahme: Ein Pawn kann von einem Tick bis zum nächsten nicht mehr als 100 Distanzeinheiten zurücklegen.
-                {
-                    this->conditionalBounceBack(currentPawn, distance, dt);
-                }
-            }
-        }
-    }
-    
-    float SpaceBoundaries::computeDistance(WorldEntity *item)
-    {
-        if(item != NULL)
-        {
-            Vector3 itemPosition = item->getPosition();
-            return (itemPosition.distance(this->getPosition()));
-        } else {
-            return -1;
-        }
-    }
-    
-    void SpaceBoundaries::displayWarning(const std::string warnText)
-    {   
-        
-    }
-    
-    void SpaceBoundaries::displayBoundaries(Pawn *item)
-    {
-        
-        Vector3 direction = item->getPosition() - this->getPosition();
-        direction.normalise();
-        
-        Vector3 boundaryPosition = this->getPosition() + direction * this->maxDistance_;
-        
-        this->positionBillboard(boundaryPosition);
-    }
-    
-    void SpaceBoundaries::conditionalBounceBack(Pawn *item, float currentDistance, float dt)
-    {
-        Vector3 normal = item->getPosition() - this->getPosition();
-        normal.normalise();
-        Vector3 velocity = item->getVelocity();
-        float normalSpeed = item->getVelocity().dotProduct(normal);
-        
-        /* Checke, ob das Pawn innerhalb des nächsten Ticks, das erlaubte Gebiet verlassen würde.
-           Falls ja: Spicke es zurück. */
-        if( currentDistance + normalSpeed * dt > this->maxDistance_ )
-        {
-            float dampingFactor = 0.5;
-            velocity = velocity.reflect(normal);
-            Vector3 acceleration = item->getAcceleration();
-            acceleration = acceleration.reflect(normal);
-            
-            item->lookAt( velocity + this->getPosition() );
-            
-            item->setAcceleration(acceleration * dampingFactor);
-            item->setVelocity(velocity * dampingFactor);
-        }
-    }
-    
-    bool SpaceBoundaries::isHumanPlayer(Pawn *item)
-    {
-        if(item != NULL)
-        {
-            if(item->getPlayer())
-            {
-                return item->getPlayer()->isHumanPlayer();
-            }
-        }
-        return false;
-    }
-    
-}
Index: code/trunk/src/orxonox/worldentities/SpaceBoundaries.h
===================================================================
--- code/trunk/src/orxonox/worldentities/SpaceBoundaries.h	(revision 8521)
+++ 	(revision )
@@ -1,129 +1,0 @@
-/*
- *   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:
- *      Maurus Kaufmann
- *   Co-authors:
- *      ...
- *
- */
- 
- /* TODO:   - Textmessages und Billboards sollen teils nur bei einem humanPlayer angezeigt werden, nicht bei allen (vgl. Netzwerk-Spiel mit mehreren humanPlayers)
-                beachte hierzu folgende statische Funktion: 'static unsigned int  Host::getPlayerID()'
-                (file:///home/kmaurus/orxonox/spaceBoundaries/build/doc/api/html/classorxonox_1_1_host.html#9c1e3b39e3b42e467dfbf42902911ce2)
-                
-            - Kommentieren (Betrachte als Beispiel/Vorbild 'libraries/core/WeakPtr.h')
-            
-            - Wiki-SpaceBoundaries-Eintrag aktualisieren
- */
-
-#ifndef _SpaceBoundaries_H__
-#define _SpaceBoundaries_H__
-
-
-#include "core/CoreIncludes.h"
-#include "core/WeakPtr.h"
-#include "tools/interfaces/Tickable.h"
-#include "interfaces/RadarViewable.h"
-#include "worldentities/StaticEntity.h"
-#include "worldentities/WorldEntity.h"
-
-#include <string>
-#include <list>
-#include <map>
-#include <vector>
-
-namespace orxonox
-{
-
-/**
-@brief SpaceBoundaries gives level creators the possibility to bar Pawns from leaving a defined area (until now this area is a ball).
-
-       Five attributes can/should be defined in the XML-File:
-       - 'warnDistance' : If the distance between the pawn of the human player and 'position' is bigger than 'warnDistance', a message is displayed to
-                          inform the player that he'll soon be leaving the allowed area. 
-       - 'maxDistance' : defines the area, where a pawn is allowed to be (radius of a ball).
-       - 'showDistance' : If the distance between the pawn and the boundary of the allowed area is smaller than 'showDistance', the boundary is shown. 
-       - 'healthDecrease' : a measure to define how fast the health of a pawn should decrease after leaving the allowed area (unnecessary if 'reactionMode' == 0).
-                            Recommended values: 0.1 (slow health decrease) to 5 (very fast health decrease)
-       - 'reactionMode' : Integer-Value. Defines what effect appears if a space ship has crossed the boundaries.
-                            0: Reflect the space ship (default).
-                            1: Decrease Health of the space ship after having left the allowed area.
-*/
-
-    class _OrxonoxExport SpaceBoundaries : public StaticEntity, public Tickable
-    {
-        public:
-            SpaceBoundaries(BaseObject* creator);
-            ~SpaceBoundaries();
-            
-            void checkWhoIsIn(); //!< Update the list 'pawnsIn_'.
-            
-            void positionBillboard(const Vector3 position); //!< Display a Billboard at the position 'position'.
-            void setBillboardOptions(Billboard *billy);
-            void removeAllBillboards(); //!< Hide all all elements of '*billboard_' and set their attribute 'usedYet' to 0.
-            
-            void setMaxDistance(float r);
-            float getMaxDistance();
-            
-            void setWarnDistance(float r);
-            float getWarnDistance();
-            
-            void setShowDistance(float r);
-            float getShowDistance();
-            
-            void setHealthDecrease(float amount);
-            float getHealthDecrease();
-            
-            void setReaction(int mode);
-            int getReaction();
-
-            void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            
-            void tick(float dt);
-
-        private:
-            struct billboardAdministration{ bool usedYet; Billboard* billy; };
-            
-            std::list<WeakPtr<Pawn> > pawnsIn_; //!< List of the pawns that this instance of SpaceBoundaries has to handle.
-            
-            std::vector<billboardAdministration> billboards_;
-        
-            int reaction_; //!< Werte: 0, 1. 0: Reflektion an Boundaries (Standard). 1: Health-Abzug-Modus.
-            float maxDistance_; //!< maximal zulaessige Entfernung von 'this->getPosition()'.
-            float warnDistance_; //!< Entfernung von 'this->getPosition()', ab der eine Warnung angezeigt wird, dass man bald das zulaessige Areal verlaesst.
-            float showDistance_; //!< Definiert, wann die Grenzen visualisiert werden sollen.
-            
-            float healthDecrease_; //!< Mass fuer die Anzahl Health-Points, die nach ueberschreiten der Entfernung 'maxDistance_' von 'this->getPosition()' abgezogen werden.
-                                   //!< Empfohlene Werte: 0.1 (langsame Health-Verminderung) bis 5 (sehr schnelle Health-Verminderung)
-            
-            RadarViewable* centerRadar_; //!< Repraesentation von SpaceBoundaries auf dem Radar.
-        
-            float computeDistance(WorldEntity *item); //!< Auf den Mittelpunkt 'this->getPosition()' bezogen.
-            void displayWarning(const std::string warnText);
-            void displayBoundaries(Pawn *item);
-            void conditionalBounceBack(Pawn *item, float currentDistance, float dt);
-            bool isHumanPlayer(Pawn *item);
-            
-    };
-}
-
-#endif /* _SpaceBoundaries_H__ */
Index: code/trunk/src/orxonox/worldentities/SpawnPoint.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/SpawnPoint.cc	(revision 8521)
+++ code/trunk/src/orxonox/worldentities/SpawnPoint.cc	(revision 8706)
@@ -50,5 +50,5 @@
             COUT(1) << "Error: SpawnPoint has no Gametype" << std::endl;
 
-        this->setSyncMode(0x0);
+        this->setSyncMode(ObjectDirection::None);
     }
 
Index: code/trunk/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/WorldEntity.cc	(revision 8521)
+++ code/trunk/src/orxonox/worldentities/WorldEntity.cc	(revision 8706)
@@ -642,13 +642,10 @@
     void WorldEntity::setScale3D(const Vector3& scale)
     {
-/*
-HACK HACK HACK
-        if (bScalePhysics && this->hasPhysics() && scale != Vector3::UNIT_SCALE)
-        {
-            CCOUT(2) << "Warning: Cannot set the scale of a physical object: Not yet implemented. Ignoring scaling." << std::endl;
-            return;
-        }
-HACK HACK HACK
-*/
+        // If physics is enabled scale the attached CollisionShape.
+        /*if (this->hasPhysics() && this->collisionShape_ != NULL)
+        {
+            this->collisionShape_->setScale3D(scale);
+        }*/
+
         this->node_->setScale(scale);
 
Index: code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	(revision 8521)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	(revision 8706)
@@ -23,5 +23,5 @@
  *      Fabian 'x3n' Landau
  *   Co-authors:
- *      ...
+ *      Simon Miescher
  *
  */
@@ -64,6 +64,13 @@
         this->maxHealth_ = 0;
         this->initialHealth_ = 0;
+
         this->shieldHealth_ = 0;
+        this->initialShieldHealth_ = 0;
+        this->maxShieldHealth_ = 100; //otherwise shield might increase to float_max
         this->shieldAbsorption_ = 0.5;
+
+        this->reloadRate_ = 0;
+        this->reloadWaitTime_ = 1.0f;
+        this->reloadWaitCountdown_ = 0;
 
         this->lastHitOriginator_ = 0;
@@ -109,4 +116,6 @@
 
         XMLPortParam(Pawn, "shieldhealth", setShieldHealth, getShieldHealth, xmlelement, mode).defaultValues(0);
+        XMLPortParam(Pawn, "initialshieldhealth", setInitialShieldHealth, getInitialShieldHealth, xmlelement, mode).defaultValues(0);
+        XMLPortParam(Pawn, "maxshieldhealth", setMaxShieldHealth, getMaxShieldHealth, xmlelement, mode).defaultValues(100);
         XMLPortParam(Pawn, "shieldabsorption", setShieldAbsorption, getShieldAbsorption, xmlelement, mode).defaultValues(0);
 
@@ -118,4 +127,7 @@
         XMLPortObject(Pawn, WeaponSet, "weaponsets", addWeaponSet, getWeaponSet, xmlelement, mode);
         XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPackXML, getWeaponPack, xmlelement, mode);
+
+        XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0);
+        XMLPortParam(Pawn, "reloadwaittime", setReloadWaitTime, getReloadWaitTime, xmlelement, mode).defaultValues(1.0f);
     }
 
@@ -124,6 +136,7 @@
         registerVariable(this->bAlive_,           VariableDirection::ToClient);
         registerVariable(this->health_,           VariableDirection::ToClient);
-        registerVariable(this->initialHealth_,    VariableDirection::ToClient);
+        registerVariable(this->maxHealth_,        VariableDirection::ToClient);
         registerVariable(this->shieldHealth_,     VariableDirection::ToClient);
+        registerVariable(this->maxShieldHealth_,  VariableDirection::ToClient);
         registerVariable(this->shieldAbsorption_, VariableDirection::ToClient);
         registerVariable(this->bReload_,          VariableDirection::ToServer);
@@ -137,10 +150,23 @@
         this->bReload_ = false;
 
+        // TODO: use the existing timer functions instead
+        if(this->reloadWaitCountdown_ > 0)
+        {
+            this->decreaseReloadCountdownTime(dt);
+        }
+        else
+        {
+            this->addShieldHealth(this->getReloadRate() * dt);
+            this->resetReloadCountdown();
+        }
+
         if (GameMode::isMaster())
+        {
             if (this->health_ <= 0 && bAlive_)
             {
-                this->fireEvent(); // Event to notify anyone who want's to know about the death.
+                this->fireEvent(); // Event to notify anyone who wants to know about the death.
                 this->death();
             }
+        }
     }
 
@@ -168,60 +194,88 @@
     }
 
+
     void Pawn::setHealth(float health)
     {
-        this->health_ = std::min(health, this->maxHealth_);
-    }
-
-    void Pawn::damage(float damage, Pawn* originator)
+        this->health_ = std::min(health, this->maxHealth_); //Health can't be set to a value bigger than maxHealth, otherwise it will be reduced at first hit
+    }
+
+    void Pawn::setShieldHealth(float shieldHealth)
+    {
+        this->shieldHealth_ = std::min(shieldHealth, this->maxShieldHealth_);
+    }
+
+    void Pawn::setMaxShieldHealth(float maxshieldhealth)
+    {
+        this->maxShieldHealth_ = maxshieldhealth;
+    }
+
+    void Pawn::setReloadRate(float reloadrate)
+    {
+        this->reloadRate_ = reloadrate;
+    }
+
+    void Pawn::setReloadWaitTime(float reloadwaittime)
+    {
+        this->reloadWaitTime_ = reloadwaittime;
+    }
+
+    void Pawn::decreaseReloadCountdownTime(float dt)
+    {
+        this->reloadWaitCountdown_ -= dt;
+    }
+
+    void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator)
     {
         if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
         {
-            //share the dealt damage to the shield and the Pawn.
-            float shielddamage = damage*this->shieldAbsorption_;
-            float healthdamage = damage*(1-this->shieldAbsorption_);
-
-            // In case the shield can not take all the shield damage.
-            if (shielddamage > this->getShieldHealth())
+            if (shielddamage >= this->getShieldHealth())
             {
-                healthdamage += shielddamage-this->getShieldHealth();
                 this->setShieldHealth(0);
+                this->setHealth(this->health_ - (healthdamage + damage));
             }
-
-            this->setHealth(this->health_ - healthdamage);
-
-            if (this->getShieldHealth() > 0)
+            else
             {
                 this->setShieldHealth(this->shieldHealth_ - shielddamage);
+
+                // remove remaining shieldAbsorpton-Part of damage from shield
+                shielddamage = damage * this->shieldAbsorption_;
+                shielddamage = std::min(this->getShieldHealth(),shielddamage);
+                this->setShieldHealth(this->shieldHealth_ - shielddamage);
+
+                // set remaining damage to health
+                this->setHealth(this->health_ - (damage - shielddamage) - healthdamage);
             }
 
             this->lastHitOriginator_ = originator;
-
-            // play damage effect
-        }
-    }
-
-    void Pawn::hit(Pawn* originator, const Vector3& force, float damage)
+        }
+    }
+
+// TODO: Still valid?
+/* HIT-Funktionen
+    Die hit-Funktionen muessen auch in src/orxonox/controllers/Controller.h angepasst werden! (Visuelle Effekte)
+
+*/
+
+    void Pawn::hit(Pawn* originator, const Vector3& force, float damage, float healthdamage, float shielddamage)
     {
         if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
         {
-            this->damage(damage, originator);
+            this->damage(damage, healthdamage, shielddamage, originator);
             this->setVelocity(this->getVelocity() + force);
-
-            // play hit effect
-        }
-    }
-
-    void Pawn::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage)
+        }
+    }
+
+
+    void Pawn::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage, float shielddamage)
     {
         if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
         {
-            this->damage(damage, originator);
+            this->damage(damage, healthdamage, shielddamage, originator);
 
             if ( this->getController() )
-                this->getController()->hit(originator, contactpoint, damage);
-
-            // play hit effect
-        }
-    }
+                this->getController()->hit(originator, contactpoint, damage); // changed to damage, why shielddamage?
+        }
+    }
+
 
     void Pawn::kill()
Index: code/trunk/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.h	(revision 8521)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.h	(revision 8706)
@@ -72,8 +72,28 @@
                 { return this->initialHealth_; }
 
-            inline void setShieldHealth(float shieldHealth)
-            { this->shieldHealth_ = shieldHealth; }
+            virtual void setShieldHealth(float shieldHealth);
+
             inline float getShieldHealth()
             { return this->shieldHealth_; }
+
+            inline void addShieldHealth(float amount)
+            { this->setShieldHealth(this->shieldHealth_ + amount); }
+
+            inline bool hasShield()
+            { return (this->getShieldHealth() > 0); }
+
+            virtual void setMaxShieldHealth(float maxshieldhealth);
+            inline float getMaxShieldHealth() const
+                { return this->maxShieldHealth_; }
+
+            inline void setInitialShieldHealth(float initialshieldhealth)
+                { this->initialShieldHealth_ = initialshieldhealth; this->setShieldHealth(initialshieldhealth); }
+            inline float getInitialShieldHealth() const
+                { return this->initialShieldHealth_; }
+
+            inline void restoreInitialShieldHealth()
+                { this->setShieldHealth(this->initialShieldHealth_); }
+            inline void restoreMaxShieldHealth()
+                { this->setShieldHealth(this->maxShieldHealth_); }
 
             inline void setShieldAbsorption(float shieldAbsorption)
@@ -82,9 +102,29 @@
             { return this->shieldAbsorption_; }
 
+            // TODO: Rename to shieldRechargeRate
+            virtual void setReloadRate(float reloadrate);
+            inline float getReloadRate() const
+                { return this->reloadRate_; }
+
+            virtual void setReloadWaitTime(float reloadwaittime);
+            inline float getReloadWaitTime() const
+                { return this->reloadWaitTime_; }
+
+            inline void resetReloadCountdown()
+            { this->reloadWaitCountdown_ = 0; }
+
+            inline void startReloadCountdown()
+            { this->reloadWaitCountdown_ = this->getReloadWaitTime(); } // TODO: Implement in Projectile.cc
+
+            virtual void decreaseReloadCountdownTime(float dt);
+
             inline ControllableEntity* getLastHitOriginator() const
                 { return this->lastHitOriginator_; }
 
-            virtual void hit(Pawn* originator, const Vector3& force, float damage);
-            virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage);
+            //virtual void hit(Pawn* originator, const Vector3& force, float damage);
+            //virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage);
+            virtual void hit(Pawn* originator, const Vector3& force, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
+            virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
+
             virtual void kill();
 
@@ -142,5 +182,6 @@
             virtual void spawneffect();
 
-            virtual void damage(float damage, Pawn* originator = 0);
+            //virtual void damage(float damage, Pawn* originator = 0);
+            virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL);
 
             bool bAlive_;
@@ -154,6 +195,12 @@
             float maxHealth_;
             float initialHealth_;
+            
             float shieldHealth_;
+            float maxShieldHealth_;
+            float initialShieldHealth_;
             float shieldAbsorption_; // Has to be between 0 and 1
+            float reloadRate_;
+            float reloadWaitTime_;
+            float reloadWaitCountdown_;
 
             WeakPtr<Pawn> lastHitOriginator_;
Index: code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 8521)
+++ code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 8706)
@@ -35,5 +35,13 @@
 #include "core/Template.h"
 #include "core/XMLPort.h"
+#include "tools/Shader.h"
+#include "util/Debug.h" // TODO: Needed?
+#include "util/Math.h"
+
+#include "graphics/Camera.h"
 #include "items/Engine.h"
+
+#include "CameraManager.h"
+#include "Scene.h"
 
 namespace orxonox
@@ -42,5 +50,5 @@
     CreateFactory(SpaceShip);
 
-    SpaceShip::SpaceShip(BaseObject* creator) : Pawn(creator)
+    SpaceShip::SpaceShip(BaseObject* creator) : Pawn(creator), boostBlur_(NULL)
     {
         RegisterObject(SpaceShip);
@@ -53,7 +61,5 @@
         this->localAngularAcceleration_.setValue(0, 0, 0);
         this->bBoost_ = false;
-        this->bPermanentBoost_ = false;
         this->steering_ = Vector3::ZERO;
-        this->engine_ = 0;
 
         this->boostPower_ = 10.0f;
@@ -64,4 +70,7 @@
         this->bBoostCooldown_ = false;
 
+        this->lift_ = 1.0f;                         // factor of the lift, standard is 1
+        this->stallSpeed_ = 220.0f;                 // max speed where lift is added
+
         this->bInvertYAxis_ = false;
 
@@ -74,12 +83,25 @@
         this->enableCollisionCallback();
 
+        this->engineTicksNotDone = 0;
         this->setConfigValues();
         this->registerVariables();
+        
+        this->cameraOriginalPosition_ = Vector3::UNIT_SCALE;
+        this->cameraOriginalOrientation_ = Quaternion::IDENTITY;
+
+        this->shakeFrequency_ = 15;
+        this->shakeAmplitude_ = 5;
+        this->shakeDt_ = 0;
     }
 
     SpaceShip::~SpaceShip()
     {
-        if (this->isInitialized() && this->engine_)
-            this->engine_->destroy();
+        if (this->isInitialized())
+        {
+            this->removeAllEngines();
+        
+            if (this->boostBlur_)
+                this->boostBlur_->destroy();
+        }
     }
 
@@ -88,5 +110,5 @@
         SUPER(SpaceShip, XMLPort, xmlelement, mode);
 
-        XMLPortParam(SpaceShip, "engine",            setEngineTemplate,    getEngineTemplate,    xmlelement, mode);
+        //XMLPortParam(SpaceShip, "engine",            setEngineTemplate,    getEngineTemplate,    xmlelement, mode);
         XMLPortParamVariable(SpaceShip, "primaryThrust",  primaryThrust_,  xmlelement, mode);
         XMLPortParamVariable(SpaceShip, "auxilaryThrust", auxilaryThrust_, xmlelement, mode);
@@ -96,4 +118,10 @@
         XMLPortParamVariable(SpaceShip, "boostRate", boostRate_, xmlelement, mode);
         XMLPortParamVariable(SpaceShip, "boostCooldownDuration", boostCooldownDuration_, xmlelement, mode);
+        XMLPortParamVariable(SpaceShip, "shakeFrequency", shakeFrequency_, xmlelement, mode);
+        XMLPortParamVariable(SpaceShip, "shakeAmplitude", shakeAmplitude_, xmlelement, mode);
+        XMLPortParamVariable(SpaceShip, "lift", lift_, xmlelement, mode);
+        XMLPortParamVariable(SpaceShip, "stallSpeed", stallSpeed_, xmlelement, mode);
+
+        XMLPortObject(SpaceShip, Engine, "engines", addEngine, getEngine, xmlelement, mode);
     }
 
@@ -103,4 +131,13 @@
         registerVariable(this->auxilaryThrust_, VariableDirection::ToClient);
         registerVariable(this->rotationThrust_, VariableDirection::ToClient);
+        // TODO: Synchronization of boost needed?
+        registerVariable(this->boostPower_, VariableDirection::ToClient);
+        registerVariable(this->boostPowerRate_, VariableDirection::ToClient);
+        registerVariable(this->boostRate_, VariableDirection::ToClient);
+        registerVariable(this->boostCooldownDuration_, VariableDirection::ToClient);
+        registerVariable(this->shakeFrequency_, VariableDirection::ToClient);
+        registerVariable(this->shakeAmplitude_, VariableDirection::ToClient);
+        registerVariable(this->lift_, VariableDirection::ToClient);
+        registerVariable(this->stallSpeed_, VariableDirection::ToClient);
     }
 
@@ -108,4 +145,10 @@
     {
         SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
+        
+        SetConfigValueExternal(bEnableMotionBlur_, "GraphicsSettings", "enableMotionBlur", true)
+            .description("Enable or disable the motion blur effect when moving very fast")
+            .callback(this, &SpaceShip::changedEnableMotionBlur);
+        SetConfigValueExternal(blurStrength_, "GraphicsSettings", "blurStrength", 3.0f)
+            .description("Defines the strength of the motion blur effect");
     }
 
@@ -128,14 +171,5 @@
         if (this->hasLocalController())
         {
-/*
-            this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() * getMass() * this->auxilaryThrust_);
-            this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() * getMass() * this->auxilaryThrust_);
-            if (this->localLinearAcceleration_.z() > 0)
-                this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->auxilaryThrust_);
-            else
-                this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->primaryThrust_);
-            this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * this->localLinearAcceleration_);
-            this->localLinearAcceleration_.setValue(0, 0, 0);
-*/
+            // Handle mouse look
             if (!this->isInMouseLook())
             {
@@ -143,11 +177,12 @@
                 this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * this->localAngularAcceleration_);
             }
-
             this->localAngularAcceleration_.setValue(0, 0, 0);
 
+            // Charge boostPower
             if(!this->bBoostCooldown_ && this->boostPower_ < this->initialBoostPower_)
             {
                 this->boostPower_ += this->boostPowerRate_*dt;
             }
+            // Use boostPower
             if(this->bBoost_)
             {
@@ -155,9 +190,103 @@
                 if(this->boostPower_ <= 0.0f)
                 {
-                    this->bBoost_ = false;
+                    this->boost(false);
                     this->bBoostCooldown_ = true;
                     this->timer_.setTimer(this->boostCooldownDuration_, false, createExecutor(createFunctor(&SpaceShip::boostCooledDown, this)));
                 }
-            }
+
+                this->shakeCamera(dt);
+            }
+
+            // Enable Blur depending on settings
+            if (this->bEnableMotionBlur_ && !this->boostBlur_ && this->hasLocalController() && this->hasHumanController())
+            {
+                this->boostBlur_ = new Shader(this->getScene()->getSceneManager());
+                this->boostBlur_->setCompositorName("Radial Blur");
+            }
+
+            if (this->boostBlur_) // && this->maxSpeedFront_ != 0 && this->boostFactor_ != 1)
+            {
+                // TODO: this->maxSpeedFront_ gets fastest engine
+                float blur = this->blurStrength_ * clamp((-this->getLocalVelocity().z - 0.0f /*this->maxSpeedFront_*/) / ((150.0f /*boostFactor_*/ - 1) * 1.5f /*this->maxSpeedFront_*/), 0.0f, 1.0f);
+
+                // Show and hide blur effect depending on state of booster
+                if(this->bBoost_)
+                    this->boostBlur_->setVisible(blur > 0);
+                else
+                    this->boostBlur_->setVisible(false);
+
+                this->boostBlur_->setParameter(0, 0, "sampleStrength", blur);
+            }
+        }
+    }
+
+    void SpaceShip::moveFrontBack(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() - value.x);
+        this->steering_.z -= value.x;
+    }
+
+    void SpaceShip::moveRightLeft(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() + value.x);
+        this->steering_.x += value.x;
+    }
+
+    void SpaceShip::moveUpDown(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() + value.x);
+        this->steering_.y += value.x;
+    }
+
+    void SpaceShip::rotateYaw(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() + value.x);
+
+        Pawn::rotateYaw(value);
+
+        //This function call adds a lift to the ship when it is rotating to make it's movement more "realistic" and enhance the feeling.
+        if (abs(this-> getLocalVelocity().z) < stallSpeed_)  {this->moveRightLeft(-lift_ / 5 * value * sqrt(abs(this-> getLocalVelocity().z)));}
+    }
+
+    void SpaceShip::rotatePitch(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x*0.8f);
+
+        Pawn::rotatePitch(value);
+
+        //This function call adds a lift to the ship when it is pitching to make it's movement more "realistic" and enhance the feeling.
+        if (abs(this-> getLocalVelocity().z) < stallSpeed_)  {this->moveUpDown(lift_ / 5 * value * sqrt(abs(this-> getLocalVelocity().z)));}
+    }
+
+    void SpaceShip::rotateRoll(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setZ(this->localAngularAcceleration_.z() + value.x);
+
+        Pawn::rotateRoll(value);
+    }
+
+    void SpaceShip::fire()
+    {
+    }
+
+    /**
+    @brief
+        Starts or stops boosting.
+    @param bBoost
+        Whether to start or stop boosting.
+    */
+    void SpaceShip::boost(bool bBoost)
+    {
+        if(bBoost && !this->bBoostCooldown_)
+        {
+            this->bBoost_ = true;
+            Camera* camera = CameraManager::getInstance().getActiveCamera();
+            this->cameraOriginalPosition_ = camera->getPosition();
+            this->cameraOriginalOrientation_ = camera->getOrientation();
+        }
+        if(!bBoost)
+        {
+            this->bBoost_ = false;
+            this->resetCamera();
         }
     }
@@ -167,102 +296,132 @@
         this->bBoostCooldown_ = false;
     }
-
-    void SpaceShip::moveFrontBack(const Vector2& value)
-    {
-        this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() - value.x);
-        this->steering_.z = -value.x;
-    }
-
-    void SpaceShip::moveRightLeft(const Vector2& value)
-    {
-        this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() + value.x);
-        this->steering_.x = value.x;
-    }
-
-    void SpaceShip::moveUpDown(const Vector2& value)
-    {
-        this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() + value.x);
-        this->steering_.y = value.x;
-    }
-
-    void SpaceShip::rotateYaw(const Vector2& value)
-    {
-        this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() + value.x);
-
-        Pawn::rotateYaw(value);
-    }
-
-    void SpaceShip::rotatePitch(const Vector2& value)
-    {
-        this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x);
-
-        Pawn::rotatePitch(value);
-    }
-
-    void SpaceShip::rotateRoll(const Vector2& value)
-    {
-        this->localAngularAcceleration_.setZ(this->localAngularAcceleration_.z() + value.x);
-
-        Pawn::rotateRoll(value);
-    }
-
-    // TODO: something seems to call this function every tick, could probably handled a little more efficiently!
-    void SpaceShip::setBoost(bool bBoost)
-    {
-        if(bBoost == this->bBoost_)
+    
+    void SpaceShip::shakeCamera(float dt)
+    {
+        //make sure the ship is only shaking if it's moving
+        if (this->getVelocity().squaredLength() > 80.0f)
+        {
+            this->shakeDt_ += dt;
+    
+            float frequency = this->shakeFrequency_ * (this->getVelocity().squaredLength());
+    
+            if (this->shakeDt_ >= 1.0f/frequency)
+            {
+                this->shakeDt_ -= 1.0f/frequency;
+            }
+    
+            Degree angle = Degree(sin(this->shakeDt_ *2.0f* math::pi * frequency) * this->shakeAmplitude_);
+    
+            //COUT(0) << "Angle: " << angle << std::endl;
+            Camera* camera = this->getCamera();
+
+            //Shaking Camera effect
+            if (camera != 0)
+            {
+                camera->setOrientation(Vector3::UNIT_X, angle);
+            }
+        }
+    }
+
+    void SpaceShip::resetCamera()
+    {
+        Camera *camera = this->getCamera();
+
+        if (camera == 0)
+        {
+            COUT(2) << "Failed to reset camera!";
             return;
-
-        if(bBoost)
-            this->boost();
+        }
+    
+        this->shakeDt_ = 0;
+        camera->setPosition(this->cameraOriginalPosition_);
+        camera->setOrientation(this->cameraOriginalOrientation_);
+    }
+
+    void SpaceShip::backupCamera()
+    {
+        Camera* camera = CameraManager::getInstance().getActiveCamera();
+        if(camera != NULL)
+        {
+            this->cameraOriginalPosition_ = camera->getPosition();
+            this->cameraOriginalOrientation_ = camera->getOrientation();
+        }
+    }
+
+    void SpaceShip::addEngine(orxonox::Engine* engine)
+    {
+        //COUT(0)<<"Adding an Engine: " << engine << endl;
+        this->engineList_.push_back(engine);
+        engine->addToSpaceShip(this);
+        this->resetEngineTicks();
+    }
+
+    bool SpaceShip::hasEngine(Engine* engine)
+    {
+        for(unsigned int i=0; i<this->engineList_.size(); i++)
+        {
+            if(this->engineList_[i]==engine)
+                return true;
+        }
+        return false;
+    }
+
+    Engine* SpaceShip::getEngine(unsigned int i)
+    {
+        if(this->engineList_.size()>=i)
+            return 0;
         else
-        {
-            this->bBoost_ = false;
-        }
-    }
-
-    void SpaceShip::fire()
-    {
-    }
-
-    void SpaceShip::boost()
-    {
-        if(!this->bBoostCooldown_)
-            this->bBoost_ = true;
-    }
-
-    void SpaceShip::loadEngineTemplate()
-    {
-        if (!this->enginetemplate_.empty())
-        {
-            Template* temp = Template::getTemplate(this->enginetemplate_);
-
-            if (temp)
-            {
-                Identifier* identifier = temp->getBaseclassIdentifier();
-
-                if (identifier)
-                {
-                    BaseObject* object = identifier->fabricate(this);
-                    this->engine_ = orxonox_cast<Engine*>(object);
-
-                    if (this->engine_)
-                    {
-                        this->engine_->addTemplate(temp);
-                        this->engine_->addToSpaceShip(this);
-                    }
-                    else
-                    {
-                        object->destroy();
-                    }
-                }
-            }
-        }
-    }
-
-    void SpaceShip::setEngine(Engine* engine)
-    {
-        this->engine_ = engine;
-        if (engine && engine->getShip() != this)
-            engine->addToSpaceShip(this);
+            return this->engineList_[i];
+    }
+
+    void SpaceShip::removeAllEngines()
+    {
+        while(this->engineList_.size())
+            this->engineList_.back()->destroy();
+    }
+    
+    void SpaceShip::removeEngine(Engine* engine)
+    {
+        for(std::vector<Engine*>::iterator it=this->engineList_.begin(); it!=this->engineList_.end(); ++it)
+        {
+            if(*it==engine)
+            {
+                this->engineList_.erase(it);
+                return;
+            }
+        }
+    }
+
+    void SpaceShip::setSpeedFactor(float factor)
+    {
+        for(unsigned int i=0; i<this->engineList_.size(); i++)
+            this->engineList_[i]->setSpeedFactor(factor);
+    }
+    float SpaceShip::getSpeedFactor() // Calculate mean SpeedFactor.
+    {
+        float ret = 0; unsigned int i = 0;
+        for(; i<this->engineList_.size(); i++)
+            ret += this->engineList_[i]->getSpeedFactor();
+        ret /= (float)i;
+        return ret;
+    }
+    float SpaceShip::getMaxSpeedFront()
+    {
+        float ret=0;
+        for(unsigned int i=0; i<this->engineList_.size(); i++)
+        {
+            if(this->engineList_[i]->getMaxSpeedFront() > ret)
+                ret = this->engineList_[i]->getMaxSpeedFront();
+        }
+        return ret;
+    }
+
+    float SpaceShip::getBoostFactor()
+    {
+        float ret = 0; unsigned int i=0;
+        for(; i<this->engineList_.size(); i++)
+            ret += this->engineList_[i]->getBoostFactor();
+        ret /= (float)i;
+        return ret;
     }
 
@@ -270,6 +429,17 @@
     {
         std::vector<PickupCarrier*>* list = new std::vector<PickupCarrier*>();
-        list->push_back(this->engine_);
+        for(unsigned int i=0; i<this->engineList_.size(); i++)
+            list->push_back(this->engineList_[i]);
         return list;
     }
+    
+    void SpaceShip::changedEnableMotionBlur()
+    {
+        if (!this->bEnableMotionBlur_)
+        {
+            this->boostBlur_->destroy();
+            this->boostBlur_ = 0;
+        }
+    }
+
 }
Index: code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 8521)
+++ code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 8706)
@@ -59,9 +59,18 @@
 
             virtual void fire();
-            virtual void boost();
+            virtual void boost(bool bBoost); // Starts or stops boosting.
 
-            void setEngine(Engine* engine);
-            inline Engine* getEngine() const
-                { return this->engine_; }
+            void addEngine(Engine* engine);
+            bool hasEngine(Engine* engine);
+            Engine* getEngine(unsigned int i); // This one's for XMLPort
+            inline const std::vector<Engine*>& getEngineList()
+                { return this->engineList_; }
+            void removeEngine(Engine* engine);
+            void removeAllEngines();
+
+            void setSpeedFactor(float factor);
+            float getSpeedFactor(); // Gets mean speed factor
+            float getMaxSpeedFront(); // gets largest speed forward
+            float getBoostFactor(); // gets mean boost factor
 
             inline void setSteeringDirection(const Vector3& direction)
@@ -69,18 +78,21 @@
             inline const Vector3& getSteeringDirection() const
                 { return this->steering_; }
+            inline void resetEngineTicks()
+                { this->engineTicksNotDone = this->engineList_.size(); }
+            inline void oneEngineTickDone()
+                { this->engineTicksNotDone--; }
+            inline bool hasEngineTicksRemaining()
+                { return (this->engineTicksNotDone>0); }
 
-            void setBoost(bool bBoost);
             inline bool getBoost() const
                 { return this->bBoost_; }
 
-            inline void setEngineTemplate(const std::string& temp)
-                { this->enginetemplate_ = temp; this->loadEngineTemplate(); }
-            inline const std::string& getEngineTemplate() const
-                { return this->enginetemplate_; }
+            inline float getBoostPower() const
+                { return this->boostPower_; }
+            inline float getInitialBoostPower() const
+                { return this->initialBoostPower_; }
 
-            inline void setPermanentBoost(bool bPermanent)
-                { this->bPermanentBoost_ = bPermanent; }
-            inline bool getPermanentBoost() const
-                { return this->bPermanentBoost_; }
+            inline bool isBoostCoolingDown() const
+                { return bBoostCooldown_; }
 
         protected:
@@ -90,5 +102,4 @@
             bool bBoost_;
             bool bBoostCooldown_;
-            bool bPermanentBoost_;
             float boostPower_;
             float initialBoostPower_;
@@ -96,4 +107,6 @@
             float boostPowerRate_;
             float boostCooldownDuration_;
+            float lift_;
+            float stallSpeed_;
             Vector3 steering_;
             float primaryThrust_;
@@ -103,15 +116,30 @@
             btVector3 localAngularAcceleration_;
 
+            float shakeFrequency_;
+            float shakeAmplitude_;
+
         private:
             void registerVariables();
             virtual bool isCollisionTypeLegal(WorldEntity::CollisionType type) const;
+            
+            //All things booster
+            void changedEnableMotionBlur();
+            void boostCooledDown(void);
+        
+            void resetCamera();
+            void backupCamera();
+            void shakeCamera(float dt);
 
-            void loadEngineTemplate();
-            
-            void boostCooledDown(void);
+            Shader* boostBlur_;
+            float blurStrength_;
+            bool bEnableMotionBlur_;
 
-            std::string enginetemplate_;
-            Engine* engine_;
+            std::vector<Engine*> engineList_;
+            int engineTicksNotDone; // Used for knowing when to reset temporary variables.
             Timer timer_;
+            Vector3 cameraOriginalPosition_;
+            Quaternion cameraOriginalOrientation_;
+        
+            float shakeDt_;
     };
 }
