Index: code/trunk/data/levels/includes/pickups.oxi
===================================================================
--- code/trunk/data/levels/includes/pickups.oxi	(revision 8711)
+++ code/trunk/data/levels/includes/pickups.oxi	(revision 8713)
@@ -216,4 +216,5 @@
     pickupDescription = "Shrinks the Ship by a bit"
     spawnerTemplate = "smallshrinkpickupRepresentation"
+    inventoryRepresentation = "SmallShrink"
 >
     <pickup>
@@ -226,4 +227,5 @@
     pickupDescription = "Shrinks the Ship"
     spawnerTemplate = "mediumshrinkpickupRepresentation"
+    inventoryRepresentation = "MediumShrink"
 >
     <pickup>
@@ -236,4 +238,5 @@
     pickupDescription = "Shrinks the Ship considerably"
     spawnerTemplate = "hugeshrinkpickupRepresentation"
+    inventoryRepresentation = "HugeShrink"
 >
     <pickup>
Index: code/trunk/src/modules/pickup/PickupRepresentation.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupRepresentation.cc	(revision 8711)
+++ code/trunk/src/modules/pickup/PickupRepresentation.cc	(revision 8713)
@@ -193,5 +193,5 @@
         Billboard* icon = new Billboard(spawner);
         icon->setColour(ColourValue(0.89f, 0.79f, 0.08f));
-        icon->setMaterial("Asterix");
+        icon->setMaterial("asterisk");
         icon->setScale(0.5);
         sphere->attach(icon);
Index: code/trunk/src/modules/pickup/items/ShrinkPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/ShrinkPickup.cc	(revision 8711)
+++ code/trunk/src/modules/pickup/items/ShrinkPickup.cc	(revision 8713)
@@ -21,5 +21,5 @@
  *
  *   Author:
- *      Damian 'Mozork' Frick
+ *      Sandro Sgier
  *   Co-authors:
  *      ...
@@ -43,6 +43,4 @@
 #include "worldentities/pawns/Pawn.h"
 
-#include "weaponsystem/WeaponSlot.h"
-#include "weaponsystem/Weapon.h"
 #include "worldentities/CameraPosition.h"
 
@@ -51,5 +49,5 @@
     CreateFactory(ShrinkPickup);
 
-        /**
+    /**
     @brief
         Constructor: Initializes the Pickup.
@@ -60,24 +58,25 @@
 
         this->initialize();
+    }
+
+    ShrinkPickup::~ShrinkPickup()
+    {
+
+    }
+
+    void ShrinkPickup::initialize(void)
+    {
+        this->addTarget(ClassIdentifier<Pawn>::getIdentifier());
+
         this->shrinkFactor_ = 5.0f;
-        this->shrinkSpeed_ = 5.0f;
+        this->shrinkDuration_ = 5.0f;
         this->duration_ = 5.0f;
+
         this->isActive_ = false;
+        this->isShrinking_ = false;
         this->isTerminating_ = false;
 
-        this->size_ = 0;
-        this->defaultCameraPos_ = 0.0f;
-        this->defaultScale_ = Vector3::UNIT_SCALE;
-        this->actualScale_ = Vector3::UNIT_SCALE;
-        this->smallScale_ = Vector3::UNIT_SCALE;
-        this->defaultMass_ = 1.0f;
-        this->actualMass_ = 1.0f;
-        this->smallMass_ = 1.0f;
-        this->pawn_ = NULL;
-    }
-
-    ShrinkPickup::~ShrinkPickup()
-    {
-
+        this->timeRemainig_ = 0.0f;
+        this->currentFactor_ = 1.0f;
     }
 
@@ -97,7 +96,7 @@
 
         stream.clear();
-        stream << this->getShrinkSpeed();
+        stream << this->getShrinkDuration();
         std::string val3 = stream.str();
-        std::string type3 = "shrinkSpeed";
+        std::string type3 = "shrinkDuration";
         this->pickupIdentifier_->addParameter(type3, val3);
     }
@@ -105,5 +104,5 @@
    /**
     @brief
-        Method for creating a ShrinkhPickup object through XML.
+        Method for creating a ShrinkPickup object through XML.
     */
     void ShrinkPickup::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
@@ -113,5 +112,5 @@
         XMLPortParam(ShrinkPickup, "shrinkFactor", setShrinkFactor, getShrinkFactor, xmlelement, mode);
         XMLPortParam(ShrinkPickup, "duration", setDuration, getDuration, xmlelement, mode);
-        XMLPortParam(ShrinkPickup, "shrinkSpeed", setShrinkSpeed, getShrinkSpeed, xmlelement, mode);
+        XMLPortParam(ShrinkPickup, "shrinkDuration", setShrinkDuration, getShrinkDuration, xmlelement, mode);
 
         this->initializeIdentifier();
@@ -120,43 +119,5 @@
     /**
     @brief
-        Sets the shrinking factor.
-    @param factor
-        The factor.
-    */
-    void ShrinkPickup::setShrinkFactor(float factor)
-    {
-        this->shrinkFactor_ = factor;
-    }
-
-    /**
-    @brief
-        Sets the duration.
-    @param duration
-        The duration.
-    */
-    void ShrinkPickup::setDuration(float duration)
-    {
-        this->duration_ = duration;
-    }
-
-    /**
-    @brief
-        Sets the shrinking speed.
-    @param speed
-        The speed.
-    */
-    void ShrinkPickup::setShrinkSpeed(float speed)
-    {
-        this->shrinkSpeed_ = speed;
-    }
-
-    void ShrinkPickup::initialize(void)
-    {
-        this->addTarget(ClassIdentifier<Pawn>::getIdentifier());
-    }
-
-    /**
-    @brief
-        Prepares for shrinking (collecting several informations).
+        Prepares for shrinking.
     */
     void ShrinkPickup::changedUsed(void)
@@ -166,22 +127,80 @@
         if(this->isUsed())
         {
-            this->pawn_ = this->carrierToPawnHelper();
-            if(this->pawn_ == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+            Pawn* pawn = this->carrierToPawnHelper();
+            if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+            {
                 this->Pickupable::destroy();
-
-            //Collect scaling information.
-            this->defaultScale_ = this->pawn_->getScale3D();
-            this->defaultMass_ = this->pawn_->getMass();
-
-            this->smallScale_ = this->defaultScale_ / this->shrinkFactor_;
-            this->smallMass_ = this->defaultMass_ / this->shrinkFactor_;
-
-            this->actualScale_ = this->defaultScale_;
-            this->actualMass_ = this->defaultMass_;
-
-            this->cameraPositions_ = this->pawn_->getCameraPositions();
-            this->size_ = this->cameraPositions_.size();
-            this->isActive_ = true;    //start shrinking now.
-            this->durationTimer_.setTimer(this->duration_, false, createExecutor(createFunctor(&ShrinkPickup::terminate, this)));    //Set timer for termination.
+                return;
+            }
+
+            this->currentFactor_ = 1.0f;
+            this->timeRemainig_ = this->shrinkDuration_;
+
+            this->isActive_ = true; // Start shrinking now.
+            this->isShrinking_ = true;
+            this->durationTimer_.setTimer(this->duration_, false, createExecutor(createFunctor(&ShrinkPickup::terminate, this))); //Set timer for termination.
+        }
+        if(!this->isUsed() && this->isActive_)
+             this->isTerminating_ = true;
+    }
+
+    void ShrinkPickup::changedPickedUp(void)
+    {
+        SUPER(ShrinkPickup, changedPickedUp);
+        
+        if(!this->isPickedUp() && this->isActive_)
+        {
+            if(this->isShrinking_ || this->isTerminating_)
+            {
+                //TODO: Deploy particle effect.
+                Pawn* pawn = this->carrierToPawnHelper();
+                if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+                    return;
+
+                float factor = 1.0f/this->currentFactor_;
+
+                pawn->setScale3D(pawn->getScale3D()*factor);
+                pawn->setMass(pawn->getMass()*factor);
+
+                // Iterate over all camera positions and inversely move the camera to create a shrinking sensation.
+                const std::list< SmartPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
+                int size = cameraPositions.size();
+                for(int index = 0; index < size; index++)
+                {
+                    CameraPosition* cameraPos = pawn->getCameraPosition(index);
+                    if(cameraPos == NULL)
+                        continue;
+                    cameraPos->setPosition(cameraPos->getPosition()/factor);
+                }
+                this->currentFactor_ = 1.0f;
+                this->timeRemainig_ = this->shrinkDuration_;
+                this->isActive_ = false;
+                this->isShrinking_ = false;
+                this->isTerminating_ = false;
+            }
+            else
+            {
+                //TODO: Deploy particle effect.
+                Pawn* pawn = this->carrierToPawnHelper();
+                if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+                    return;
+
+                pawn->setScale3D(pawn->getScale3D()*this->shrinkFactor_);
+                pawn->setMass(pawn->getMass()*this->shrinkFactor_);
+
+                // Iterate over all camera positions and inversely move the camera to create a shrinking sensation.
+                const std::list< SmartPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
+                int size = cameraPositions.size();
+                for(int index = 0; index < size; index++)
+                {
+                    CameraPosition* cameraPos = pawn->getCameraPosition(index);
+                    if(cameraPos == NULL)
+                        continue;
+                    cameraPos->setPosition(cameraPos->getPosition()/this->shrinkFactor_);
+                }
+                this->currentFactor_ = 1.0f;
+                this->timeRemainig_ = this->shrinkDuration_;
+                this->isActive_ = false;
+            }
         }
     }
@@ -195,45 +214,90 @@
     void ShrinkPickup::tick(float dt)
     {
-        if(this->isActive_ == true && this->actualScale_ > this->smallScale_)    //if the ship has not reached the target scale, continue shrinking
+        if(this->isActive_)
         {
-            float factor = 1 + dt*this->shrinkSpeed_;
-
-            this->actualScale_ /= factor;
-            this->actualMass_ /= factor;
-
-            this->pawn_->setScale3D(this->actualScale_);
-            this->pawn_->setMass(this->actualMass_);
-
-            for(int index = 0; index < this->size_; index++)
-            {
-                CameraPosition* cameraPos = this->pawn_->getCameraPosition(index);
-                if(cameraPos == NULL)
-                continue;
-                cameraPos->setPosition(cameraPos->getPosition()*factor);
+            if(this->isShrinking_)    // If the ship has not reached the target scale, continue shrinking
+            {
+                Pawn* pawn = this->carrierToPawnHelper();
+                if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+                {
+                    this->Pickupable::destroy();
+                    return;
+                }
+
+                this->timeRemainig_ -= dt;
+
+                // Calculate the scaling factor by which the initial size would have to be scaled to have the current scale.
+                float currentFactor = std::max(1 - (1-std::max(this->timeRemainig_, 0.0f)/this->shrinkDuration_)*(1-1/this->shrinkFactor_), 1/this->shrinkFactor_);
+                // Calculate the factor by which the previous size has to be scaled to be the current scale.
+                float factor = currentFactor/this->currentFactor_;
+                this->currentFactor_ = currentFactor;
+
+                // Stop shrinking if the desired size is reached.
+                if(this->timeRemainig_ <= 0.0f)
+                {
+                    this->timeRemainig_ = this->shrinkDuration_; // Reset the time remaining for when we start to grow the ship again.
+                    this->currentFactor_ = 1/this->shrinkFactor_;
+                    this->isShrinking_ = false;
+                }
+
+                pawn->setScale3D(pawn->getScale3D()*factor);
+                pawn->setMass(pawn->getMass()*factor);
+
+                // Iterate over all camera positions and inversely move the camera to create a shrinking sensation.
+                const std::list< SmartPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
+                int size = cameraPositions.size();
+                for(int index = 0; index < size; index++)
+                {
+                    CameraPosition* cameraPos = pawn->getCameraPosition(index);
+                    if(cameraPos == NULL)
+                        continue;
+                    cameraPos->setPosition(cameraPos->getPosition()/factor);
+                }
+
+            }
+            else if(this->isTerminating_)    // Grow until the ship reaches its default scale.
+            {
+                Pawn* pawn = this->carrierToPawnHelper();
+                if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+                    this->Pickupable::destroy();
+
+                this->timeRemainig_ -= dt;
+
+                // Calculate the scaling factor by which the initial size would have to be scaled to have the current scale.
+                float currentFactor = std::min(1/this->shrinkFactor_ + (1-std::max(this->timeRemainig_, 0.0f)/this->shrinkDuration_)*(1-1/this->shrinkFactor_), 1.0f);
+                // Calculate the factor by which the previous size has to be scaled to be the current scale.
+                float factor = currentFactor/this->currentFactor_;
+                this->currentFactor_ = currentFactor;
+
+                bool destroy = false;
+                
+                // Stop shrinking if the desired size is reached.
+                if(this->timeRemainig_ <= 0.0f)
+                {
+                    this->timeRemainig_ = shrinkDuration_; // Reset the time remaining for when we start to grow the ship again.
+                    this->currentFactor_ = 1.0f;
+                    this->isTerminating_ = false;
+                    this->isActive_ = false;
+                    destroy = true;
+                }
+
+                pawn->setScale3D(pawn->getScale3D()*factor);
+                pawn->setMass(pawn->getMass()*factor);
+
+                // Iterate over all camera positions and inversely move the camera to create a shrinking sensation.
+                const std::list< SmartPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
+                int size = cameraPositions.size();
+                for(int index = 0; index < size; index++)
+                {
+                    CameraPosition* cameraPos = pawn->getCameraPosition(index);
+                    if(cameraPos == NULL)
+                        continue;
+                    cameraPos->setPosition(cameraPos->getPosition()/factor);
+                }
+
+                if(destroy)
+                    this->Pickupable::destroy();
             }
         }
-        else this->isActive_ = false;
-
-        if(this->isTerminating_ == true && this->actualScale_ < this->defaultScale_)    //grow until the ship reaches its default scale.
-        {
-            float factor = 1 + dt*this->shrinkSpeed_;
-
-            this->actualScale_ *= factor;
-            this->actualMass_ *= factor;
-
-            this->pawn_->setScale3D(this->actualScale_);
-            this->pawn_->setMass(this->actualMass_);
-
-            for(int index = 0; index < this->size_; index++)
-            {
-                CameraPosition* cameraPos = this->pawn_->getCameraPosition(index);
-                if(cameraPos == NULL)
-                continue;
-                cameraPos->setPosition(cameraPos->getPosition()/factor);
-            }
-        }
-        else if(this->isTerminating_ == true)
-            this->Pickupable::destroy();
-
     }
 
@@ -244,7 +308,5 @@
     void ShrinkPickup::terminate(void)
     {
-        this->isActive_ = false;
-        this->isTerminating_ = true;
-        setUsed(false);
+        this->setUsed(false);
     }
 
@@ -272,5 +334,5 @@
         pickup->setShrinkFactor(this->getShrinkFactor());
         pickup->setDuration(this->getDuration());
-        pickup->setShrinkSpeed(this->getShrinkSpeed());
+        pickup->setShrinkDuration(this->getShrinkDuration());
 
         pickup->initializeIdentifier();
Index: code/trunk/src/modules/pickup/items/ShrinkPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/ShrinkPickup.h	(revision 8711)
+++ code/trunk/src/modules/pickup/items/ShrinkPickup.h	(revision 8713)
@@ -21,5 +21,5 @@
  *
  *   Author:
- *      Damian 'Mozork' Frick
+ *      Sandro Sgier
  *   Co-authors:
  *      ...
@@ -48,21 +48,13 @@
 
     /**
-    @author
-        Sandro Sgier
-
-    @ingroup PickupItems
-    */
-
-    /**
     @brief
         The ShrinkPickup is a Pickupable that causes the pawn to shrink to a certain size for a certain time with a certain speed, all of them specified in the following variables:
         - The @b shrinkFactor It determines how much the ship is going to shrink (e.g. the factor 2 would make the ship shrinking to half its size).
-        - The @b duration Specifies how long the ship will keep small.
-        - The @b shrinkSpeed Defines how fast the ship shrinks and grows.
+        - The @b duration Specifies how long the ship will stay small.
+        - The @b shrinkDuration Defines how fast the ship shrinks and grows in seconds.
 
-
-        An example of a XML implementation of a HealthPickup would be:
+        An example of a XML implementation of a ShrinkPickup would be:
         @code
-        <HealthPickup
+        <ShrinkPickup
             shrinkFactor = "5.0"
             duration = "5.0"
@@ -80,19 +72,50 @@
     {
         public:
-            ShrinkPickup(BaseObject* creator); //!< Constructor.
-            virtual ~ShrinkPickup(); //!< Destructor.
-            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.
+            ShrinkPickup(BaseObject* creator); // Constructor.
+            virtual ~ShrinkPickup(); // Destructor.
+
             virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode);
+            virtual void tick(float dt);
+
+            virtual void changedUsed(void); // Is called when the pickup has transited from used to unused or the other way around.
+            virtual void changedPickedUp(void);
+            virtual void clone(OrxonoxClass*& item); // Creates a duplicate of the input OrxonoxClass.
+
+            /**
+            @brief Get the shrinking factor.
+            @return Returns the shrinking factor,
+            */
             inline float getShrinkFactor(void) const
                 { return this->shrinkFactor_; }
+            /**
+            @brief Sets the shrinking factor.
+            @param factor The factor, needs to greater than 1.
+            */
+            inline void setShrinkFactor(float factor)
+                { if(factor <= 1.0f) { COUT(2) << "Invalid shrinking factor in ShrinkPickup. Ignoring.." << endl; return; } this->shrinkFactor_ = factor; }
+            /**
+            @brief Get the duration for which the ship remains shrunken.
+            @return Returns the duration.
+            */
             inline float getDuration(void) const
                 { return this->duration_; }
-            inline float getShrinkSpeed(void) const
-                { return this->shrinkSpeed_; }
-            void setShrinkFactor(float factor);
-            void setDuration(float duration);
-            void setShrinkSpeed(float speed);
-            void tick(float dt);
+            /**
+            @brief Set the duration for which the ship remains shrunken.
+            @param duration The duration, needs to be non-negative.
+            */
+            inline void setDuration(float duration)
+                { if(duration < 0.0f) { COUT(2) << "Invalid duration in ShrinkPickup. Ignoring.." << endl; return; } this->duration_ = duration; }
+            /**
+            @brief Get the shrink speed.
+            @return Returns the shrink speed.
+            */
+            inline float getShrinkDuration(void) const
+                { return this->shrinkDuration_; }
+            /**
+            @brief Set the shrink duration.
+            @param speed The shrink duration, needs to be positive.
+            */
+            inline void setShrinkDuration(float speed)
+                { if(speed <= 0.0f) { COUT(2) << "Invalid shrink duration in ShrinkPickup. Ignoring.." << endl; return; } this->shrinkDuration_ = speed; }
 
         protected:
@@ -101,20 +124,17 @@
         private:
             void initialize(void);
-            float duration_;            //!< determines how long the pickup will be active
-            float shrinkFactor_;        //shrink factor of the space ship
-            float shrinkSpeed_;         //speed of shrinking
-            bool isActive_;             //true if ship is shrinking or small
-            bool isTerminating_;        //true if ship is growing
-            int size_;                  //number of camera positions
-            std::list<SmartPtr<CameraPosition> > cameraPositions_;
-            float defaultCameraPos_;    //all default, actual and small values...
-            Ogre::Vector3 defaultScale_;
-            Ogre::Vector3 actualScale_;
-            Ogre::Vector3 smallScale_;
-            float defaultMass_;
-            float actualMass_;
-            float smallMass_;            
+
+            float duration_;            //!< Determines how long the pickup will be active
+            float shrinkFactor_;        //!< Shrink factor of the space ship
+            float shrinkDuration_;      //!< Duration of shrinking
+
+            bool isActive_;             //!< True if ship is shrinking, small, or growing back.
+            bool isShrinking_;          //!< True if ship is shrinking
+            bool isTerminating_;        //!< True if ship is growing back to the original size
+
+            float currentFactor_;       //!< The shrink factor that is currently applied.
+            float timeRemainig_;        //!< The remaining shrink time.
+            
             Pawn* carrierToPawnHelper(void);
-            Pawn* pawn_;
             Timer durationTimer_;
             void terminate(void);
