Index: code/trunk/src/modules/pickup/items/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/pickup/items/CMakeLists.txt	(revision 6540)
+++ code/trunk/src/modules/pickup/items/CMakeLists.txt	(revision 6709)
@@ -1,4 +1,8 @@
 ADD_SOURCE_FILES(PICKUP_SRC_FILES
+
   HealthPickup.cc
+
+  SpeedPickup.cc
   MetaPickup.cc
+
 )
Index: code/trunk/src/modules/pickup/items/SpeedPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/SpeedPickup.cc	(revision 6709)
+++ code/trunk/src/modules/pickup/items/SpeedPickup.cc	(revision 6709)
@@ -0,0 +1,264 @@
+/*
+ *   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:
+ *      Eric Beier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file SpeedPickup.cc
+    @brief Implementation of the SpeedPickup class.
+*/
+
+#include "SpeedPickup.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/StringUtils.h"
+
+#include "worldentities/pawns/SpaceShip.h"
+#include "items/Engine.h"
+#include "pickup/PickupIdentifier.h"
+
+#include <sstream>
+
+
+namespace orxonox
+{
+    CreateFactory(SpeedPickup);
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes the member variables.
+    */
+    SpeedPickup::SpeedPickup(BaseObject* creator) : Pickup(creator)
+    {
+        RegisterObject(SpeedPickup);
+
+        this->initialize();
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    SpeedPickup::~SpeedPickup()
+    {
+
+    }
+
+    /**
+    @brief
+        Initializes the member variables.
+    */
+    void SpeedPickup::initialize(void)
+    {
+        this->duration_ = 0.0f;
+        this->speedAdd_ = 0.0f;
+        this->speedMultiply_ = 1.0f;
+
+        this->addTarget(ClassIdentifier<Pawn>::getIdentifier());
+    }
+
+    /**
+    @brief
+        Initializes the PickupIdentifier of this pickup.
+    */
+    void SpeedPickup::initializeIdentifier(void)
+    {
+        std::stringstream stream;
+        stream << this->getDuration();
+        std::string type1 = "duration";
+        std::string val1 = stream.str();
+        this->pickupIdentifier_->addParameter(type1, val1);
+
+        stream.clear();
+        stream << this->getSpeedAdd();
+        std::string type2 = "speedAdd";
+        std::string val2 = stream.str();
+        this->pickupIdentifier_->addParameter(type2, val2);
+
+        stream.clear();
+        stream << this->getSpeedMultiply();
+        std::string type3 = "speedMultiply";
+        std::string val3 = stream.str();
+        this->pickupIdentifier_->addParameter(type3, val3);
+    }
+
+    /**
+    @brief
+        Method for creating a SpeedPickup object through XML.
+    */
+    void SpeedPickup::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
+    {
+        SUPER(SpeedPickup, XMLPort, xmlelement, mode);
+
+        XMLPortParam(SpeedPickup, "duration", setDuration, getDuration, xmlelement, mode);
+        XMLPortParam(SpeedPickup, "speedAdd", setSpeedAdd, getSpeedAdd, xmlelement, mode);
+        XMLPortParam(SpeedPickup, "speedMultiply", setSpeedMultiply, getSpeedMultiply, xmlelement, mode);
+
+        this->initializeIdentifier();
+    }
+
+    /**
+    @brief
+        Is called when the pickup has transited from used to unused or the other way around.
+    */
+    void SpeedPickup::changedUsed(void)
+    {
+        SUPER(SpeedPickup, changedUsed);
+
+        //! If the pickup is not picked up nothing must be done.
+        if(!this->isPickedUp())
+            return;
+
+        Engine* engine = this->carrierToEngineHelper();
+        if(engine == NULL) //!< If the PickupCarrier is no Engine, then this pickup is useless and therefore is destroyed.
+            this->destroy();
+        
+        //! If the pickup has transited to used.
+        if(this->isUsed())
+        {
+            this->startPickupTimer(this->getDuration());
+            engine->setSpeedAdd(this->getSpeedAdd());
+            engine->setSpeedMultiply(this->getSpeedMultiply());
+        }
+        else
+        {
+            engine->setSpeedAdd(0.0f);
+            engine->setSpeedMultiply(1.0f);
+            
+            if(this->isOnce())
+            {
+                this->destroy();
+            }
+        }
+    }
+
+    /**
+    @brief
+        Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+    @return
+        A pointer to the Pawn, or NULL if the conversion failed.
+    */
+    Engine* SpeedPickup::carrierToEngineHelper(void)
+    {
+        PickupCarrier* carrier = this->getCarrier();
+        SpaceShip* ship = dynamic_cast<SpaceShip*>(carrier);
+
+        if(ship == NULL)
+        {
+            COUT(1) << "Invalid PickupCarrier in SpeedPickup." << std::endl;
+        }
+        else
+        {
+            return ship->getEngine();
+        }
+
+        return 0;
+    }
+
+    /**
+    @brief
+        Creates a duplicate of the input OrxonoxClass.
+    @param item
+        A pointer to the Orxonox class.
+    */
+    void SpeedPickup::clone(OrxonoxClass*& item)
+    {
+        if(item == NULL)
+            item = new SpeedPickup(this);
+
+        SUPER(SpeedPickup, clone, item);
+
+        SpeedPickup* pickup = dynamic_cast<SpeedPickup*>(item);
+        pickup->setDuration(this->getDuration());
+        pickup->setSpeedAdd(this->getSpeedAdd());
+        pickup->setSpeedMultiply(this->getSpeedMultiply());
+
+        pickup->initializeIdentifier();
+    }
+
+    /**
+    @brief
+        Sets the duration.
+    @param duration
+        The duration
+    */
+    void SpeedPickup::setDuration(float duration)
+    {
+        if(duration >= 0.0f)
+        {
+            this->duration_ = duration;
+        }
+        else
+        {
+            COUT(1) << "Invalid duration in SpeedPickup." << std::endl;
+            this->duration_ = 0.0f;
+        }
+    }
+
+    /**
+    @brief
+        Sets the SpeedAdd
+    @param speedAdd
+        The added Speed
+    */
+    void SpeedPickup::setSpeedAdd(float speedAdd)
+    {
+        if(speedAdd >= 0.0f)
+        {
+            this->speedAdd_ = speedAdd;
+        }
+        else
+        {
+            COUT(1) << "Invalid speedAdd in SpeedPickup." << std::endl;
+            this->speedAdd_ = 0.0f;
+        }
+    }
+
+    /**
+    @brief
+        Sets the SpeedMultiply
+    @param speedAdd
+        The multiplied Speed
+    */
+    void SpeedPickup::setSpeedMultiply(float speedMultiply)
+    {
+        if(speedMultiply != 0)
+        {
+            this->speedMultiply_ = speedMultiply;
+        }
+        else
+        {
+            COUT(1) << "Invalid speedMultiply in SpeedPickup." << std::endl;
+            this->speedMultiply_ = 1.0f;
+        }
+    }
+
+    void SpeedPickup::pickupTimerCallback(void)
+    {       
+        this->setUsed(false);
+    }
+}
Index: code/trunk/src/modules/pickup/items/SpeedPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/SpeedPickup.h	(revision 6709)
+++ code/trunk/src/modules/pickup/items/SpeedPickup.h	(revision 6709)
@@ -0,0 +1,97 @@
+/*
+ *   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:
+ *      Eric Beier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file SpeedPickup.h
+    @brief Declaration of the SpeedPickup class.
+*/
+
+#ifndef _SpeedPickup_H__
+#define _SpeedPickup_H__
+
+#include "pickup/PickupPrereqs.h"
+
+#include <string>
+#include "worldentities/pawns/Pawn.h"
+#include "worldentities/StaticEntity.h"
+
+#include "pickup/Pickup.h"
+
+namespace orxonox {
+
+    /**
+    @brief
+        A Pickup which can manipulate the Speed of a Pawn.
+
+        1) The speed multiplier:
+           The additional (forward) speed:
+        2) The activation type: 'immediate' or 'onUse'. defines if the item is used when it's picked up or only after the player chooses to use it.
+        4) The duration: the activation time of the pickup.
+
+    @author
+        Eric Beier
+    */
+    class _PickupExport SpeedPickup : public Pickup
+    {
+        public:
+
+            SpeedPickup(BaseObject* creator); //!< Constructor.
+            virtual ~SpeedPickup(); //!< Destructor.
+
+            virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a HealthPickup object through XML.
+
+            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
+            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
+
+            inline float getDuration(void)
+                { return this->duration_; }
+            inline float getSpeedAdd(void)
+                { return this->speedAdd_; }
+            inline float getSpeedMultiply(void)
+                { return this->speedMultiply_; }
+
+        protected:
+            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
+            
+            virtual void pickupTimerCallback(void); //!< Function that gets called when timer ends.
+
+            void setDuration(float duration);
+            void setSpeedAdd(float speedAdd);
+            void setSpeedMultiply(float speedMultiply);
+
+        private:
+            void initialize(void); //!< Initializes the member variables.
+            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.
+            float speedAdd_;
+            float speedMultiply_;
+    };
+}
+
+#endif // _SpeedPickup_H__
