Index: code/trunk/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/worldentities/CMakeLists.txt	(revision 8470)
+++ 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 8470)
+++ 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 8470)
+++ 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 8470)
+++ 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 8470)
+++ 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 8470)
+++ 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 8470)
+++ 	(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 8470)
+++ 	(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 8470)
+++ 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 8470)
+++ 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 8470)
+++ 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 8470)
+++ 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 8470)
+++ 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 8470)
+++ 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_;
     };
 }
