Index: code/branches/presentation/src/orxonox/items/Engine.cc
===================================================================
--- code/branches/presentation/src/orxonox/items/Engine.cc	(revision 8580)
+++ code/branches/presentation/src/orxonox/items/Engine.cc	(revision 8589)
@@ -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,11 +72,5 @@
     Engine::~Engine()
     {
-        if (this->isInitialized() && this->ship_)
-        {
-            this->ship_->setEngine(0);
-
-            if (this->boostBlur_)
-                this->boostBlur_->destroy();
-        }
+
     }
 
@@ -98,13 +91,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");
     }
 
@@ -202,20 +193,13 @@
         }
 
-        this->ship_->setAcceleration(this->ship_->getOrientation() * (acceleration*this->getSpeedMultiply()+Vector3(0,0,-this->getSpeedAdd())));
-
-        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();
         }
     }
@@ -224,7 +208,4 @@
     {
         SUPER(Engine, changedActivity);
-
-        if (this->boostBlur_)
-            this->boostBlur_->setVisible(this->isVisible());
     }
 
@@ -236,12 +217,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);
         }
     }
@@ -265,10 +240,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/branches/presentation/src/orxonox/items/Engine.h
===================================================================
--- code/branches/presentation/src/orxonox/items/Engine.h	(revision 8580)
+++ code/branches/presentation/src/orxonox/items/Engine.h	(revision 8589)
@@ -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_;
     };
 }
