Index: code/branches/ppspickups1/data/levels/templates/pickup_representation_templates_speed.oxt
===================================================================
--- code/branches/ppspickups1/data/levels/templates/pickup_representation_templates_speed.oxt	(revision 6606)
+++ code/branches/ppspickups1/data/levels/templates/pickup_representation_templates_speed.oxt	(revision 6607)
@@ -17,7 +17,7 @@
 <Template name=smallspeedpickup>
   <SpeedPickup
-    duration = 10
-    speedAdd = 1
-    SpeedMultiply = 1
+    duration = 10.0
+    speedAdd = 0
+    SpeedMultiply = 10
     activationType = "immediate"
     durationType = "once"
Index: code/branches/ppspickups1/src/modules/pickup/Pickup.cc
===================================================================
--- code/branches/ppspickups1/src/modules/pickup/Pickup.cc	(revision 6606)
+++ code/branches/ppspickups1/src/modules/pickup/Pickup.cc	(revision 6607)
@@ -39,24 +39,26 @@
 #include "DroppedPickup.h"
 
+#include "tools/Timer.h"
+
 namespace orxonox
 {
-    
+
     /*static*/ const std::string Pickup::activationTypeImmediate_s = "immediate";
     /*static*/ const std::string Pickup::activationTypeOnUse_s = "onUse";
     /*static*/ const std::string Pickup::durationTypeOnce_s = "once";
     /*static*/ const std::string Pickup::durationTypeContinuous_s = "continuous";
-    
+
     Pickup::Pickup(BaseObject* creator) : BaseObject(creator)
     {
         RegisterObject(Pickup);
-        
+
         this->initialize();
     }
-    
+
     Pickup::~Pickup()
     {
-        
-    }
-    
+
+    }
+
     /**
     @brief
@@ -68,5 +70,5 @@
         this->durationType_ = pickupDurationType::once;
     }
-    
+
     /**
     @brief
@@ -74,14 +76,14 @@
     */
     void Pickup::initializeIdentifier(void)
-    {        
+    {
         std::string val1 = this->getActivationType();
         std::string type1 = "activationType";
         this->pickupIdentifier_->addParameter(type1, val1);
-        
+
         std::string val2 = this->getDurationType();
         std::string type2 = "durationType";
         this->pickupIdentifier_->addParameter(type2, val2);
     }
-    
+
     /**
     @brief
@@ -94,8 +96,8 @@
         XMLPortParam(Pickup, "activationType", setActivationType, getActivationType, xmlelement, mode);
         XMLPortParam(Pickup, "durationType", setDurationType, getDurationType, xmlelement, mode);
-        
+
         this->initializeIdentifier();
     }
-    
+
     /**
     @brief
@@ -116,5 +118,5 @@
         }
     }
-        
+
     /**
     @brief
@@ -135,5 +137,5 @@
         }
     }
-    
+
     /**
     @brief
@@ -157,5 +159,5 @@
         }
     }
-        
+
     /**
     @brief
@@ -179,5 +181,5 @@
         }
     }
-    
+
     /**
     @brief
@@ -188,5 +190,5 @@
     {
         SUPER(Pickup, changedPickedUp);
-        
+
         //! Sets the Pickup to used if the Pickup has activation type 'immediate' and gets picked up.
         if(this->getCarrier() != NULL && this->isPickedUp() && this->isImmediate())
@@ -195,5 +197,5 @@
         }
     }
-    
+
     /**
     @brief
@@ -206,14 +208,14 @@
         if(item == NULL)
             item = new Pickup(this);
-        
+
         SUPER(Pickup, clone, item);
-        
+
         Pickup* pickup = dynamic_cast<Pickup*>(item);
         pickup->setActivationTypeDirect(this->getActivationTypeDirect());
         pickup->setDurationTypeDirect(this->getDurationTypeDirect());
-        
+
         pickup->initializeIdentifier();
     }
-        
+
     /**
     @brief
@@ -231,4 +233,23 @@
         return true;
     }
-    
+
+    /**
+    @brief
+        Starts the Pickup duration Timer.
+    */
+    bool Pickup::startPickupTimer(float durationTime)
+    {
+        if (durationTime<=0)
+        {
+            COUT(1) << "Invalid durationTime in pickup." << std::endl;
+            return false;
+        }
+        if (false) /* How to check if Timer already running? */
+        {
+            COUT(1) << "Pickup durationTimer already in use." << std::endl;
+            return false;
+        }
+        this->durationTimer_.setTimer(durationTime, false, createExecutor(createFunctor(&Pickup::PickupTimerCallBack, this)));
+        return true;
+    }
 }
Index: code/branches/ppspickups1/src/modules/pickup/Pickup.h
===================================================================
--- code/branches/ppspickups1/src/modules/pickup/Pickup.h	(revision 6606)
+++ code/branches/ppspickups1/src/modules/pickup/Pickup.h	(revision 6607)
@@ -42,4 +42,6 @@
 #include "interfaces/Pickupable.h"
 
+#include "tools/Timer.h"
+
 namespace orxonox
 {
@@ -54,5 +56,5 @@
         };
     }
-    
+
     //! Enum for the duration tyoe.
     namespace pickupDurationType
@@ -64,5 +66,5 @@
         };
     }
-    
+
     /**
     @brief
@@ -74,13 +76,13 @@
     class _PickupExport Pickup : public Pickupable, public BaseObject
     {
-        
+
         protected:
             Pickup(BaseObject* creator); //!< Constructor.
-        
+
         public:
             virtual ~Pickup(); //!< Destructor.
-            
+
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            
+
             /**
             @brief Get the activation type of the pickup.
@@ -95,8 +97,8 @@
             inline pickupDurationType::Value getDurationTypeDirect(void)
                 { return this->durationType_; }
-            
+
             const std::string& getActivationType(void); //!< Get the activation type of the pickup.
             const std::string& getDurationType(void); //!< Get the duration type of the pickup.
-            
+
             /**
             @brief Get whether the activation type is 'immediate'.
@@ -123,14 +125,18 @@
             inline bool isContinuous(void)
                 { return this->getDurationTypeDirect() == pickupDurationType::continuous; }
-            
+
             virtual void changedPickedUp(void); //!< Should be called when the pickup has transited from picked up to dropped or the other way around.
-                                    
+
             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the Pickup.
-                
+
         protected:
             void initializeIdentifier(void);
-            
+
             virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
-            
+
+            bool startPickupTimer(float durationTime);
+
+            virtual void PickupTimerCallBack(void) {}
+
             /**
             @brief Set the activation type of the pickup.
@@ -145,21 +151,23 @@
             inline void setDurationTypeDirect(pickupDurationType::Value type)
                 { this->durationType_ = type; }
-                
+
             void setActivationType(const std::string& type); //!< Set the activation type of the pickup.
             void setDurationType(const std::string& type); //!< Set the duration type of the pickup
-                
+
         private:
             void initialize(void); //!< Initializes the member variables.
-            
+
             pickupActivationType::Value activationType_; //!< The activation type of the Pickup.
             pickupDurationType::Value durationType_; //!< The duration type of the pickup.
-            
+
             static const std::string activationTypeImmediate_s;
             static const std::string activationTypeOnUse_s;
             static const std::string durationTypeOnce_s;
             static const std::string durationTypeContinuous_s;
-        
+
+            float durationTime_;
+            Timer durationTimer_;
     };
-    
+
 }
 #endif // _Pickup_H__
Index: code/branches/ppspickups1/src/modules/pickup/PickupPrereqs.h
===================================================================
--- code/branches/ppspickups1/src/modules/pickup/PickupPrereqs.h	(revision 6606)
+++ code/branches/ppspickups1/src/modules/pickup/PickupPrereqs.h	(revision 6607)
@@ -73,9 +73,10 @@
     class PickupRepresentation;
     class PickupSpawner;
-    
+
     //items
     class HealthPickup;
     class MetaPickup;
-    
+    class SpeedPickup;
+
 }
 
Index: code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc
===================================================================
--- code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc	(revision 6606)
+++ code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc	(revision 6607)
@@ -38,5 +38,6 @@
 #include "util/StringUtils.h"
 
-#include "worldentities/pawns/Pawn.h"
+#include "worldentities/pawns/SpaceShip.h"
+#include "items/Engine.h"
 #include "pickup/PickupIdentifier.h"
 
@@ -123,31 +124,4 @@
     /**
     @brief
-        Is called every tick.
-        Does count down the duration of the SpeedPickup.
-    @param dt
-        The duration of the last tick.
-    */
-    void SpeedPickup::tick(float dt)
-    {
-        if(this->isUsed())
-        {
-            Pawn* pawn = this->carrierToPawnHelper();
-            if(pawn == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
-                this->destroy();
-
-             //! Calculate the remaining duration of the Pickup
-            float duration=this->getDuration()-dt;
-            this->setDuration(duration);
-
-            //! If duration is over
-            if(this->getDuration() < 0)
-            {
-                this->setUsed(false);
-            }
-        }
-    }
-
-    /**
-    @brief
         Is called when the pickup has transited from used to unused or the other way around.
     */
@@ -163,23 +137,15 @@
         if(this->isUsed())
         {
-            if(this->isOnce())
-            {
-                Pawn* pawn = this->carrierToPawnHelper();
-                if(pawn == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
-                    this->destroy();
-
-                //! The pickup has been used up.
-                this->setUsed(false);
-            }
-        }
-        else
-        {
-            //! If either the pickup can only be used once or it is continuous and used up, it is destroyed upon setting it to unused.
-            if(this->isOnce() || (this->isContinuous() && this->getDuration() < 0))
-            {
+            this->startPickupTimer(this->getDuration());
+
+            Engine* engine = this->carrierToEngineHelper();
+            if(engine == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
                 this->destroy();
-            }
-        }
-    }
+            engine->setSpeedAdd(this->getSpeedAdd());
+            engine->setSpeedMultiply(this->getSpeedMultiply());
+        }
+    }
+
+
 
     /**
@@ -189,15 +155,19 @@
         A pointer to the Pawn, or NULL if the conversion failed.
     */
-    Pawn* SpeedPickup::carrierToPawnHelper(void)
+    Engine* SpeedPickup::carrierToEngineHelper(void)
     {
         PickupCarrier* carrier = this->getCarrier();
-        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
-
-        if(pawn == NULL)
+        SpaceShip* ship = dynamic_cast<SpaceShip*>(carrier);
+
+        if(ship == NULL)
         {
             COUT(1) << "Invalid PickupCarrier in SpeedPickup." << std::endl;
         }
-
-        return pawn;
+        else
+        {
+            return ship->getEngine();
+        }
+
+        return 0;
     }
 
@@ -238,5 +208,5 @@
         {
             COUT(1) << "Invalid duration in SpeedPickup." << std::endl;
-            this->duration_ = 0.0;
+            this->duration_ = 0;
         }
     }
@@ -250,5 +220,5 @@
     void SpeedPickup::setSpeedAdd(float speedAdd)
     {
-        if(speedAdd > 0.0f)
+        if(speedAdd >= 0.0f)
         {
             this->speedAdd_ = speedAdd;
@@ -269,5 +239,5 @@
     void SpeedPickup::setSpeedMultiply(float speedMultiply)
     {
-        if(speedMultiply != 0.0f)
+        if(speedMultiply != 0)
         {
             this->speedMultiply_ = speedMultiply;
@@ -279,3 +249,7 @@
         }
     }
+
+    void SpeedPickup::PickupTimerCallBack(void) {
+        COUT(2) << "Timer ended!" << std::endl;
+    }
 }
Index: code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.h
===================================================================
--- code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.h	(revision 6606)
+++ code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.h	(revision 6607)
@@ -57,5 +57,5 @@
         Eric Beier
     */
-    class _PickupExport SpeedPickup : public Pickup, public Tickable
+    class _PickupExport SpeedPickup : public Pickup
     {
         public:
@@ -65,5 +65,4 @@
 
             virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a HealthPickup object through XML.
-            virtual void tick(float dt); //!< Is called every tick.
 
             virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
@@ -80,12 +79,12 @@
             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
 
-            void setDuration(float duration); //!< Sets the duration
+            void setDuration(float duration);
             void setSpeedAdd(float speedAdd);
             void setSpeedMultiply(float speedMultiply);
 
-
         private:
             void initialize(void); //!< Initializes the member variables.
-            Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+            void PickupTimerCallBack(void); //!< Function that gets called when timer ends.
+            Engine* carrierToEngineHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
 
             float duration_; //!< The health that is transferred to the Pawn.
Index: code/branches/ppspickups1/src/orxonox/interfaces/PickupCarrier.h
===================================================================
--- code/branches/ppspickups1/src/orxonox/interfaces/PickupCarrier.h	(revision 6606)
+++ code/branches/ppspickups1/src/orxonox/interfaces/PickupCarrier.h	(revision 6607)
@@ -48,9 +48,4 @@
 {
 
-    //! Pre-declarations.
-    class Pickup;
-    class HealthPickup;
-    class MetaPickup;
-
     /**
     @brief
@@ -66,9 +61,10 @@
         friend class HealthPickup;
         friend class MetaPickup;
-        
+        friend class SpeedPickup;
+
         public:
             PickupCarrier(); //!< Constructor.
             virtual ~PickupCarrier(); //!< Destructor.
-            
+
             /**
             @brief Can be called to pick up a Pickupable.
@@ -86,5 +82,5 @@
                     return pickedUp;
                 }
-                
+
             /**
             @brief Can be called to drop a Pickupable.
@@ -94,5 +90,5 @@
             */
             bool drop(Pickupable* pickup, bool drop = true)
-                { 
+                {
                     bool dropped = this->pickups_.erase(pickup) == 1;
                     if(dropped && drop)
@@ -103,5 +99,5 @@
                     return dropped;
                 }
-                
+
             /**
             @brief Can be used to check whether the PickupCarrier or a child of his is a target ot the input Pickupable.
@@ -113,5 +109,5 @@
                     if(pickup->isTarget(this)) //!< If the PickupCarrier itself is a target.
                         return true;
-                    
+
                     //! Go recursively through all children to check whether they are a target.
                     std::list<PickupCarrier*>* children = this->getCarrierChildren();
@@ -121,11 +117,11 @@
                             return true;
                     }
-                    
+
                     children->clear();
                     delete children;
-                    
+
                     return false;
                 }
-                
+
             /**
             @brief Get the carrier that is both a child of the PickupCarrier (or the PickupCarrier itself) and a target of the input Pickupable.
@@ -137,8 +133,8 @@
                     if(!this->isTarget(pickup))
                         return NULL;
-                    
+
                     if(pickup->isTarget(this)) //!< If the PickupCarrier itself is a target.
                         return this;
-                    
+
                     //! Go recursively through all children to check whether they are the target.
                     std::list<PickupCarrier*>* children = this->getCarrierChildren();
@@ -148,11 +144,11 @@
                             return *it;
                     }
-                    
+
                     children->clear();
                     delete children;
-                    
+
                     return NULL;
                 }
-                
+
             /**
             @brief Get the (absolute) position of the PickupCarrier.
@@ -161,11 +157,11 @@
             */
             virtual const Vector3& getCarrierPosition(void) = 0;
-            
-        protected:        
+
+        protected:
             /**
             @brief Get all direct children of this PickupSpawner.
                    This method needs to be implemented by any direct derivative class of PickupCarrier.
                    The returned list will be deleted by the methods calling this function.
-            @return Returns a pointer to a list of all direct children. 
+            @return Returns a pointer to a list of all direct children.
             */
             virtual std::list<PickupCarrier*>* getCarrierChildren(void) = 0;
@@ -176,5 +172,5 @@
             */
             virtual PickupCarrier* getCarrierParent(void) = 0;
-                            
+
             /**
             @brief Get all Pickupables this PickupCarrier has.
@@ -183,8 +179,8 @@
             std::set<Pickupable*>& getPickups(void)
                 { return this->pickups_; }
-        
+
         private:
             std::set<Pickupable*> pickups_; //!< The list of Pickupables carried by this PickupCarrier.
-            
+
     };
 }
Index: code/branches/ppspickups1/src/orxonox/items/Engine.cc
===================================================================
--- code/branches/ppspickups1/src/orxonox/items/Engine.cc	(revision 6606)
+++ code/branches/ppspickups1/src/orxonox/items/Engine.cc	(revision 6607)
@@ -64,4 +64,7 @@
         this->boostBlur_ = 0;
 
+        this->speedAdd_ = 0.0;
+        this->speedMultiply_ = 1.0;
+
         this->setConfigValues();
         this->registerVariables();
@@ -119,4 +122,7 @@
         registerVariable(this->accelerationLeftRight_, VariableDirection::ToClient);
         registerVariable(this->accelerationUpDown_,    VariableDirection::ToClient);
+
+        registerVariable(this->speedAdd_, VariableDirection::ToClient);
+        registerVariable(this->speedMultiply_, VariableDirection::ToClient);
     }
 
@@ -192,5 +198,5 @@
         }
 
-        this->ship_->setAcceleration(this->ship_->getOrientation() * acceleration);
+        this->ship_->setAcceleration(this->ship_->getOrientation() * (acceleration*this->getSpeedMultiply()+Vector3(0,0,-this->getSpeedAdd())));
 
         if (!this->ship_->getPermanentBoost())
@@ -241,3 +247,13 @@
             return Vector3::ZERO;
     }
+
+    PickupCarrier* Engine::getCarrierParent(void)
+    {
+        return this->ship_;
+    }
+
+    const Vector3& Engine::getCarrierPosition(void)
+    {
+        return this->ship_->getWorldPosition();
+    }
 }
Index: code/branches/ppspickups1/src/orxonox/items/Engine.h
===================================================================
--- code/branches/ppspickups1/src/orxonox/items/Engine.h	(revision 6606)
+++ code/branches/ppspickups1/src/orxonox/items/Engine.h	(revision 6607)
@@ -35,7 +35,9 @@
 #include "Item.h"
 
+#include "interfaces/PickupCarrier.h"
+
 namespace orxonox
 {
-    class _OrxonoxExport Engine : public Item, public Tickable
+    class _OrxonoxExport Engine : public Item, public Tickable, public PickupCarrier
     {
         public:
@@ -104,5 +106,23 @@
                 { return this->accelerationUpDown_; }
 
+            inline float getSpeedAdd(void)
+                { return this->speedAdd_; }
+            inline float getSpeedMultiply(void)
+                { return this->speedMultiply_; }
+
             virtual const Vector3& getDirection() const;
+
+            virtual const Vector3& getCarrierPosition(void);
+
+            /* not in protected ?? */
+            inline void setSpeedAdd(float speedAdd)
+                { this->speedAdd_=speedAdd; }
+            inline void setSpeedMultiply(float speedMultiply)
+                { this->speedMultiply_=speedMultiply; }
+
+        protected:
+            virtual std::list<PickupCarrier*>* getCarrierChildren(void)
+                { return new std::list<PickupCarrier*>(); }
+            virtual PickupCarrier* getCarrierParent(void);
 
         private:
@@ -114,4 +134,7 @@
             float boostFactor_;
             float speedFactor_;
+
+            float speedAdd_;
+            float speedMultiply_;
 
             float maxSpeedFront_;
Index: code/branches/ppspickups1/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/ppspickups1/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 6606)
+++ code/branches/ppspickups1/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 6607)
@@ -220,3 +220,10 @@
             engine->addToSpaceShip(this);
     }
+
+    std::list<PickupCarrier*>* SpaceShip::getCarrierChildren(void)
+    {
+        std::list<PickupCarrier*>* list = new std::list<PickupCarrier*>();
+        list->push_front(engine_);
+        return list;
+    }
 }
Index: code/branches/ppspickups1/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- code/branches/ppspickups1/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 6606)
+++ code/branches/ppspickups1/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 6607)
@@ -86,4 +86,5 @@
 
         protected:
+            virtual std::list<PickupCarrier*>* getCarrierChildren(void);
             bool bInvertYAxis_;
 
