Index: code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc
===================================================================
--- code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc	(revision 6575)
+++ 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;
+    }
 }
