Index: code/trunk/src/modules/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/CMakeLists.txt	(revision 9264)
+++ code/trunk/src/modules/CMakeLists.txt	(revision 9348)
@@ -38,2 +38,3 @@
 ADD_SUBDIRECTORY(weapons)
 ADD_SUBDIRECTORY(docking)
+ADD_SUBDIRECTORY(towerdefense)
Index: code/trunk/src/modules/docking/DockingController.cc
===================================================================
--- code/trunk/src/modules/docking/DockingController.cc	(revision 9264)
+++ code/trunk/src/modules/docking/DockingController.cc	(revision 9348)
@@ -60,5 +60,5 @@
 
         float distance = (this->dock_->getWorldPosition() - entity->getPosition()).length();
-        Vector2 coord = get2DViewdirection(     // I don't understand this too
+        Vector2 coord = get2DViewcoordinates(     // I don't understand this too
             entity->getPosition(),
             entity->getOrientation() * WorldEntity::FRONT,
@@ -70,6 +70,6 @@
         if (distance > 10)
         {
-            entity->rotateYaw(-1.0f * 0.8f * sgn(coord.x) * coord.x*coord.x);
-            entity->rotatePitch(0.8f * sgn(coord.y) * coord.y*coord.y);
+            entity->rotateYaw(-1.0f * 0.8f * clamp(coord.x * 10, -1.0f, 1.0f));
+            entity->rotatePitch(0.8f * clamp(coord.y * 10, -1.0f, 1.0f));
         }
 
Index: code/trunk/src/modules/gametypes/OldRaceCheckPoint.cc
===================================================================
--- code/trunk/src/modules/gametypes/OldRaceCheckPoint.cc	(revision 9264)
+++ code/trunk/src/modules/gametypes/OldRaceCheckPoint.cc	(revision 9348)
@@ -112,5 +112,5 @@
                 const std::string& message =  "You have " + multi_cast<std::string>(this->bTimeLimit_)
                             + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1);
-                const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage(message);
+                gametype->getGametypeInfo()->sendAnnounceMessage(message);
                 ChatManager::message(message);
             }
Index: code/trunk/src/modules/gametypes/OldSpaceRace.cc
===================================================================
--- code/trunk/src/modules/gametypes/OldSpaceRace.cc	(revision 9264)
+++ code/trunk/src/modules/gametypes/OldSpaceRace.cc	(revision 9348)
@@ -58,5 +58,5 @@
                         + "You didn't reach the check point " + multi_cast<std::string>(this->checkpointsReached_+1)
                         + " before the time limit. You lose!";
-            const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
+            this->getGametypeInfo()->sendAnnounceMessage(message);
             ChatManager::message(message);
         }
@@ -68,5 +68,5 @@
             const std::string& message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s)
                         + "." + multi_cast<std::string>(ms) + " seconds.";
-            const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
+            this->getGametypeInfo()->sendAnnounceMessage(message);
             ChatManager::message(message);
 /*
@@ -85,5 +85,5 @@
 
         std::string message("The match has started! Reach the check points as quickly as possible!");
-        const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
+        this->getGametypeInfo()->sendAnnounceMessage(message);
         ChatManager::message(message);
     }
@@ -98,5 +98,5 @@
                         + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
                         + " seconds.";
-        const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
+        this->getGametypeInfo()->sendAnnounceMessage(message);
         ChatManager::message(message);
     }
Index: code/trunk/src/modules/gametypes/OldSpaceRace.h
===================================================================
--- code/trunk/src/modules/gametypes/OldSpaceRace.h	(revision 9264)
+++ code/trunk/src/modules/gametypes/OldSpaceRace.h	(revision 9348)
@@ -59,4 +59,6 @@
 
             virtual void newCheckpointReached();
+            virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command.
+                                                        //<! This is only a temporary solution. Better: create racingBots.
 
             inline void setCheckpointsReached(int n)
Index: code/trunk/src/modules/gametypes/RaceCheckPoint.cc
===================================================================
--- code/trunk/src/modules/gametypes/RaceCheckPoint.cc	(revision 9264)
+++ code/trunk/src/modules/gametypes/RaceCheckPoint.cc	(revision 9348)
@@ -97,5 +97,5 @@
             std::string message =  "You have " + multi_cast<std::string>(this->timeLimit_)
                         + " seconds to reach the check point " + multi_cast<std::string>(this->checkpointIndex_ + 1);
-            const_cast<GametypeInfo*>(this->getGametype()->getGametypeInfo())->sendAnnounceMessage(message);
+            this->getGametype()->getGametypeInfo()->sendAnnounceMessage(message);
             ChatManager::message(message);
         }
Index: code/trunk/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/trunk/src/modules/gametypes/SpaceRace.cc	(revision 9264)
+++ code/trunk/src/modules/gametypes/SpaceRace.cc	(revision 9348)
@@ -23,5 +23,5 @@
  *     Mauro Salomon
  *   Co-authors:
- *      ...
+ *      Celine Egger
  *
  */
@@ -48,4 +48,6 @@
         this->cantMove_ = false;
         this->bTimeIsUp_ = false;
+        this->numberOfBots_ = 0; // quick fix: don't allow default-bots to enter the race
+                                 // remove this line, if a raceBot has been created.
     }
 
@@ -70,5 +72,5 @@
         }
 
-        const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
+        this->getGametypeInfo()->sendAnnounceMessage(message);
         ChatManager::message(message);
     }
@@ -97,5 +99,5 @@
 
             std::string message = "The match has started! Reach the check points as quickly as possible!";
-            const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
+            this->getGametypeInfo()->sendAnnounceMessage(message);
             ChatManager::message(message);
         }
@@ -112,5 +114,5 @@
         const std::string& message = "Checkpoint " + multi_cast<std::string>(checkpoint->getCheckpointIndex() + 1)
             + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds.";
-        const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
+        this->getGametypeInfo()->sendAnnounceMessage(message);
         ChatManager::message(message);
     }
Index: code/trunk/src/modules/gametypes/SpaceRaceManager.cc
===================================================================
--- code/trunk/src/modules/gametypes/SpaceRaceManager.cc	(revision 9264)
+++ code/trunk/src/modules/gametypes/SpaceRaceManager.cc	(revision 9348)
@@ -149,5 +149,5 @@
             }
             else
-			{
+            {
                 // adjust the radarvisibility
                 gametype->newCheckpointReached(newCheckpoint, player);
Index: code/trunk/src/modules/objects/triggers/CheckPoint.cc
===================================================================
--- code/trunk/src/modules/objects/triggers/CheckPoint.cc	(revision 9264)
+++ code/trunk/src/modules/objects/triggers/CheckPoint.cc	(revision 9348)
@@ -109,5 +109,5 @@
                 if (bIsDestination_)
                 {
-                    const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage("Congratulations - you have won the match!");
+                    gametype->getGametypeInfo()->sendAnnounceMessage("Congratulations - you have won the match!");
                     gametype->end();
                 }
@@ -115,5 +115,5 @@
                 if (!bIsFirst_ && !bIsDestination_)
                 {
-                    const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage("Checkpoint reached");
+                    gametype->getGametypeInfo()->sendAnnounceMessage("Checkpoint reached");
                 }
             }
Index: code/trunk/src/modules/overlays/OverlaysPrereqs.h
===================================================================
--- code/trunk/src/modules/overlays/OverlaysPrereqs.h	(revision 9264)
+++ code/trunk/src/modules/overlays/OverlaysPrereqs.h	(revision 9348)
@@ -95,5 +95,4 @@
     class PauseNotice;
     class TeamBaseMatchScore;
-    class UnderAttackHealthBar;
 
     // stats
Index: code/trunk/src/modules/overlays/hud/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/overlays/hud/CMakeLists.txt	(revision 9264)
+++ code/trunk/src/modules/overlays/hud/CMakeLists.txt	(revision 9348)
@@ -12,5 +12,4 @@
   KillMessage.cc
   DeathMessage.cc
-  UnderAttackHealthBar.cc
   TeamBaseMatchScore.cc
   GametypeStaticMessage.cc
Index: code/trunk/src/modules/overlays/hud/HUDEnemyHealthBar.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDEnemyHealthBar.cc	(revision 9264)
+++ code/trunk/src/modules/overlays/hud/HUDEnemyHealthBar.cc	(revision 9348)
Index: code/trunk/src/modules/overlays/hud/HUDEnemyHealthBar.h
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDEnemyHealthBar.h	(revision 9264)
+++ code/trunk/src/modules/overlays/hud/HUDEnemyHealthBar.h	(revision 9348)
Index: code/trunk/src/modules/overlays/hud/HUDNavigation.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDNavigation.cc	(revision 9264)
+++ code/trunk/src/modules/overlays/hud/HUDNavigation.cc	(revision 9348)
@@ -55,394 +55,373 @@
 namespace orxonox
 {
-bool compareDistance ( std::pair<RadarViewable*, unsigned int > a, std::pair<RadarViewable*, unsigned int > b )
-{
-    return a.second<b.second;
-
-}
-
-void HUDNavigation::setConfigValues()
-{
-  SetConfigValue(markerLimit_, 3);
-  SetConfigValue(showDistance, false);
-}
-
-CreateFactory ( HUDNavigation );
-
-HUDNavigation::HUDNavigation ( BaseObject* creator )
-        : OrxonoxOverlay ( creator )
-{
-    RegisterObject ( HUDNavigation );
-    this->setConfigValues();
-
-    // Set default values
-    this->setFont ( "Monofur" );
-    this->setTextSize ( 0.05f );
-    this->setNavMarkerSize ( 0.05f );
-    this->setDetectionLimit( 10000.0f );
-}
-
-HUDNavigation::~HUDNavigation()
-{
-    if ( this->isInitialized() )
-    {
-        for ( ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end(); )
-            removeObject ( ( it++ )->first );
-
-    }
-
-    sortedObjectList_.clear();
-}
-
-void HUDNavigation::XMLPort ( Element& xmlelement, XMLPort::Mode mode )
-{
-    SUPER ( HUDNavigation, XMLPort, xmlelement, mode );
-
-    XMLPortParam ( HUDNavigation, "font",          setFont,          getFont,          xmlelement, mode );
-    XMLPortParam ( HUDNavigation, "textSize",      setTextSize,      getTextSize,      xmlelement, mode );
-    XMLPortParam ( HUDNavigation, "navMarkerSize", setNavMarkerSize, getNavMarkerSize, xmlelement, mode );
-    XMLPortParam ( HUDNavigation, "detectionLimit", setDetectionLimit, getDetectionLimit, xmlelement, mode );
-}
-
-void HUDNavigation::setFont ( const std::string& font )
-{
-    const Ogre::ResourcePtr& fontPtr = Ogre::FontManager::getSingleton().getByName ( font );
-    if ( fontPtr.isNull() )
-    {
-        orxout(internal_warning) << "HUDNavigation: Font '" << font << "' not found" << endl;
-        return;
-    }
-    fontName_ = font;
-    for ( ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end(); ++it )
-    {
-        if ( it->second.text_ != NULL )
-            it->second.text_->setFontName ( fontName_ );
-    }
-}
-
-const std::string& HUDNavigation::getFont() const
-{
-    return fontName_;
-}
-
-void HUDNavigation::setTextSize ( float size )
-{
-    if ( size <= 0.0f )
-    {
-        orxout(internal_warning) << "HUDNavigation: Negative font size not allowed" << endl;
-        return;
-    }
-    textSize_ = size;
-    for ( ObjectMap::iterator it = activeObjectList_.begin(); it!=activeObjectList_.end(); ++it )
-    {
-        if ( it->second.text_ )
-            it->second.text_->setCharHeight ( size );
-    }
-}
-
-float HUDNavigation::getTextSize() const
-{
-    return textSize_;
-}
-
-float HUDNavigation::getArrowSizeX(int dist)
-{
-    if (dist < 600)
-        dist = 600;
-    return this->getActualSize().x * 900 * navMarkerSize_ / dist;
-}
-
-float HUDNavigation::getArrowSizeY(int dist)
-{
-    if (dist < 600)
-        dist = 600;
-    return this->getActualSize().y * 900 * navMarkerSize_ / dist;
-}
-
-void HUDNavigation::tick ( float dt )
-{
-    SUPER ( HUDNavigation, tick, dt );
-
-    Camera* cam = CameraManager::getInstance().getActiveCamera();
-    if ( cam == NULL )
-        return;
-    const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix();
-
-
-    for ( sortedList::iterator listIt = sortedObjectList_.begin(); listIt != sortedObjectList_.end(); ++listIt )
-    {
-        listIt->second = ( int ) ( ( listIt->first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition() ).length() + 0.5f );
-    }
-
-    sortedObjectList_.sort ( compareDistance );
-
-    unsigned int markerCount_ = 0;
-    bool closeEnough_ = false; //only display objects that are close enough to be relevant for the player
-
-//         for (ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end(); ++it)
-    for ( sortedList::iterator listIt = sortedObjectList_.begin(); listIt != sortedObjectList_.end(); ++markerCount_, ++listIt )
-    {
-        ObjectMap::iterator it = activeObjectList_.find ( listIt->first );
-        closeEnough_ = listIt->second < detectionLimit_ ;
-        // display radarviewables on HUD if the marker limit and max-distance is not exceeded
-        if ( markerCount_ < markerLimit_ && (closeEnough_ ||  detectionLimit_ < 0) )
-        {
-
-
-            // Get Distance to HumanController and save it in the TextAreaOverlayElement.
-            int dist = listIt->second;
-            float textLength = 0.0f;
-
-            //display distance next to cursor
-            if (showDistance){
-            it->second.text_->setCaption ( multi_cast<std::string> ( dist ) );
-            textLength = multi_cast<std::string> ( dist ).size() * it->second.text_->getCharHeight() * 0.3f;
-            }
-
-            //display name next to cursor
-            else{
-            it->second.text_->setCaption(it->first->getRadarName());
-            textLength = it->first->getRadarName().size() * it->second.text_->getCharHeight() * 0.3f;
-            }
-
-            // Transform to screen coordinates
-            Vector3 pos = camTransform * it->first->getRVWorldPosition();
-
-            bool outOfView = true;
-            if ( pos.z > 1.0 )
+    bool compareDistance(std::pair<RadarViewable*, unsigned int> a, std::pair<RadarViewable*, unsigned int> b)
+    {
+        return a.second < b.second;
+    }
+
+    CreateFactory ( HUDNavigation );
+
+    HUDNavigation::HUDNavigation(BaseObject* creator) : OrxonoxOverlay(creator)
+    {
+        RegisterObject(HUDNavigation);
+        this->setConfigValues();
+
+        // Set default values
+        this->setFont("Monofur");
+        this->setTextSize(0.05f);
+        this->setNavMarkerSize(0.05f);
+        this->setDetectionLimit(10000.0f);
+    }
+
+    HUDNavigation::~HUDNavigation()
+    {
+        if (this->isInitialized())
+        {
+            for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end();)
+                removeObject((it++)->first);
+        }
+        this->sortedObjectList_.clear();
+    }
+
+    void HUDNavigation::setConfigValues()
+    {
+        SetConfigValue(markerLimit_, 3);
+        SetConfigValue(showDistance_, false);
+    }
+
+    void HUDNavigation::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(HUDNavigation, XMLPort, xmlelement, mode);
+
+        XMLPortParam(HUDNavigation, "font",           setFont,           getFont,           xmlelement, mode);
+        XMLPortParam(HUDNavigation, "textSize",       setTextSize,       getTextSize,       xmlelement, mode);
+        XMLPortParam(HUDNavigation, "navMarkerSize",  setNavMarkerSize,  getNavMarkerSize,  xmlelement, mode);
+        XMLPortParam(HUDNavigation, "detectionLimit", setDetectionLimit, getDetectionLimit, xmlelement, mode);
+    }
+
+    void HUDNavigation::setFont(const std::string& font)
+    {
+        const Ogre::ResourcePtr& fontPtr = Ogre::FontManager::getSingleton().getByName(font);
+        if (fontPtr.isNull())
+        {
+            orxout(internal_warning) << "HUDNavigation: Font '" << font << "' not found" << endl;
+            return;
+        }
+        this->fontName_ = font;
+        for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)
+        {
+            if (it->second.text_ != NULL)
+                it->second.text_->setFontName(this->fontName_);
+        }
+    }
+
+    const std::string& HUDNavigation::getFont() const
+    {
+        return this->fontName_;
+    }
+
+    void HUDNavigation::setTextSize(float size)
+    {
+        if (size <= 0.0f)
+        {
+            orxout(internal_warning) << "HUDNavigation: Negative font size not allowed" << endl;
+            return;
+        }
+        this->textSize_ = size;
+        for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it!=this->activeObjectList_.end(); ++it)
+        {
+            if (it->second.text_)
+                it->second.text_->setCharHeight(size);
+        }
+    }
+
+    float HUDNavigation::getTextSize() const
+    {
+        return this->textSize_;
+    }
+
+    float HUDNavigation::getArrowSizeX(int dist) const
+    {
+        if (dist < 600)
+            dist = 600;
+        return this->getActualSize().x * 900 * this->navMarkerSize_ / dist;
+    }
+
+    float HUDNavigation::getArrowSizeY(int dist) const
+    {
+        if (dist < 600)
+            dist = 600;
+        return this->getActualSize().y * 900 * this->navMarkerSize_ / dist;
+    }
+
+    void HUDNavigation::tick(float dt)
+    {
+        SUPER(HUDNavigation, tick, dt);
+
+        Camera* cam = CameraManager::getInstance().getActiveCamera();
+        if (cam == NULL)
+            return;
+        const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix();
+
+
+        for (std::list<std::pair<RadarViewable*, unsigned int> >::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt)
+            listIt->second = (int)((listIt->first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f);
+
+        this->sortedObjectList_.sort(compareDistance);
+
+        unsigned int markerCount = 0;
+        bool closeEnough = false; // only display objects that are close enough to be relevant for the player
+
+        for (std::list<std::pair<RadarViewable*, unsigned int> >::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++markerCount, ++listIt)
+        {
+            std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.find(listIt->first);
+            closeEnough = listIt->second < this->detectionLimit_;
+            // display radarviewables on HUD if the marker limit and max-distance is not exceeded
+            if (markerCount < this->markerLimit_ && (closeEnough ||  this->detectionLimit_ < 0))
             {
-                // z > 1.0 means that the object is behind the camera
-                outOfView = true;
-                // we have to switch all coordinates (if you don't know why,
-                // try linear algebra lectures, because I can't explain..)
-                pos.x = -pos.x;
-                pos.y = -pos.y;
-            }
-            else
-                outOfView = pos.x < -1.0 || pos.x > 1.0 || pos.y < -1.0 || pos.y > 1.0;
-
-            if ( outOfView )
-            {
-                // Object is not in view
-
-                // Change material only if outOfView changed
-                if ( !it->second.wasOutOfView_ )
+                // Get Distance to HumanController and save it in the TextAreaOverlayElement.
+                int dist = listIt->second;
+                float textLength = 0.0f;
+
+                if (this->showDistance_)
                 {
-                    it->second.panel_->setMaterialName( TextureGenerator::getMaterialName( "arrows.png", it->first->getRadarObjectColour()) );
-                    it->second.wasOutOfView_ = true;
+                    //display distance next to cursor
+                    it->second.text_->setCaption(multi_cast<std::string>(dist));
+                    textLength = multi_cast<std::string>(dist).size() * it->second.text_->getCharHeight() * 0.3f;
                 }
-
-                //float xDistScale = this->getActualSize().x * 1000.0f * navMarkerSize_ / dist;
-                //float yDistScale = this->getActualSize().y * 1000.0f * navMarkerSize_ / dist;
-
-                // Adjust Arrowsize according to distance
-                it->second.panel_->setDimensions(getArrowSizeX(dist),getArrowSizeY(dist));
-
-                // Switch between top, bottom, left and right position of the arrow at the screen border
-                if ( pos.x < pos.y )
+                else
                 {
-                    if ( pos.y > -pos.x )
+                    //display name next to cursor
+                    it->second.text_->setCaption(it->first->getRadarName());
+                    textLength = it->first->getRadarName().size() * it->second.text_->getCharHeight() * 0.3f;
+                }
+
+                // Transform to screen coordinates
+                Vector3 pos = camTransform * it->first->getRVWorldPosition();
+
+                bool outOfView = true;
+                if (pos.z > 1.0)
+                {
+                    // z > 1.0 means that the object is behind the camera
+                    outOfView = true;
+                    // we have to switch all coordinates (if you don't know why,
+                    // try linear algebra lectures, because I can't explain..)
+                    pos.x = -pos.x;
+                    pos.y = -pos.y;
+                }
+                else
+                    outOfView = pos.x < -1.0 || pos.x > 1.0 || pos.y < -1.0 || pos.y > 1.0;
+
+                if (outOfView)
+                {
+                    // Object is not in view
+
+                    // Change material only if outOfView changed
+                    if (!it->second.wasOutOfView_)
                     {
-                        // Top
-                        float position = pos.x / pos.y + 1.0f;
-                        it->second.panel_->setPosition ( ( position - it->second.panel_->getWidth() ) * 0.5f, 0.0f );
-                        it->second.panel_->setUV ( 0.5f, 0.0f, 1.0f, 0.5f );
-                        it->second.text_->setLeft ( ( position - textLength ) * 0.5f );
-                        it->second.text_->setTop ( it->second.panel_->getHeight() );
+                        it->second.panel_->setMaterialName(TextureGenerator::getMaterialName("arrows.png", it->first->getRadarObjectColour()));
+                        it->second.wasOutOfView_ = true;
+                    }
+
+                    //float xDistScale = this->getActualSize().x * 1000.0f * this->navMarkerSize_ / dist;
+                    //float yDistScale = this->getActualSize().y * 1000.0f * this->navMarkerSize_ / dist;
+
+                    // Adjust Arrowsize according to distance
+                    it->second.panel_->setDimensions(getArrowSizeX(dist), getArrowSizeY(dist));
+
+                    // Switch between top, bottom, left and right position of the arrow at the screen border
+                    if (pos.x < pos.y)
+                    {
+                        if (pos.y > -pos.x)
+                        {
+                            // Top
+                            float position = pos.x / pos.y + 1.0f;
+                            it->second.panel_->setPosition((position - it->second.panel_->getWidth()) * 0.5f, 0.0f);
+                            it->second.panel_->setUV(0.5f, 0.0f, 1.0f, 0.5f);
+                            it->second.text_->setLeft((position - textLength) * 0.5f);
+                            it->second.text_->setTop(it->second.panel_->getHeight());
+                        }
+                        else
+                        {
+                            // Left
+                            float position = pos.y / pos.x + 1.0f;
+                            it->second.panel_->setPosition(0.0f, (position - it->second.panel_->getWidth()) * 0.5f);
+                            it->second.panel_->setUV(0.0f, 0.0f, 0.5f, 0.5f);
+                            it->second.text_->setLeft(it->second.panel_->getWidth() + 0.01f);
+                            it->second.text_->setTop((position - it->second.text_->getCharHeight()) * 0.5f);
+                        }
                     }
                     else
                     {
-                        // Left
-                        float position = pos.y / pos.x + 1.0f;
-                        it->second.panel_->setPosition ( 0.0f, ( position - it->second.panel_->getWidth() ) * 0.5f );
-                        it->second.panel_->setUV ( 0.0f, 0.0f, 0.5f, 0.5f );
-                        it->second.text_->setLeft ( it->second.panel_->getWidth() + 0.01f );
-                        it->second.text_->setTop ( ( position - it->second.text_->getCharHeight() ) * 0.5f );
+                        if (pos.y < -pos.x)
+                        {
+                            // Bottom
+                            float position = -pos.x / pos.y + 1.0f;
+                            it->second.panel_->setPosition((position - it->second.panel_->getWidth()) * 0.5f, 1.0f - it->second.panel_->getHeight());
+                            it->second.panel_->setUV(0.0f, 0.5f, 0.5f, 1.0f );
+                            it->second.text_->setLeft((position - textLength) * 0.5f);
+                            it->second.text_->setTop(1.0f - it->second.panel_->getHeight() - it->second.text_->getCharHeight());
+                        }
+                        else
+                        {
+                            // Right
+                            float position = -pos.y / pos.x + 1.0f;
+                            it->second.panel_->setPosition(1.0f - it->second.panel_->getWidth(), (position - it->second.panel_->getHeight()) * 0.5f);
+                            it->second.panel_->setUV(0.5f, 0.5f, 1.0f, 1.0f);
+                            it->second.text_->setLeft(1.0f - it->second.panel_->getWidth() - textLength - 0.01f);
+                            it->second.text_->setTop((position - it->second.text_->getCharHeight()) * 0.5f);
+                        }
                     }
                 }
-
                 else
                 {
-
-                    if ( pos.y < -pos.x )
+                    // Object is in view
+
+                    // Change material only if outOfView changed
+                    if (it->second.wasOutOfView_)
                     {
-                        // Bottom
-                        float position = -pos.x / pos.y + 1.0f;
-                        it->second.panel_->setPosition ( ( position - it->second.panel_->getWidth() ) * 0.5f, 1.0f - it->second.panel_->getHeight() );
-                        it->second.panel_->setUV ( 0.0f, 0.5f, 0.5f, 1.0f );
-                        it->second.text_->setLeft ( ( position - textLength ) * 0.5f );
-                        it->second.text_->setTop ( 1.0f - it->second.panel_->getHeight() - it->second.text_->getCharHeight() );
+                        //it->second.panel_->setMaterialName("Orxonox/NavTDC");
+                        it->second.panel_->setMaterialName(TextureGenerator::getMaterialName("tdc.png", it->first->getRadarObjectColour()));
+                        it->second.panel_->setDimensions(this->navMarkerSize_ * this->getActualSize().x, this->navMarkerSize_ * this->getActualSize().y);
+                        it->second.wasOutOfView_ = false;
                     }
-                    else
-                    {
-                        // Right
-                        float position = -pos.y / pos.x + 1.0f;
-                        it->second.panel_->setPosition ( 1.0f - it->second.panel_->getWidth(), ( position - it->second.panel_->getHeight() ) * 0.5f );
-                        it->second.panel_->setUV ( 0.5f, 0.5f, 1.0f, 1.0f );
-                        it->second.text_->setLeft ( 1.0f - it->second.panel_->getWidth() - textLength - 0.01f );
-                        it->second.text_->setTop ( ( position - it->second.text_->getCharHeight() ) * 0.5f );
-                    }
+
+                    // Position marker
+                    it->second.panel_->setUV(0.0f, 0.0f, 1.0f, 1.0f);
+                    it->second.panel_->setLeft((pos.x + 1.0f - it->second.panel_->getWidth()) * 0.5f);
+                    it->second.panel_->setTop((-pos.y + 1.0f - it->second.panel_->getHeight()) * 0.5f);
+
+                    // Position text
+                    it->second.text_->setLeft((pos.x + 1.0f + it->second.panel_->getWidth()) * 0.5f);
+                    it->second.text_->setTop((-pos.y + 1.0f + it->second.panel_->getHeight()) * 0.5f);
                 }
+
+                // Make sure the overlays are shown
+                it->second.panel_->show();
+                it->second.text_->show();
             }
-            else
+            else // do not display on HUD
             {
-                // Object is in view
-
-                // Change material only if outOfView changed
-                if ( it->second.wasOutOfView_ )
-                {
-                  //it->second.panel_->setMaterialName ( "Orxonox/NavTDC" );
-                    it->second.panel_->setMaterialName( TextureGenerator::getMaterialName( "tdc.png", it->first->getRadarObjectColour()) );
-                    it->second.panel_->setDimensions ( navMarkerSize_ * this->getActualSize().x, navMarkerSize_ * this->getActualSize().y );
-                    it->second.wasOutOfView_ = false;
-                }
-
-                // Position marker
-                it->second.panel_->setUV ( 0.0f, 0.0f, 1.0f, 1.0f );
-                it->second.panel_->setLeft ( ( pos.x + 1.0f - it->second.panel_->getWidth() ) * 0.5f );
-                it->second.panel_->setTop ( ( -pos.y + 1.0f - it->second.panel_->getHeight() ) * 0.5f );
-
-                // Position text
-                it->second.text_->setLeft ( ( pos.x + 1.0f + it->second.panel_->getWidth() ) * 0.5f );
-                it->second.text_->setTop ( ( -pos.y + 1.0f + it->second.panel_->getHeight() ) * 0.5f );
+                it->second.panel_->hide();
+                it->second.text_->hide();
             }
-
-            // Make sure the overlays are shown
-            it->second.panel_->show();
-            it->second.text_->show();
-        }
-        else // do not display on HUD
-        {
-            it->second.panel_->hide();
-            it->second.text_->hide();
-        }
-
+        }
+    }
+
+    /** Overridden method of OrxonoxOverlay.
+    @details
+        Usually the entire overlay scales with scale().
+        Here we obviously have to adjust this.
+    */
+    void HUDNavigation::sizeChanged()
+    {
+        // Use size to compensate for aspect ratio if enabled.
+        float xScale = this->getActualSize().x;
+        float yScale = this->getActualSize().y;
+
+        for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)
+        {
+            if (it->second.panel_ != NULL)
+                it->second.panel_->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);
+            if (it->second.text_ != NULL)
+                it->second.text_->setCharHeight(it->second.text_->getCharHeight() * yScale);
+        }
+    }
+
+    void HUDNavigation::addObject(RadarViewable* object)
+    {
+        if (showObject(object) == false)
+            return;
+
+        if (this->activeObjectList_.size() >= this->markerLimit_)
+            if (object == NULL)
+                return;
+
+        // Object hasn't been added yet (we know that)
+        assert(this->activeObjectList_.find(object) == this->activeObjectList_.end());
+
+        // Scales used for dimensions and text size
+        float xScale = this->getActualSize().x;
+        float yScale = this->getActualSize().y;
+
+        // Create everything needed to display the object on the radar and add it to the map
+
+        // Create arrow/marker
+        Ogre::PanelOverlayElement* panel = static_cast<Ogre::PanelOverlayElement*>( Ogre::OverlayManager::getSingleton()
+                                           .createOverlayElement("Panel", "HUDNavigation_navMarker_" + getUniqueNumberString()));
+        //panel->setMaterialName("Orxonox/NavTDC");
+        panel->setMaterialName(TextureGenerator::getMaterialName("tdc.png", object->getRadarObjectColour()));
+        panel->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);
+        //panel->setColour(object->getRadarObjectColour());
+
+        Ogre::TextAreaOverlayElement* text = static_cast<Ogre::TextAreaOverlayElement*>( Ogre::OverlayManager::getSingleton()
+                                             .createOverlayElement("TextArea", "HUDNavigation_navText_" + getUniqueNumberString()));
+        text->setFontName(this->fontName_);
+        text->setCharHeight(text->getCharHeight() * yScale);
+        text->setColour(object->getRadarObjectColour());
+
+        panel->hide();
+        text->hide();
+
+        ObjectInfo tempStruct = {panel, text, false /*, TODO: initialize wasOutOfView_ */};
+        this->activeObjectList_[object] = tempStruct;
+
+        this->background_->addChild(panel);
+        this->background_->addChild(text);
+
+        this->sortedObjectList_.push_front(std::make_pair(object, (unsigned int)0));
+    }
+
+    void HUDNavigation::removeObject(RadarViewable* viewable)
+    {
+        std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.find(viewable);
+
+        if (this->activeObjectList_.find(viewable) != this->activeObjectList_.end())
+        {
+            // Detach overlays
+            this->background_->removeChild(it->second.panel_->getName());
+            this->background_->removeChild(it->second.text_->getName());
+            // Properly destroy the overlay elements (do not use delete!)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second.panel_);
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second.text_);
+            // Remove from the list
+            this->activeObjectList_.erase(viewable);
+        }
+
+        for (std::list<std::pair<RadarViewable*, unsigned int> >::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt)
+        {
+            if ((listIt->first) == viewable)
+            {
+                this->sortedObjectList_.erase(listIt);
+                break;
+            }
+        }
+    }
+
+    void HUDNavigation::objectChanged(RadarViewable* viewable)
+    {
+        // TODO: niceification neccessary ;)
+        removeObject(viewable);
+        addObject(viewable);
+    }
+
+    bool HUDNavigation::showObject(RadarViewable* rv)
+    {
+        if (rv == orxonox_cast<RadarViewable*>(this->getOwner()))
+            return false;
+        assert(rv->getWorldEntity());
+        if (rv->getWorldEntity()->isVisible() == false || rv->getRadarVisibility() == false)
+            return false;
+        return true;
+    }
+
+    void HUDNavigation::changedOwner()
+    {
+        const std::set<RadarViewable*>& respawnObjects = this->getOwner()->getScene()->getRadar()->getRadarObjects();
+        for (std::set<RadarViewable*>::const_iterator it = respawnObjects.begin(); it != respawnObjects.end(); ++it)
+        {
+            if (!(*it)->isHumanShip_)
+                this->addObject(*it);
+        }
     }
 }
-
-
-/** Overridden method of OrxonoxOverlay.
-@details
-    Usually the entire overlay scales with scale().
-    Here we obviously have to adjust this.
-*/
-void HUDNavigation::sizeChanged()
-{
-    // Use size to compensate for aspect ratio if enabled.
-    float xScale = this->getActualSize().x;
-    float yScale = this->getActualSize().y;
-
-    for ( ObjectMap::iterator it = activeObjectList_.begin(); it!=activeObjectList_.end(); ++it )
-    {
-        if ( it->second.panel_ != NULL )
-            it->second.panel_->setDimensions ( navMarkerSize_ * xScale, navMarkerSize_ * yScale );
-        if ( it->second.text_ != NULL )
-            it->second.text_->setCharHeight ( it->second.text_->getCharHeight() * yScale );
-    }
-}
-
-void HUDNavigation::addObject ( RadarViewable* object )
-{
-    if( showObject(object)==false )
-        return;
-
-    if ( activeObjectList_.size() >= markerLimit_ )
-        if ( object == NULL )
-            return;
-
-    // Object hasn't been added yet (we know that)
-    assert ( this->activeObjectList_.find ( object ) == this->activeObjectList_.end() );
-
-    // Scales used for dimensions and text size
-    float xScale = this->getActualSize().x;
-    float yScale = this->getActualSize().y;
-
-    // Create everything needed to display the object on the radar and add it to the map
-
-    // Create arrow/marker
-    Ogre::PanelOverlayElement* panel = static_cast<Ogre::PanelOverlayElement*> ( Ogre::OverlayManager::getSingleton()
-                                       .createOverlayElement ( "Panel", "HUDNavigation_navMarker_" + getUniqueNumberString() ) );
-//     panel->setMaterialName ( "Orxonox/NavTDC" );
-    panel->setMaterialName( TextureGenerator::getMaterialName( "tdc.png", object->getRadarObjectColour()) );
-    panel->setDimensions ( navMarkerSize_ * xScale, navMarkerSize_ * yScale );
-//     panel->setColour( object->getRadarObjectColour() );
-
-    Ogre::TextAreaOverlayElement* text = static_cast<Ogre::TextAreaOverlayElement*> ( Ogre::OverlayManager::getSingleton()
-                                         .createOverlayElement ( "TextArea", "HUDNavigation_navText_" + getUniqueNumberString() ) );
-    text->setFontName ( this->fontName_ );
-    text->setCharHeight ( text->getCharHeight() * yScale );
-    text->setColour( object->getRadarObjectColour() );
-
-    panel->hide();
-    text->hide();
-
-    ObjectInfo tempStruct = {panel, text, false /*, TODO: initialize wasOutOfView_ */};
-    activeObjectList_[object] = tempStruct;
-
-    this->background_->addChild ( panel );
-    this->background_->addChild ( text );
-
-    sortedObjectList_.push_front ( std::make_pair ( object, ( unsigned int ) 0 ) );
-
-
-}
-
-void HUDNavigation::removeObject ( RadarViewable* viewable )
-{
-    ObjectMap::iterator it = activeObjectList_.find ( viewable );
-
-    if ( activeObjectList_.find ( viewable ) != activeObjectList_.end() )
-    {
-        // Detach overlays
-        this->background_->removeChild ( it->second.panel_->getName() );
-        this->background_->removeChild ( it->second.text_->getName() );
-        // Properly destroy the overlay elements (do not use delete!)
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement ( it->second.panel_ );
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement ( it->second.text_ );
-        // Remove from the list
-        activeObjectList_.erase ( viewable );
-
-
-    }
-
-    for ( sortedList::iterator listIt = sortedObjectList_.begin(); listIt != sortedObjectList_.end(); ++listIt )
-    {
-        if ( (listIt->first) == viewable )
-        {
-            sortedObjectList_.erase ( listIt );
-            break;
-        }
-
-    }
-
-}
-
-void HUDNavigation::objectChanged(RadarViewable* viewable)
-{
-    // TODO: niceification neccessary ;)
-    removeObject(viewable);
-    addObject(viewable);
-}
-
-
-bool HUDNavigation::showObject(RadarViewable* rv)
-{
-    if ( rv == dynamic_cast<RadarViewable*> ( this->getOwner() ) )
-        return false;
-    assert( rv->getWorldEntity() );
-    if ( rv->getWorldEntity()->isVisible()==false || rv->getRadarVisibility()==false )
-        return false;
-    return true;
-}
-
-void HUDNavigation::changedOwner()
-{
-
-    const std::set<RadarViewable*>& respawnObjects = this->getOwner()->getScene()->getRadar()->getRadarObjects();
-    for ( std::set<RadarViewable*>::const_iterator it = respawnObjects.begin(); it != respawnObjects.end(); ++it )
-    {
-        if ( ! ( *it )->isHumanShip_ )
-            this->addObject ( *it );
-    }
-}
-
-}
Index: code/trunk/src/modules/overlays/hud/HUDNavigation.h
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDNavigation.h	(revision 9264)
+++ code/trunk/src/modules/overlays/hud/HUDNavigation.h	(revision 9348)
@@ -36,5 +36,4 @@
 #include <string>
 
-
 #include "util/OgreForwardRefs.h"
 #include "tools/interfaces/Tickable.h"
@@ -44,77 +43,76 @@
 namespace orxonox
 {
-class _OverlaysExport HUDNavigation : public OrxonoxOverlay, public Tickable, public RadarListener
-{
-public:
-    HUDNavigation ( BaseObject* creator );
-    virtual ~HUDNavigation();
+    class _OverlaysExport HUDNavigation : public OrxonoxOverlay, public Tickable, public RadarListener
+    {
+        public:
+            HUDNavigation(BaseObject* creator);
+            virtual ~HUDNavigation();
 
-    void setConfigValues();
+            void setConfigValues();
 
-    virtual void XMLPort ( Element& xmlelement, XMLPort::Mode mode );
-    virtual void tick ( float dt );
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void tick(float dt);
 
-    // RadarListener interface
-    virtual void addObject ( RadarViewable* object );
-    virtual void removeObject ( RadarViewable* viewable );
-    virtual void objectChanged ( RadarViewable* viewable );
+            // RadarListener interface
+            virtual void addObject(RadarViewable* object);
+            virtual void removeObject(RadarViewable* viewable);
+            virtual void objectChanged(RadarViewable* viewable);
 
-    virtual void changedOwner();
-    virtual void sizeChanged();
-    virtual void angleChanged() { }
-    virtual void positionChanged() { }
-    virtual void radarTick ( float dt ) {}
+            virtual void changedOwner();
+            virtual void sizeChanged();
+            virtual void angleChanged() { }
+            virtual void positionChanged() { }
+            virtual void radarTick(float dt) {}
 
-    inline float getRadarSensitivity() const
-    { return 1.0f; }
+            inline float getRadarSensitivity() const
+                { return 1.0f; }
 
-    unsigned int getMarkerLimit() { return this->markerLimit_; }
+            inline unsigned int getMarkerLimit() const
+                { return this->markerLimit_; }
 
-private:
-    struct ObjectInfo
-    {
-        Ogre::PanelOverlayElement* panel_;
-        Ogre::TextAreaOverlayElement* text_;
-        bool outOfView_;
-        bool wasOutOfView_;
+        private:
+            struct ObjectInfo
+            {
+                Ogre::PanelOverlayElement* panel_;
+                Ogre::TextAreaOverlayElement* text_;
+                bool outOfView_;
+                bool wasOutOfView_;
+            };
 
+            bool showObject(RadarViewable* rv);
+
+            // XMLPort accessors
+            inline void setNavMarkerSize(float size)
+            {
+                navMarkerSize_ = size;
+                this->sizeChanged();
+            }
+            inline float getNavMarkerSize() const
+                { return navMarkerSize_; }
+            inline void setDetectionLimit(float limit)
+                { this->detectionLimit_ = limit; }
+            inline float getDetectionLimit() const
+                { return this->detectionLimit_; }
+
+            void setTextSize(float size);
+            float getTextSize() const;
+
+            void setFont(const std::string& font);
+            const std::string& getFont() const;
+
+            float getArrowSizeX(int dist) const;
+            float getArrowSizeY(int dist) const;
+
+            std::map<RadarViewable*, ObjectInfo> activeObjectList_;
+            std::list<std::pair<RadarViewable*, unsigned int> > sortedObjectList_;
+
+            float navMarkerSize_;
+            std::string fontName_;
+            float textSize_;
+            bool showDistance_;
+
+            unsigned int markerLimit_;
+            float detectionLimit_; //!< Objects that are more far away than detectionLimit_ are not displayed on the HUD. 10000.0f is the default value.
     };
-
-    bool showObject( RadarViewable* rv );
-
-    // XMLPort accessors
-    void setNavMarkerSize ( float size )
-        { navMarkerSize_ = size; this->sizeChanged(); }
-    float getNavMarkerSize() const
-        { return navMarkerSize_; }
-    void setDetectionLimit( float limit ) 
-        { this->detectionLimit_ = limit; } 
-    float getDetectionLimit() const 
-        { return this->detectionLimit_; }
-
-    void setTextSize ( float size );
-    float getTextSize() const;
-
-    void setFont ( const std::string& font );
-    const std::string& getFont() const;
-
-    typedef std::map<RadarViewable*, ObjectInfo > ObjectMap;
-    ObjectMap activeObjectList_;
-
-    typedef std::list < std::pair<RadarViewable*, unsigned int > > sortedList;
-    sortedList sortedObjectList_;
-
-    float getArrowSizeX(int dist);    
-    float getArrowSizeY(int dist);
-
-    float navMarkerSize_;
-    std::string fontName_;
-    float textSize_;
-    bool showDistance;
-
-    unsigned int markerLimit_;
-    float detectionLimit_; //!< Objects that are more far away than detectionLimit_ are not displayed on the HUD. 10000.0f is the default value. 
-
-};
 }
 
Index: code/trunk/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDRadar.cc	(revision 9264)
+++ code/trunk/src/modules/overlays/hud/HUDRadar.cc	(revision 9348)
@@ -92,5 +92,5 @@
     void HUDRadar::addObject(RadarViewable* object)
     {
-        if (object == dynamic_cast<RadarViewable*>(this->owner_))
+        if (object == orxonox_cast<RadarViewable*>(this->owner_))
             return;
         if( showObject(object) == false ) //do not show objects that are "invisible" or "radar invisible"
@@ -189,5 +189,5 @@
     bool HUDRadar::showObject(RadarViewable* rv)
     {
-        if ( rv == dynamic_cast<RadarViewable*> ( this->getOwner() ) )
+        if ( rv == orxonox_cast<RadarViewable*> ( this->getOwner() ) )
             return false;
         assert( rv->getWorldEntity() );
Index: code/trunk/src/modules/overlays/hud/UnderAttackHealthBar.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/UnderAttackHealthBar.cc	(revision 9264)
+++ 	(revision )
@@ -1,108 +1,0 @@
-/*
- *   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:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "UnderAttackHealthBar.h"
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "infos/PlayerInfo.h"
-#include "gametypes/UnderAttack.h"
-#include "worldentities/pawns/Destroyer.h"
-#include "overlays/OverlayGroup.h"
-
-namespace orxonox
-{
-    CreateFactory(UnderAttackHealthBar);
-
-    UnderAttackHealthBar::UnderAttackHealthBar(BaseObject* creator) : HUDHealthBar(creator)
-    {
-        RegisterObject(UnderAttackHealthBar);
-
-        this->owner_ = 0;
-
-        this->text_ = new OverlayText(this);
-        this->text_->setFont("Monofur");
-        this->text_->setTextSize(0.04f);
-        this->text_->setAlignmentString("center");
-        this->text_->setColour(ColourValue::White);
-        this->text_->setPickPoint(Vector2(0.5, 0));
-
-        this->inittimer_.setTimer(0.0f, false, createExecutor(createFunctor(&UnderAttackHealthBar::init, this)));
-    }
-
-    UnderAttackHealthBar::~UnderAttackHealthBar()
-    {
-        if (this->isInitialized())
-        {
-            this->text_->destroy();
-            this->text_ = 0;
-        }
-    }
-
-    void UnderAttackHealthBar::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(UnderAttackHealthBar, XMLPort, xmlelement, mode);
-
-        XMLPortParam(UnderAttackHealthBar, "descriptionpickpoint", setDescriptionPickPoint, getDescriptionPickPoint, xmlelement, mode);
-        XMLPortParam(UnderAttackHealthBar, "descriptionoffset", setDescriptionOffset, getDescriptionOffset, xmlelement, mode);
-    }
-
-    void UnderAttackHealthBar::changedOwner()
-    {
-        SUPER(UnderAttackHealthBar, changedOwner);
-
-        PlayerInfo* player = orxonox_cast<PlayerInfo*>(this->getOwner());
-        if (player)
-        {
-            this->owner_ = player;
-
-            UnderAttack* ua = orxonox_cast<UnderAttack*>(player->getGametype().get());
-            if (ua)
-            {
-                this->setOwner(ua->getDestroyer());
-
-                if (ua->getTeam(player) == 0)
-                    this->text_->setCaption("Attack the Transporter!");
-                else
-                    this->text_->setCaption("Defend the Transporter!");
-            }
-        }
-    }
-
-    void UnderAttackHealthBar::changedOverlayGroup()
-    {
-        SUPER(UnderAttackHealthBar, changedOverlayGroup);
-
-        this->getOverlayGroup()->addElement(this->text_.get());
-    }
-
-    void UnderAttackHealthBar::init()
-    {
-        this->setOwner(this->owner_);
-    }
-}
Index: code/trunk/src/modules/overlays/hud/UnderAttackHealthBar.h
===================================================================
--- code/trunk/src/modules/overlays/hud/UnderAttackHealthBar.h	(revision 9264)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/*
- *   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:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _UnderAttackHealthBar_H__
-#define _UnderAttackHealthBar_H__
-
-#include "overlays/OverlaysPrereqs.h"
-
-#include "util/Math.h"
-#include "tools/Timer.h"
-#include "HUDHealthBar.h"
-
-namespace orxonox
-{
-    class _OverlaysExport UnderAttackHealthBar : public HUDHealthBar
-    {
-        public:
-            UnderAttackHealthBar(BaseObject* creator);
-            virtual ~UnderAttackHealthBar();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            virtual void changedOwner();
-            virtual void changedOverlayGroup();
-
-            inline void setDescriptionPickPoint(const Vector2& pickpoint)
-                { this->text_->setPickPoint(pickpoint); }
-            inline Vector2 getDescriptionPickPoint() const
-                { return this->text_->getPickPoint(); }
-
-            inline void setDescriptionOffset(const Vector2& position)
-                { this->text_->setPosition(this->getPosition() + (position - this->getPickPoint()) * this->getSize()); }
-            inline Vector2 getDescriptionOffset() const
-                { return (this->text_->getPosition() - this->getPosition()) / this->getSize() + this->getPickPoint(); }
-
-        private:
-            void init();
-
-            PlayerInfo* owner_;
-            SmartPtr<OverlayText> text_;
-            Timer inittimer_;
-    };
-}
-#endif /* _UnderAttackHealthBar_H__ */
Index: code/trunk/src/modules/pickup/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/pickup/CMakeLists.txt	(revision 9264)
+++ code/trunk/src/modules/pickup/CMakeLists.txt	(revision 9348)
@@ -1,8 +1,6 @@
 SET_SOURCE_FILES(PICKUP_SRC_FILES
   CollectiblePickup.cc
-  DroppedPickup.cc
   Pickup.cc
   PickupCollection.cc
-  PickupCollectionIdentifier.cc
   PickupManager.cc
   PickupRepresentation.cc
Index: code/trunk/src/modules/pickup/CollectiblePickup.cc
===================================================================
--- code/trunk/src/modules/pickup/CollectiblePickup.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/CollectiblePickup.cc	(revision 9348)
@@ -45,9 +45,7 @@
         Registers the object and initializes variables.
     */
-    CollectiblePickup::CollectiblePickup() : isInCollection_(false)
+    CollectiblePickup::CollectiblePickup() : collection_(NULL)
     {
         RegisterObject(CollectiblePickup);
-
-        this->collection_ = NULL;
     }
 
@@ -58,49 +56,6 @@
     CollectiblePickup::~CollectiblePickup()
     {
-
-    }
-
-    /**
-    @brief
-        Is called by OrxonoxClass::destroy() before the object is actually destroyed.
-    */
-    void CollectiblePickup::preDestroy(void)
-    {
-        this->Pickupable::preDestroy();
-
-        // The PickupCollection has to be destroyed as well.
-        if(this->isInCollection())
-            this->collection_->Pickupable::destroy();
-    }
-
-    /**
-    @brief
-        Destroys a Pickupable.
-    */
-    void CollectiblePickup::destroyPickup(void)
-    {
-        if(!this->isInCollection()) // If the CollectiblePickup is not in a PickupCollection the destroyPickup method of Pickupable is called.
-            this->Pickupable::destroyPickup();
-        else // Else the ColectiblePickup is dropped and disabled,
-        {
-            this->drop(false);
-            if(this->isInCollection() && this->isEnabled()) // It is only disabled if it is enabled and still ina PickupCollection after having been dropped.
-            {
-                this->setDisabled();
-                this->collection_->pickupDisabled();
-            }
-        }
-    }
-
-    /**
-    @brief
-        Is called by the PickupCarrier when it is being destroyed.
-    */
-    void CollectiblePickup::carrierDestroyed(void)
-    {
-        if(!this->isInCollection())
-            this->Pickupable::destroy();
-        else // If the CollectiblePickup is part of a PickupCollection it is just dropped instead of destroyed.
-            this->drop(false);
+        if (this->isInCollection())
+            this->collection_->removePickupable(this);
     }
 
@@ -131,35 +86,20 @@
     /**
     @brief
-        Adds this CollectiblePickup to the input PickupCollection.
+        Notifies this CollectiblePickup that it was added to a PickupCollection.
     @param collection
         A pointer to the PickupCollection to which the CollectiblePickup should be added.
-    @return
-        Returns true if the CollectiblePickup was successfully added to the PickupCollection.
     */
-    bool CollectiblePickup::addToCollection(PickupCollection* collection)
+    void CollectiblePickup::wasAddedToCollection(PickupCollection* collection)
     {
-        if(this->isInCollection() || collection == NULL) //If the CollectiblePickup already is in a PickupCollection or if the input pointer is NULL.
-            return false;
-
-        this->isInCollection_ = true;
         this->collection_ = collection;
-        return true;
     }
 
     /**
     @brief
-        Removes this CollectiblePickup from its PickupCollection.
-    @return
-        Returns true if the CollectiblePickup was succcessfully removed.
+        Notifies this CollectiblePickup that it was removed from its PickupCollection.
     */
-    bool CollectiblePickup::removeFromCollection(void)
+    void CollectiblePickup::wasRemovedFromCollection(void)
     {
-        if(!this->isInCollection()) //If the CollectiblePickup is not in a PickupCollection.
-            return false;
-
-        this->isInCollection_ = false;
         this->collection_ = NULL;
-        return true;
     }
-
 }
Index: code/trunk/src/modules/pickup/CollectiblePickup.h
===================================================================
--- code/trunk/src/modules/pickup/CollectiblePickup.h	(revision 9264)
+++ code/trunk/src/modules/pickup/CollectiblePickup.h	(revision 9348)
@@ -55,4 +55,5 @@
     class _PickupExport CollectiblePickup : public Pickupable
     {
+        friend class PickupCollection;
 
         public:
@@ -68,19 +69,11 @@
             */
             bool isInCollection(void) const
-                { return this->isInCollection_; }
-
-            bool addToCollection(PickupCollection* collection); //!< Adds this CollectiblePickup to the input PickupCollection.
-            bool removeFromCollection(void); //!< Removes this CollectiblePickup from its PickupCollection.
-
-            void carrierDestroyed(void); //!< Is called by the PickupCarrier when it is being destroyed.
-
-        protected:
-            virtual void preDestroy(void); //!< Is called by OrxonoxClass::destroy() before the object is actually destroyed.
-            virtual void destroyPickup(void); //!< Destroys a Pickupable.
+                { return this->collection_ != NULL; }
 
         private:
-            bool isInCollection_; //!< True if the CollectiblePickup is in a PickupCollection.
+            void wasAddedToCollection(PickupCollection* collection);
+            void wasRemovedFromCollection(void);
+
             PickupCollection* collection_; //!< A pointer to the PickupCollection this CollectiblePickup is in.
-
     };
 }
Index: code/trunk/src/modules/pickup/DroppedPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/DroppedPickup.cc	(revision 9264)
+++ 	(revision )
@@ -1,96 +1,0 @@
-/*
- *   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:
- *      Daniel 'Huty' Haggenmueller
- *   Co-authors:
- *      Damian 'Mozork' Frick
- *
- */
-
-/**
-    @file DroppedPickup.cc
-    @brief Implementation of the DroppedPickup class.
-*/
-
-#include "DroppedPickup.h"
-
-#include "core/CoreIncludes.h"
-
-#include "interfaces/Pickupable.h"
-#include "interfaces/PickupCarrier.h"
-
-namespace orxonox
-{
-
-    CreateFactory(DroppedPickup);
-
-    /**
-    @brief
-        Default constructor. Registers object and sets default values.
-    */
-    DroppedPickup::DroppedPickup(BaseObject* creator) : PickupSpawner(creator)
-    {
-        RegisterObject(DroppedPickup);
-    }
-
-    /**
-    @brief
-        Constructor. Registers the object and sets values.
-    @param creator
-        The creator of the DroppedPickup.
-    @param pickup
-        The Pickupable that was dropped.
-    @param carrier
-        The PickupCarrier that carried the input pickup before it was dropped.
-    @param triggerDistance
-        The distance at which the PickupSpawner triggers. Default is 10.
-    */
-    DroppedPickup::DroppedPickup(BaseObject* creator, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance) : PickupSpawner(creator, pickup, triggerDistance, 5, 1)
-    {
-        RegisterObject(DroppedPickup);
-
-        this->setPosition(carrier->getCarrierPosition());
-        this->block(carrier, DEFAULT_BLOCKED_TIME);
-    }
-
-    /**
-    @brief
-        Destructor.
-    */
-    DroppedPickup::~DroppedPickup()
-    {
-
-    }
-
-    /**
-    @brief
-        Creates the Pickupable that is going to get picked up.
-        In the case of the DroppedItem it is the one and only Pickupable that was dropped. No additional Pickupables of the same type are created.
-    */
-    Pickupable* DroppedPickup::getPickup(void)
-    {
-        Pickupable* pickup = this->pickup_;
-        this->pickup_ = NULL;
-        return pickup;
-    }
-
-}
Index: code/trunk/src/modules/pickup/DroppedPickup.h
===================================================================
--- code/trunk/src/modules/pickup/DroppedPickup.h	(revision 9264)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/*
- *   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:
- *      Daniel 'Huty' Haggenmueller
- *   Co-authors:
- *      Damian 'Mozork' Frick
- *
- */
-
-/**
-    @file DroppedPickup.h
-    @brief Definition of the DroppedPickup class.
-    @ingroup Pickup
-*/
-
-#ifndef _DroppedPickup_H__
-#define _DroppedPickup_H__
-
-#include "PickupPrereqs.h"
-
-#include "PickupSpawner.h"
-
-namespace orxonox
-{
-
-    /**
-    @brief
-        Special PickupSpawner that is created when a @ref orxonox::Pickupable "Pickupable" is dropped. It just spawns one pickup, the one that was dropped.
-
-    @author
-        Daniel 'Huty' Haggenmueller
-    @author
-        Damian 'Mozork' Frick
-
-    @ingroup Pickup
-    */
-    class _PickupExport DroppedPickup : public PickupSpawner
-    {
-        public:
-            DroppedPickup(BaseObject* creator);
-            DroppedPickup(BaseObject* creator, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance = 10.0); //!< Constructor.
-            virtual ~DroppedPickup();
-
-        protected:
-            virtual Pickupable* getPickup(void); //!< Creates the Pickupable that is going to get picked up.
-
-        private:
-            static const unsigned int DEFAULT_BLOCKED_TIME = 10; //!< The default time a PickupCarrier is blocked from picking up the pickupable again, after it has dropped it.
-
-    };
-}
-
-#endif /* _DroppedPickup_H__ */
Index: code/trunk/src/modules/pickup/Pickup.cc
===================================================================
--- code/trunk/src/modules/pickup/Pickup.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/Pickup.cc	(revision 9348)
@@ -37,7 +37,5 @@
 #include "util/StringUtils.h"
 
-#include "pickup/PickupIdentifier.h"
-
-#include "DroppedPickup.h"
+#include "PickupSpawner.h"
 
 namespace orxonox
@@ -86,19 +84,4 @@
     /**
     @brief
-        Initializes the PickupIdentififer of this Pickup.
-    */
-    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
         Method for creating a Pickup object through XML.
     */
@@ -107,8 +90,7 @@
         SUPER(Pickup, XMLPort, xmlelement, mode);
 
-        XMLPortParam(Pickup, "activationType", setActivationType, getActivationType, xmlelement, mode);
-        XMLPortParam(Pickup, "durationType", setDurationType, getDurationType, xmlelement, mode);
-
-        this->initializeIdentifier();
+        XMLPortParam(Pickup, "representation", setRepresentationName, getRepresentationName, xmlelement, mode);
+        XMLPortParam(Pickup, "activationType", setActivationTypeAsString, getActivationTypeAsString, xmlelement, mode);
+        XMLPortParam(Pickup, "durationType", setDurationTypeAsString, getDurationTypeAsString, xmlelement, mode);
     }
 
@@ -119,7 +101,7 @@
         Returns a string containing the activation type.
     */
-    const std::string& Pickup::getActivationType(void) const
+    const std::string& Pickup::getActivationTypeAsString(void) const
     {
-        switch(this->activationType_)
+        switch(this->getActivationType())
         {
             case pickupActivationType::immediate:
@@ -138,7 +120,7 @@
         Returns a string containing the duration type.
     */
-    const std::string& Pickup::getDurationType(void) const
+    const std::string& Pickup::getDurationTypeAsString(void) const
     {
-        switch(this->durationType_)
+        switch(this->getDurationType())
         {
             case pickupDurationType::once:
@@ -157,10 +139,10 @@
         The activation type of the Pickup as a string.
     */
-    void Pickup::setActivationType(const std::string& type)
+    void Pickup::setActivationTypeAsString(const std::string& type)
     {
         if(type == Pickup::activationTypeImmediate_s)
-            this->activationType_ = pickupActivationType::immediate;
+            this->setActivationType(pickupActivationType::immediate);
         else if(type == Pickup::activationTypeOnUse_s)
-            this->activationType_ = pickupActivationType::onUse;
+            this->setActivationType(pickupActivationType::onUse);
         else
             orxout(internal_error, context::pickups) << "Invalid activationType '" << type << "' in " << this->getIdentifier()->getName() << "." << endl;
@@ -173,10 +155,10 @@
         The duration type of the Pickup as a string.
     */
-    void Pickup::setDurationType(const std::string& type)
+    void Pickup::setDurationTypeAsString(const std::string& type)
     {
         if(type == Pickup::durationTypeOnce_s)
-            this->durationType_ = pickupDurationType::once;
+            this->setDurationType(pickupDurationType::once);
         else if(type == Pickup::durationTypeContinuous_s)
-            this->durationType_ = pickupDurationType::continuous;
+            this->setDurationType(pickupDurationType::continuous);
         else
             orxout(internal_error, context::pickups) << "Invalid durationType '" << type << "' in " << this->getIdentifier()->getName() << "." << endl;
@@ -199,27 +181,5 @@
     /**
     @brief
-        Creates a duplicate of the OrxonoxClass.
-    @param item
-        A reference to the pointer of the item that we're duplicating.
-    */
-    void Pickup::clone(OrxonoxClass*& item)
-    {
-        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
         Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
-        This method must be implemented by any class directly inheriting from Pickupable. It is most easily done by just creating a new DroppedPickup, e.g.:
-        DroppedPickup(BaseObject* creator, Pickupable* pickup, const Vector3& position);
     @return
         Returns true if a spawner was created, false if not.
@@ -227,5 +187,5 @@
     bool Pickup::createSpawner(void)
     {
-        new DroppedPickup(this, this, this->getCarrier());
+        PickupSpawner::createDroppedPickup(this, this, this->getCarrier());
         return true;
     }
Index: code/trunk/src/modules/pickup/Pickup.h
===================================================================
--- code/trunk/src/modules/pickup/Pickup.h	(revision 9264)
+++ code/trunk/src/modules/pickup/Pickup.h	(revision 9348)
@@ -105,9 +105,12 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
 
+            virtual const std::string& getRepresentationName() const
+                { return this->representationName_; }
+
             /**
             @brief Get the activation type of the Pickup.
             @return Returns the activation type of the Pickup.
             */
-            inline pickupActivationType::Value getActivationTypeDirect(void) const
+            inline pickupActivationType::Value getActivationType(void) const
                 { return this->activationType_; }
             /**
@@ -115,9 +118,9 @@
             @return Returns the duration type of the Pickup.
             */
-            inline pickupDurationType::Value getDurationTypeDirect(void) const
+            inline pickupDurationType::Value getDurationType(void) const
                 { return this->durationType_; }
 
-            const std::string& getActivationType(void) const; //!< Get the activation type of the Pickup.
-            const std::string& getDurationType(void) const; //!< Get the duration type of the Pickup.
+            const std::string& getActivationTypeAsString(void) const; //!< Get the activation type of the Pickup.
+            const std::string& getDurationTypeAsString(void) const; //!< Get the duration type of the Pickup.
 
             /**
@@ -126,5 +129,5 @@
             */
             inline bool isImmediate(void) const
-                { return this->getActivationTypeDirect() == pickupActivationType::immediate; }
+                { return this->getActivationType() == pickupActivationType::immediate; }
             /**
             @brief Get whether the activation type is 'onUse'.
@@ -132,5 +135,5 @@
             */
             inline bool isOnUse(void) const
-                { return this->getActivationTypeDirect() == pickupActivationType::onUse; }
+                { return this->getActivationType() == pickupActivationType::onUse; }
             /**
             @brief Get whether the duration type is 'once'.
@@ -138,5 +141,5 @@
             */
             inline bool isOnce(void) const
-                { return this->getDurationTypeDirect() == pickupDurationType::once; }
+                { return this->getDurationType() == pickupDurationType::once; }
             /**
             @brief Get whether the duration type is 'continuous'.
@@ -144,13 +147,16 @@
             */
             inline bool isContinuous(void) const
-                { return this->getDurationTypeDirect() == pickupDurationType::continuous; }
+                { return this->getDurationType() == 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 OrxonoxClass.
 
         protected:
-            void initializeIdentifier(void);
+            virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
 
-            virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
+            /**
+            @brief Sets the representation name which refers to the name of the PickupRepresentation that is used to represent this pickup.
+            */
+            inline void setRepresentationName(const std::string& name)
+                { this->representationName_ = name; }
 
             /**
@@ -158,5 +164,5 @@
             @param type The activation type of the Pickup.
             */
-            inline void setActivationTypeDirect(pickupActivationType::Value type)
+            inline void setActivationType(pickupActivationType::Value type)
                 { this->activationType_ = type; }
             /**
@@ -164,13 +170,14 @@
             @param type The duration type of the Pickup.
             */
-            inline void setDurationTypeDirect(pickupDurationType::Value type)
+            inline void setDurationType(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.
+            void setActivationTypeAsString(const std::string& type); //!< Set the activation type of the Pickup.
+            void setDurationTypeAsString(const std::string& type); //!< Set the duration type of the Pickup.
 
         private:
             void initialize(void); //!< Initializes the member variables.
 
+            std::string representationName_; //!< The name of the associated PickupRepresentation.
             pickupActivationType::Value activationType_; //!< The activation type of the Pickup.
             pickupDurationType::Value durationType_; //!< The duration type of the Pickup.
Index: code/trunk/src/modules/pickup/PickupCollection.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupCollection.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/PickupCollection.cc	(revision 9348)
@@ -38,6 +38,5 @@
 
 #include "CollectiblePickup.h"
-#include "DroppedPickup.h"
-#include "PickupCollectionIdentifier.h"
+#include "PickupSpawner.h"
 
 #include "PickupCollection.h"
@@ -54,12 +53,8 @@
         The creator of the object.
     */
-    PickupCollection::PickupCollection(BaseObject* creator) : BaseObject(creator), pickupCollectionIdentifier_(NULL)
+    PickupCollection::PickupCollection(BaseObject* creator) : BaseObject(creator)
     {
         RegisterObject(PickupCollection);
 
-        this->pickupCollectionIdentifier_ = new PickupCollectionIdentifier(this);
-        this->usedCounter_ = 0;
-        this->pickedUpCounter_ = 0;
-        this->disabledCounter_ = 0;
         this->processingUsed_ = false;
         this->processingPickedUp_ = false;
@@ -70,16 +65,13 @@
         Destructor. Iterates through all Pickupables this PickupCollection consists of and destroys them if they haven't been already.
     */
-    PickupCollection::~ PickupCollection()
+    PickupCollection::~PickupCollection()
     {
         // Destroy all Pickupables constructing this PickupCollection.
-        for(std::vector<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
-        {
-            (*it)->removeFromCollection();
+        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
+        {
+            (*it)->wasRemovedFromCollection();
             (*it)->destroy();
         }
         this->pickups_.clear();
-        
-        if(this->pickupCollectionIdentifier_ != NULL)
-            delete this->pickupCollectionIdentifier_;
     }
 
@@ -92,19 +84,6 @@
         SUPER(PickupCollection, XMLPort, xmlelement, mode);
 
+        XMLPortParam(PickupCollection, "representation", setRepresentationName, getRepresentationName, xmlelement, mode);
         XMLPortObject(PickupCollection, CollectiblePickup, "pickupables", addPickupable, getPickupable, xmlelement, mode);
-
-        this->initializeIdentifier();
-    }
-
-    /**
-    @brief
-        Initializes the PickupIdentifier for this pickup.
-    */
-    void PickupCollection::initializeIdentifier(void)
-    {
-        for(std::vector<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
-        {
-            this->pickupCollectionIdentifier_->addPickup((*it)->getPickupIdentifier());
-        }
     }
 
@@ -120,5 +99,5 @@
         this->processingUsed_ = true;
         // Change used for all Pickupables this PickupCollection consists of.
-        for(std::vector<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
+        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
             (*it)->setUsed(this->isUsed());
 
@@ -138,10 +117,20 @@
             return;
 
+        size_t numPickupsEnabled = 0;
+        size_t numPickupsInUse = 0;
+        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
+        {
+            if ((*it)->isEnabled())
+                ++numPickupsEnabled;
+            if ((*it)->isUsed())
+                ++numPickupsInUse;
+        }
+
         // If all the pickups are not in use but the PickupCollection is.
-        if(this->usedCounter_ == 0 && this->isUsed())
+        if(numPickupsInUse == 0 && this->isUsed())
             this->setUsed(false);
 
         // If all the enabled pickups are in use but the PickupCollection is not.
-        if(this->usedCounter_ != 0 && this->usedCounter_ == this->pickups_.size()-this->disabledCounter_ && !this->isUsed())
+        if(numPickupsInUse > 0 && numPickupsInUse == numPickupsEnabled && !this->isUsed())
             this->setUsed(true);
     }
@@ -157,5 +146,5 @@
 
         // Change the PickupCarrier for all Pickupables this PickupCollection consists of.
-        for(std::vector<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
+        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
         {
             if(this->getCarrier() == NULL)
@@ -177,6 +166,6 @@
         this->processingPickedUp_ = true;
         // Change the pickedUp status for all Pickupables this PickupCollection consists of.
-        for(std::vector<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
-            (*it)->setPickedUp(this->isPickedUp());
+        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); )
+            (*(it++))->setPickedUp(this->isPickedUp());
 
         this->processingPickedUp_ = false;
@@ -195,37 +184,16 @@
             return;
 
-        // If at least all the enabled pickups of this PickupCollection are no longer picked up. 
-        if(this->pickedUpCounter_ <= this->disabledCounter_ && this->isPickedUp())
+        // If at least all the enabled pickups of this PickupCollection are no longer picked up.
+        bool isOnePickupEnabledAndPickedUp = false;
+        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
+        {
+            if ((*it)->isEnabled() && (*it)->isPickedUp())
+            {
+                isOnePickupEnabledAndPickedUp = true;
+                break;
+            }
+        }
+        if(!isOnePickupEnabledAndPickedUp && this->isPickedUp())
             this->Pickupable::destroy();
-
-        // If the PickupCollection is no longer picked up.
-        if(!this->isPickedUp())
-            this->pickedUpCounter_ = 0;
-    }
-
-    /**
-    @brief
-        Creates a duplicate of the input Pickupable.
-        This method needs to be implemented by any Class inheriting from Pickupable.
-    @param item
-        A reference to a pointer to the OrxonoxClass that is to be duplicated.
-    */
-    void PickupCollection::clone(OrxonoxClass*& item)
-    {
-        if(item == NULL)
-            item = new PickupCollection(this);
-
-        SUPER(PickupCollection, clone, item);
-
-        PickupCollection* pickup = dynamic_cast<PickupCollection*>(item);
-        // Clone all Pickupables this PickupCollection consist of.
-        for(std::vector<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
-        {
-            Pickupable* newPickup = (*it)->clone();
-            CollectiblePickup* collectible = static_cast<CollectiblePickup*>(newPickup);
-            pickup->addPickupable(collectible);
-        }
-
-        pickup->initializeIdentifier();
     }
 
@@ -240,5 +208,5 @@
     bool PickupCollection::isTarget(const PickupCarrier* carrier) const
     {
-        for(std::vector<CollectiblePickup*>::const_iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
+        for(std::list<CollectiblePickup*>::const_iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
         {
             if(!carrier->isTarget(*it))
@@ -247,16 +215,4 @@
 
         return true;
-    }
-
-    /**
-    @brief
-        Get the PickupIdentifier of this PickupCollection.
-        This is in fact the PickupCollectionIdentifier.
-    @return
-        Returns a pointer to the PickupIdentifier of this PickupCollection.
-    */
-    const PickupIdentifier* PickupCollection::getPickupIdentifier(void) const
-    {
-        return this->pickupCollectionIdentifier_;
     }
 
@@ -274,6 +230,7 @@
             return false;
 
-        pickup->addToCollection(this);
         this->pickups_.push_back(pickup);
+        pickup->wasAddedToCollection(this);
+        this->pickupsChanged();
         return true;
     }
@@ -289,5 +246,33 @@
     const Pickupable* PickupCollection::getPickupable(unsigned int index) const
     {
-        return this->pickups_[index];
+        if(this->pickups_.size() >= index)
+            return NULL;
+
+        std::list<CollectiblePickup*>::const_iterator it = this->pickups_.begin();
+        std::advance(it, index);
+        return *it;
+    }
+
+    /**
+    @brief
+        Removes the Pickup from the Collection.
+    @param pickup
+        The Pickup to be removed.
+    @return
+        Returns true if the pickup was in the collection.
+    */
+    bool PickupCollection::removePickupable(CollectiblePickup* pickup)
+    {
+        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
+        {
+            if (*it == pickup)
+            {
+                this->pickups_.erase(it);
+                pickup->wasRemovedFromCollection();
+                this->pickupsChanged();
+                return true;
+            }
+        }
+        return false;
     }
 
@@ -297,13 +282,8 @@
         This is used internally by the CollectiblePickup class.
     @param changed
-        The value the used status has changed to. 
+        The value the used status has changed to.
     */
     void PickupCollection::pickupChangedUsed(bool changed)
     {
-        if(changed)
-            this->usedCounter_++;
-        else
-            this->usedCounter_--;
-
         this->changedUsedAction();
     }
@@ -318,9 +298,4 @@
     void PickupCollection::pickupChangedPickedUp(bool changed)
     {
-        if(changed)
-            this->pickedUpCounter_++;
-        else
-            this->pickedUpCounter_--;
-
         this->changedPickedUpAction();
     }
@@ -333,5 +308,14 @@
     void PickupCollection::pickupDisabled(void)
     {
-        this->disabledCounter_++;
+    }
+
+    /**
+    @brief
+        Helpfer function if the number of pickups in this collection has changed.
+    */
+    void PickupCollection::pickupsChanged(void)
+    {
+        this->changedUsedAction();
+        this->changedPickedUpAction();
     }
 
@@ -339,6 +323,4 @@
     @brief
         Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
-        This method must be implemented by any class directly inheriting from Pickupable. It is most easily done by just creating a new DroppedPickup, e.g.:
-        DroppedPickup(BaseObject* creator, Pickupable* pickup, const Vector3& position);
     @return
         Returns true if a spawner was created, false if not.
@@ -346,5 +328,5 @@
     bool PickupCollection::createSpawner(void)
     {
-        new DroppedPickup(this, this, this->getCarrier());
+        PickupSpawner::createDroppedPickup(this, this, this->getCarrier());
         return true;
     }
Index: code/trunk/src/modules/pickup/PickupCollection.h
===================================================================
--- code/trunk/src/modules/pickup/PickupCollection.h	(revision 9264)
+++ code/trunk/src/modules/pickup/PickupCollection.h	(revision 9348)
@@ -50,6 +50,4 @@
         The PickupCollection combines different @ref orxonox::Pickupable "Pickupables" (more precisely @ref orxonox::CollectiblePickup "CollectiblePickups") to a coherent, single pickup and makes them seem (from the outside looking in) just as if they were just one @ref orxonox::Pickupable "Pickupable".
 
-        To differentiate between different types of @ref orxonox::PickupCollection "PickupCollections" (just as we differentiate between different types of @ref orxonox::Pickupable "Pickupables") we define a new identifyer called the @ref orxonox::PickupCollectionIdentifier "PickupCollectionIdentifier" which has pretty much the same properties as the @ref orxonox::PickupIdentifier "PickupIdentifier" but extende to @ref orxonox::PickupCollection "PickupCollections".
-
         A PickupCollection can be created in XML as follows:
         @code
@@ -81,12 +79,17 @@
             virtual void changedPickedUp(void); //!< Is 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 input pickup.
-
             virtual bool isTarget(const PickupCarrier* carrier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this PickupCollection.
 
-            virtual const PickupIdentifier* getPickupIdentifier(void) const; //!< Get the PickupIdentifier of this PickupCollection.
+            inline void setRepresentationName(const std::string& name)
+                { this->representationName_ = name; }
+            virtual const std::string& getRepresentationName() const
+                { return this->representationName_; }
 
             bool addPickupable(CollectiblePickup* pickup); //!< Add the input Pickupable to list of Pickupables combined by this PickupCollection.
             const Pickupable* getPickupable(unsigned int index) const; //!< Get the Pickupable at the given index.
+            bool removePickupable(CollectiblePickup* pickup); //!< Removes the input Pickupable from the list of Pickupables in this PickupCollection.
+
+            inline const std::list<CollectiblePickup*>& getPickups() const
+                { return this->pickups_; }
 
             void pickupChangedUsed(bool changed); //!< Informs the PickupCollection, that one of its pickups has changed its used status to the input value.
@@ -95,19 +98,13 @@
 
         protected:
-            void initializeIdentifier(void); //!< Initializes the PickupIdentifier for this pickup.
-
             virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
-
-            PickupCollectionIdentifier* pickupCollectionIdentifier_; //!< The PickupCollectionIdentifier of this PickupCollection. Is used to distinguish different PickupCollections amongst themselves.
 
         private:
             void changedUsedAction(void); //!< Helper method.
             void changedPickedUpAction(void); //!< Helper method.
+            void pickupsChanged(void); //!< Helper method.
 
-            std::vector<CollectiblePickup*> pickups_; //!< The list of the pointers of all the Pickupables this PickupCollection consists of. They are weak pointers to facilitate testing, whether the pointers are still valid.
-
-            unsigned int usedCounter_; //!< Keeps track of the number of pickups of this PickupCollection, that are in use.
-            unsigned int pickedUpCounter_; //!< Keeps track of the number of pickups of this PickupCollection, that are picked up.
-            unsigned int disabledCounter_; //!< Keeps track of the number of pickups of this PickupCollection, that are disabled.
+            std::string representationName_; //!< The name of the associated PickupRepresentation.
+            std::list<CollectiblePickup*> pickups_; //!< The list of the pointers of all the Pickupables this PickupCollection consists of. They are weak pointers to facilitate testing, whether the pointers are still valid.
 
             bool processingUsed_; //!< Boolean to ensure, that the PickupCollection doesn't update its used status while its internal state is inconsistent.
Index: code/trunk/src/modules/pickup/PickupCollectionIdentifier.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupCollectionIdentifier.cc	(revision 9264)
+++ 	(revision )
@@ -1,112 +1,0 @@
-/*
- *   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:
- *      Damian 'Mozork' Frick
- *   Co-authors:
- *      ...
- *
-*/
-
-/**
-    @file PickupCollectionIdentifier.cc
-    @brief Implementation of PickupCollectionIdentifier.
-*/
-
-#include "core/CoreIncludes.h"
-
-#include "PickupCollectionIdentifier.h"
-
-namespace orxonox
-{
-
-    /**
-    @brief
-        Constructor. Registers the object.
-    */
-    PickupCollectionIdentifier::PickupCollectionIdentifier(Pickupable* pickup) : PickupIdentifier(pickup)
-    {
-        RegisterObject(PickupCollectionIdentifier);
-    }
-
-    /**
-    @brief
-        Destructor.
-    */
-    PickupCollectionIdentifier::~PickupCollectionIdentifier()
-    {
-
-    }
-
-    /**
-    @brief
-        Compares a PickupCollectionIdentifier with a PickupIdentifier and returns 0 if a == b, <0 if a < b and >0 if a > b for a.compare(b), where a is a PickupCollectionIdentifier and b is just some PickupIdentifier.
-    @param identifier
-        Pointer to the second PickupIdentifier, b.
-    @return
-        Returns an integer. 0 if the two compared PickupIdentifiers are the same, <0 if a < b and >0 if a > b.
-    */
-    int PickupCollectionIdentifier::compare(const PickupIdentifier* identifier) const
-    {
-        assert(identifier);
-
-        // Slight un-niceity to cast the const PickupIdentifier to a const PickupCollectionIdentifier, but since we cast to a const, there is no harm done.
-        PickupIdentifier* temp = const_cast<PickupIdentifier*>(identifier);
-        const PickupCollectionIdentifier* collectionIdentifier = orxonox_cast<PickupCollectionIdentifier*>(temp);
-
-        // If the input PickupIdentifier 'identifier' is no PickupCollectionIdentifier then just the two PickupIdentifiers are compared.
-        if(collectionIdentifier == NULL)
-        {
-            return this->PickupIdentifier::compare(identifier);
-        }
-
-        // If the number of Pickupables each of the two PickupCollectionIdentifiers contain differ, the one with less is considered smaller.
-        if(this->identifiers_.size() != collectionIdentifier->identifiers_.size())
-            return this->identifiers_.size()-collectionIdentifier->identifiers_.size();
-
-        // Compare the Pickupables of the two PickupCollectionIdentifiers one after the other. the one with the first 'smaller' one is considered smaller.
-        std::set<const PickupIdentifier*, PickupIdentifierCompare>::const_iterator it2 = collectionIdentifier->identifiers_.begin();
-        for(std::set<const PickupIdentifier*, PickupIdentifierCompare>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); it++)
-        {
-
-            if((*it)->compare(*it2) < 0)
-                return -1;
-            if((*it2)->compare(*it) < 0)
-                return 1;
-        }
-
-        // This means they are equal.
-        return 0;
-    }
-
-    /**
-    @brief
-        Add a Pickupable to the PickupCollectionIdentifier.
-    @param identifier
-        A pointer to the PickupIdentifier of the Pickupable to be added.
-    */
-    void PickupCollectionIdentifier::addPickup(const PickupIdentifier* identifier)
-    {
-        this->identifiers_.insert(identifier);
-    }
-
-}
-
Index: code/trunk/src/modules/pickup/PickupCollectionIdentifier.h
===================================================================
--- code/trunk/src/modules/pickup/PickupCollectionIdentifier.h	(revision 9264)
+++ 	(revision )
@@ -1,77 +1,0 @@
-/*
- *   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:
- *      Damian 'Mozork' Frick
- *   Co-authors:
- *      ...
- *
-*/
-
-/**
-    @file PickupCollectionIdentifier.h
-    @brief Declaration of PickupCollectionIdentifier.
-    @ingroup Pickup
-*/
-
-#ifndef _PickupCollectionIdentifier_H__
-#define _PickupCollectionIdentifier_H__
-
-#include "PickupPrereqs.h"
-
-#include <set>
-
-#include "pickup/PickupIdentifier.h"
-
-namespace orxonox
-{
-
-    /**
-    @brief
-        The PickupCollectionIdentifier is the specialization of the PickupIdentifier for the @ref orxonox::PickupCollection "PickupCollection" class.
-        It identifies @ref orxonox::PickupCollection "PickupCollections" based on the different @ref orxonox::CollectiblePickup "CollectiblePickups" they consist of.
-
-        @ref orxonox::Pickupable "Pickupables" (resp. @ref orxonox::CollectiblePickup "CollectiblePickups") can be added to the PickupCollectionIdentifier via the addPickup method.
-
-    @author
-        Damian 'Mozork' Frick
-
-    @ingroup Pickup
-    */
-    class _PickupExport PickupCollectionIdentifier : public PickupIdentifier
-    {
-
-        public:
-            PickupCollectionIdentifier(Pickupable* pickup); //!< Constructor.
-            ~PickupCollectionIdentifier(); //!< Destructor.
-
-            virtual int compare(const PickupIdentifier* identifier) const; //!< Compares a PickupCollectionIdentifier with a PickupIdentifier.
-
-            void addPickup(const PickupIdentifier* identifier); //!< Add a @ref orxonox::Pickupable "Pickupable" to the PickupCollectionIdentifier.
-
-        private:
-            std::set<const PickupIdentifier*, PickupIdentifierCompare> identifiers_; //!< The set of PickupIdentifiers of the @ref orxonox::Pickupable "Pickupables", the @ref orxonox::PickupCollection "PickupCollection" with this PickupCollectionIdentifier consists of, ordered by the rule set by @ref orxonox::PickupIdentifierCompare "PickupIdentifierCompare".
-
-    };
-
-}
-
-#endif // _PickupCollectionIdentifier_H__
Index: code/trunk/src/modules/pickup/PickupManager.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupManager.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/PickupManager.cc	(revision 9348)
@@ -87,5 +87,4 @@
 
         this->representations_.clear();
-        this->representationsNetworked_.clear();
 
         // Destroying all the PickupInventoryContainers that are still there.
@@ -106,8 +105,7 @@
     /**
     @brief
-        Registers a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents, on the server (or in standalone mode).
-        For every type of Pickupable (uniquely identified by a PickupIdentifier) there can be one (and just one) PickupRepresentation registered.
-    @param identifier
-        The PickupIdentifier identifying the Pickupable.
+        Registers a PickupRepresentation.
+    @param name
+        The representation's name.
     @param representation
         A pointer to the PickupRepresentation.
@@ -115,14 +113,13 @@
         Returns true if successful and false if not.
     */
-    bool PickupManager::registerRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation)
-    {
-        assert(identifier);
+    bool PickupManager::registerRepresentation(const std::string& name, PickupRepresentation* representation)
+    {
         assert(representation);
 
         // If the list is not empty and Pickupable already has a Representation registered.
-        if(!this->representations_.empty() && this->representations_.find(identifier) != this->representations_.end())
+        if(!this->representations_.empty() && this->representations_.find(name) != this->representations_.end())
             return false;
 
-        this->representations_[identifier] = representation;
+        this->representations_[name] = representation;
 
         orxout(verbose, context::pickups) << "PickupRepresentation &" << representation << " registered with the PickupManager." << endl;
@@ -132,18 +129,13 @@
     /**
     @brief
-        Unegisters a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents, on the server (or in standalone mode).
-    @param identifier
-        The PickupIdentifier identifying the Pickupable.
-    @param representation
-        A pointer to the PickupRepresentation.
+        Unegisters a PickupRepresentation.
+    @param name
+        The representation's name.
     @return
         Returns true if successful and false if not.
     */
-    bool PickupManager::unregisterRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation)
-    {
-        assert(identifier);
-        assert(representation);
-
-        std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare>::iterator it = this->representations_.find(identifier);
+    bool PickupManager::unregisterRepresentation(const std::string& name)
+    {
+        std::map<std::string, PickupRepresentation*>::iterator it = this->representations_.find(name);
         if(it == this->representations_.end()) // If the Pickupable is not registered in the first place.
             return false;
@@ -151,5 +143,5 @@
         this->representations_.erase(it);
 
-        orxout(verbose, context::pickups) << "PickupRepresentation &" << representation << " unregistered with the PickupManager." << endl;
+        orxout(verbose, context::pickups) << "PickupRepresentation &" << name << " unregistered with the PickupManager." << endl;
         return true;
     }
@@ -157,54 +149,14 @@
     /**
     @brief
-        Registers a PickupRepresentation on the host it was created.
-    @param representation
-        A pointer to the PickupRepresentation.
-    @return
-        Returns true if successful, false if not.
-    */
-    bool PickupManager::registerRepresentation(PickupRepresentation* representation)
-    {
-        assert(representation);
-
-        // If the list is not empty and PickupRepresentation is already registered.
-        if(!this->representationsNetworked_.empty() && this->representationsNetworked_.find(representation->getObjectID()) != this->representationsNetworked_.end())
-            return false;
-
-        this->representationsNetworked_[representation->getObjectID()] = representation;
-        return true;
-    }
-
-    /**
-    @brief
-        Unregisters a PickupRepresentation on the host it is being destroyed (which is the same host on which it was created).
-    @param representation
-        A pointer to the Pickuprepresentation.
-    @return
-        Returns true if successful, false if not.
-    */
-    bool PickupManager::unregisterRepresentation(PickupRepresentation* representation)
-    {
-        assert(representation);
-
-        std::map<uint32_t, PickupRepresentation*>::iterator it = this->representationsNetworked_.find(representation->getObjectID());
-        if(it == this->representationsNetworked_.end()) // If the Pickupable is not registered in the first place.
-            return false;
-
-        this->representationsNetworked_.erase(it);
-        return true;
-    }
-
-    /**
-    @brief
-        Get the PickupRepresentation representing the Pickupable with the input PickupIdentifier.
-    @param identifier
-        The PickupIdentifier.
+        Get the PickupRepresentation with the given name.
+    @param name
+        The name of the PickupRepresentation.
     @return
         Returns a pointer to the PickupRepresentation.
     */
-    PickupRepresentation* PickupManager::getRepresentation(const PickupIdentifier* identifier)
-    {
-        std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare>::iterator it = this->representations_.find(identifier);
-        if(it == this->representations_.end()) // If there is no PickupRepresentation associated with the input PickupIdentifier.
+    PickupRepresentation* PickupManager::getRepresentation(const std::string& name)
+    {
+        std::map<std::string, PickupRepresentation*>::iterator it = this->representations_.find(name);
+        if(it == this->representations_.end()) // If there is no PickupRepresentation associated with the input name.
         {
             orxout(verbose, context::pickups) << "PickupManager::getRepresentation() returned default representation." << endl;
@@ -353,8 +305,8 @@
         {
             // If there is no PickupRepresentation registered the default representation is used.
-            if(this->representations_.find(pickup->getPickupIdentifier()) == this->representations_.end())
-                PickupManager::pickupChangedPickedUpNetwork(index, pickup->isUsable(), this->defaultRepresentation_->getObjectID(), pickedUp);
+            if(this->representations_.find(pickup->getRepresentationName()) == this->representations_.end())
+                PickupManager::pickupChangedPickedUpNetwork(index, pickup->isUsable(), this->defaultRepresentation_->getObjectID(), pickup->getRepresentationName(), pickedUp);
             else
-                PickupManager::pickupChangedPickedUpNetwork(index, pickup->isUsable(), this->representations_[pickup->getPickupIdentifier()]->getObjectID(), pickedUp);
+                PickupManager::pickupChangedPickedUpNetwork(index, pickup->isUsable(), this->representations_[pickup->getRepresentationName()]->getObjectID(), pickup->getRepresentationName(), pickedUp);
         }
         // If the concerned host is somewhere in the network, we call pickupChangedPickedUpNetwork() on its PickupManager.
@@ -362,5 +314,5 @@
         {
             // If there is no PickupRepresentation registered the default representation is used.
-            if(this->representations_.find(pickup->getPickupIdentifier()) == this->representations_.end())
+            if(this->representations_.find(pickup->getRepresentationName()) == this->representations_.end())
             {
                 callStaticNetworkFunction(PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->defaultRepresentation_->getObjectID(), pickedUp);
@@ -368,5 +320,5 @@
             else
             {
-                callStaticNetworkFunction(PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->representations_[pickup->getPickupIdentifier()]->getObjectID(), pickedUp);
+                callStaticNetworkFunction(PickupManager::pickupChangedPickedUpNetwork, clientId, index, pickup->isUsable(), this->representations_[pickup->getRepresentationName()]->getObjectID(), pickedUp);
             }
         }
@@ -388,5 +340,5 @@
         The pickedUp status the Pickupable changed to.
     */
-    /*static*/ void PickupManager::pickupChangedPickedUpNetwork(uint32_t pickup, bool usable, uint32_t representationObjectId, bool pickedUp)
+    /*static*/ void PickupManager::pickupChangedPickedUpNetwork(uint32_t pickup, bool usable, uint32_t representationObjectId, const std::string& representationName, bool pickedUp)
     {
         PickupManager& manager = PickupManager::getInstance(); // Get the PickupManager singleton on this host.
@@ -402,4 +354,5 @@
             container->unusable = false;
             container->representationObjectId = representationObjectId;
+            container->representationName = representationName;
             // Insert the container into the pickupInventoryContainers_ list.
             manager.pickupInventoryContainers_.insert(std::pair<uint32_t, PickupInventoryContainer*>(pickup, container));
@@ -417,34 +370,4 @@
             manager.updateGUI(); // Tell the PickupInventory that something has changed.
         }
-    }
-
-    /**
-    @brief
-        Get the PickupRepresentation of an input Pickupable.
-        This method spares us the hassle to export the PickupIdentifier class to lua.
-    @param pickup
-        The number identifying the Pickupable whose PickupRepresentation should be returned.
-    @return
-        Returns the PickupRepresentation of the input Pickupable or NULL if an error occurred.
-    */
-    orxonox::PickupRepresentation* PickupManager::getPickupRepresentation(uint32_t pickup)
-    {
-        // Clear and rebuild the representationsNetworked_ list.
-        //TODO: Better solution?
-        this->representationsNetworked_.clear();
-        for(ObjectList<PickupRepresentation>::iterator it = ObjectList<PickupRepresentation>::begin(); it != ObjectList<PickupRepresentation>::end(); ++it)
-            this->representationsNetworked_[it->getObjectID()] = *it;
-
-        // Get the container belonging to the input pickup, if not found return the default representation.
-        std::map<uint32_t, PickupInventoryContainer*>::iterator it = this->pickupInventoryContainers_.find(pickup);
-        if(it == this->pickupInventoryContainers_.end())
-            return this->defaultRepresentation_;
-
-        // Get the PickupRepresentation of the input pickup (through the objecId of the representation stored in the PickupInventoryContainer belonging to the pickup), if not found return the default representation.
-        std::map<uint32_t, PickupRepresentation*>::iterator it2 = this->representationsNetworked_.find(it->second->representationObjectId);
-        if(it2 == this->representationsNetworked_.end())
-            return this->defaultRepresentation_;
-
-        return it2->second;
     }
 
Index: code/trunk/src/modules/pickup/PickupManager.h
===================================================================
--- code/trunk/src/modules/pickup/PickupManager.h	(revision 9264)
+++ code/trunk/src/modules/pickup/PickupManager.h	(revision 9348)
@@ -41,6 +41,4 @@
 #include "core/WeakPtr.h"
 
-#include "pickup/PickupIdentifier.h"
-
 #include "PickupRepresentation.h"
 
@@ -67,4 +65,5 @@
         bool unusable; //!< Whether the @ref orxonox::Pickupable "Pickupable" is droppable.
         uint32_t representationObjectId; //!< The objectId of the @ref orxonox::PickupRepresentation "PickupRepresentation" that represents the @ref orxonox::Pickupable "Pickupable".
+        std::string representationName; //!< The name of the associated PickupRepresentation
     };
     // tolua_end
@@ -74,5 +73,5 @@
         The PickupManager class manages @ref orxonox::Pickupable "Pickupables".
 
-        It has in essence two tasks to fulfill. Firstly it must link @ref orxonox::Pickupable "Pickupables" (through their @ref orxonox::PickupIdentifier "PickupIdentifiers") to their respective @ref orxonox::PickupRepresentation "PickupRepresentations". Secondly it manages the PickupInventory. (The PickupInventory is the GUI that displays @ref orxonox::Pickupable "Pickupables" for the covenience of the user.)
+        It has in essence two tasks to fulfill. Firstly it must link @ref orxonox::Pickupable "Pickupables" (through their representation-name attribute) to the respective @ref orxonox::PickupRepresentation "PickupRepresentations". Secondly it manages the PickupInventory. (The PickupInventory is the GUI that displays @ref orxonox::Pickupable "Pickupables" for the covenience of the user.)
 
         @section PickupManagerTechnicalDetails Technical details
@@ -86,6 +85,5 @@
 
         Firstly there are a number of lists (where by list I really mean any kind of ordered data structure) kept.
-        - The @ref orxonox::PickupManager::representations_ "representations_" list links @ref orxonox::PickupRepresentation "PickupRepresentations" with @ref orxonox::PickupIdentifier "PickupIdentifiers" and can be used to get the @ref orxonox::PickupRepresentation "PickupRepresentation" for a given @ref orxonox::Pickupable "Pickupable". It is only populated on the server (or in standalone mode). Each @ref orxonox::PickupRepresentation "PickupRepresentation" that is generated through XML registers itself with the PickupManager and is thereby added to the list.
-        - The @ref orxonox::PickupManager::representationsNetworked_ "representationsNetworked_" list is the networked (hence the name) equivalent to the @ref orxonox::PickupManager::representations_ "representations_" list. It links an objectId of a @ref orxonox::PickupRepresentation "PickupRepresentation" to a @ref orxonox::PickupRepresentation "PickupRepresentation". This list is maintained on all hosts, each representation registers itself (in its constructor) with the PickupManager. Since the representations are synchronised they are created on each host. The "same" instance on each host is identified by the same objectId and that is why we store the representations with the objectId as key. We can then use this list to get a @ref orxonox::PickupRepresentation "PickupRepresentation" for a specific @ref orxonox::Pickupable "Pickupable" (or more precisely a number identifiying that particular pickup, but we'll see that, when we look at the next list) on a client to be used in the PickupInventory.
+        - The @ref orxonox::PickupManager::representations_ "representations_" list links @ref orxonox::PickupRepresentation "PickupRepresentations" with its name and can be used to get the @ref orxonox::PickupRepresentation "PickupRepresentation" for a given @ref orxonox::Pickupable "Pickupable". It is only populated on the server (or in standalone mode). Each @ref orxonox::PickupRepresentation "PickupRepresentation" that is generated through XML registers itself with the PickupManager and is thereby added to the list.
         - The @ref orxonox::PickupManager::pickupInventoryContainers_ "pickupInventoryContainers_" list links a number identifying a @ref orxonox::Pickupable "Pickupable" to a data structure (the @ref orxonox::PickupInventoryContainer "PickupInventoryContainer"), which contains all necessary information about that @ref orxonox::Pickupable "Pickupable". This list is maintained on all hosts, a new container is inserted when a @ref orxonox::Pickupable "Pickupable" is picked up, but only if it has been picked up by the repsective host. This list is then used by the PickupInventory to access the required information and to get the correct @ref orxonox::PickupRepresentation "PickupRepresentation".
         - The @ref orxonox::PickupManager::pickups_ "pickups_" list links a number identifiying a @ref orxonox::Pickupable "Pickupable" to a (weak pointer to a) @ref orxonox::Pickupable "Pickupable". It is only maintained by the server (or in standalone mode), to be able to use, unuse and drop @ref orxonox::Pickupable "Pickupables" through the PickupInventory. Since @ref orxonox::Pickupable "Pickupables" only exist on the server a client that wants to change a pickups status has so send a request over the network (with the number identifying the pickup) to the server and then the server facilitates the change, using this list to map from the identifyer to the actual @ref orxonox::Pickupable "Pickupable".
@@ -114,22 +112,17 @@
             static PickupManager& getInstance() { return Singleton<PickupManager>::getInstance(); } // tolua_export
 
-            bool registerRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation); //!< Registers a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents.
-            bool unregisterRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation); //!< Unegisters a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents.
+            bool registerRepresentation(const std::string& name, PickupRepresentation* representation);
+            bool unregisterRepresentation(const std::string& name);
 
-            bool registerRepresentation(PickupRepresentation* representation); //!< Registers a PickupRepresentation on the host it was created.
-            bool unregisterRepresentation(PickupRepresentation* representation); //!< Unregisters a PickupRepresentation on the host it is being destroyed.
-
-            PickupRepresentation* getRepresentation(const PickupIdentifier* identifier); //!< Get the PickupRepresentation representing the Pickupable with the input PickupIdentifier.
+            PickupRepresentation* getRepresentation(const std::string& name); // tolua_export
 
             virtual void pickupChangedUsed(Pickupable* pickup, bool used); //!< Is called by the PickupListener to notify the PickupManager, that the input Pickupable has transited to the input used state.
             static void pickupChangedUsedNetwork(uint32_t pickup, bool inUse, bool usable, bool unusable); //!< Helper method to react to the change in the used status of a Pickupable.
             virtual void pickupChangedPickedUp(Pickupable* pickup, bool pickedUp); //!< Is called by the PickupListener to notify the PickupManager, that the input Pickupable has transited to the input pickedUp state.
-            static void pickupChangedPickedUpNetwork(uint32_t pickup, bool usable, uint32_t representationObjectId, bool pickedUp); //!< Helper method to react to the change in the pickedUp status of a Pickupable.
+            static void pickupChangedPickedUpNetwork(uint32_t pickup, bool usable, uint32_t representationObjectId, const std::string& representationName, bool pickedUp); //!< Helper method to react to the change in the pickedUp status of a Pickupable.
 
         // Methods to be used by the PickupInventory.
         public:
             // tolua_begin
-            orxonox::PickupRepresentation* getPickupRepresentation(uint32_t pickup); //!< Get the PickupRepresentation of an input indentifier for Pickupable.
-
             int getNumPickups(void); //!< Get the number of pickups currently picked up by the player.
             /**
@@ -163,6 +156,5 @@
             PickupRepresentation* defaultRepresentation_; //!< The default PickupRepresentation.
 
-            std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare> representations_; //!< Map linking PickupIdentifiers (representing types of Pickupables) and PickupRepresentations.
-            std::map<uint32_t, PickupRepresentation*> representationsNetworked_; //!< Map linking the PickupRepresentation's objectId to the PickupRepresentation itself. It is used for networking purposes.
+            std::map<std::string, PickupRepresentation*> representations_; //!< Map linking PickupRepresentations and their names.
 
             std::map<uint32_t, PickupInventoryContainer*> pickupInventoryContainers_; //!< Map linking a number identifying a Pickupable to a PickupInventoryContainer, which contains all necessary information about that Pickupable.
Index: code/trunk/src/modules/pickup/PickupPrereqs.h
===================================================================
--- code/trunk/src/modules/pickup/PickupPrereqs.h	(revision 9264)
+++ code/trunk/src/modules/pickup/PickupPrereqs.h	(revision 9348)
@@ -70,8 +70,6 @@
 
     class CollectiblePickup;
-    class DroppedPickup;
     class Pickup;
     class PickupCollection;
-    class PickupCollectionIdentifier;
     class PickupManager;
     class PickupRepresentation;
@@ -86,5 +84,5 @@
     class ShieldPickup;
     class ShrinkPickup;
-
+    class DamageBoostPickup;
 }
 
Index: code/trunk/src/modules/pickup/PickupRepresentation.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupRepresentation.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/PickupRepresentation.cc	(revision 9348)
@@ -52,5 +52,5 @@
         This is primarily for use of the PickupManager in creating a default PickupRepresentation.
     */
-    PickupRepresentation::PickupRepresentation() : BaseObject(NULL), Synchronisable(NULL), spawnerRepresentation_(NULL), pickup_(NULL)
+    PickupRepresentation::PickupRepresentation() : BaseObject(NULL), Synchronisable(NULL), spawnerRepresentation_(NULL)
     {
         RegisterObject(PickupRepresentation);
@@ -64,5 +64,5 @@
         Default Constructor. Registers the object and initializes its member variables.
     */
-    PickupRepresentation::PickupRepresentation(BaseObject* creator) : BaseObject(creator), Synchronisable(creator), spawnerRepresentation_(NULL), pickup_(NULL)
+    PickupRepresentation::PickupRepresentation(BaseObject* creator) : BaseObject(creator), Synchronisable(creator), spawnerRepresentation_(NULL)
     {
         RegisterObject(PickupRepresentation);
@@ -70,6 +70,4 @@
         this->initialize();
         this->registerVariables();
-
-        PickupManager::getInstance().registerRepresentation(this); // Registers the PickupRepresentation with the PickupManager.
     }
 
@@ -84,11 +82,5 @@
 
         if(this->isInitialized())
-        {
-            if(GameMode::isMaster() && this->pickup_ != NULL)
-            {
-                PickupManager::getInstance().unregisterRepresentation(this->pickup_->getPickupIdentifier(), this);
-            }
-            PickupManager::getInstance().unregisterRepresentation(this);
-        }
+            PickupManager::getInstance().unregisterRepresentation(this->getName());
     }
 
@@ -128,15 +120,5 @@
         XMLPortParam(PickupRepresentation, "spawnerTemplate", setSpawnerTemplate, getSpawnerTemplate, xmlelement, mode);
         XMLPortParam(PickupRepresentation, "inventoryRepresentation", setInventoryRepresentation, getInventoryRepresentation, xmlelement, mode);
-        XMLPortObject(PickupRepresentation, Pickupable, "pickup", setPickup, getPickup, xmlelement, mode);
         XMLPortObject(PickupRepresentation, StaticEntity, "spawner-representation", setSpawnerRepresentation, getSpawnerRepresentationIndex, xmlelement, mode);
-
-        if(GameMode::isMaster())
-        {
-            // Registers the PickupRepresentation with the PickupManager through the PickupIdentifier of the Pickupable it represents.
-            PickupManager::getInstance().registerRepresentation(this->pickup_->getPickupIdentifier(), this);
-        }
-
-        if(this->spawnerRepresentation_ != NULL)
-            this->spawnerRepresentation_->setVisible(false);
 
         orxout(verbose, context::pickups) << "PickupRepresentation created: name: '" << this->name_ << "', description: '" << this->description_ << "', spawnerTemplate: '" << this->spawnerTemplate_ << "'." << endl;
@@ -151,5 +133,5 @@
         Returns a pointer to the StaticEntity.
     */
-    StaticEntity* PickupRepresentation::getSpawnerRepresentation(PickupSpawner* spawner)
+    StaticEntity* PickupRepresentation::createSpawnerRepresentation(PickupSpawner* spawner)
     {
         if(this->spawnerRepresentation_ == NULL)
@@ -158,5 +140,5 @@
             if(this->spawnerTemplate_ == "")
             {
-                orxout(verbose, context::pickups) << "PickupRepresentation: Spawner template is empty." << endl;
+                orxout(internal_warning, context::pickups) << "PickupRepresentation: Spawner template is empty." << endl;
                 // If neither spawnerRepresentation nor spawnerTemplate was specified
                 return this->getDefaultSpawnerRepresentation(spawner);
@@ -165,11 +147,23 @@
         }
 
-        StaticEntity* representation = this->spawnerRepresentation_;
-        representation->setVisible(true);
+        this->spawnerRepresentation_->setVisible(true);
+        StaticEntity* temp = this->spawnerRepresentation_;
+        this->spawnerRepresentation_ = NULL;
 
-        this->addTemplate(this->spawnerTemplate_);
-        this->spawnerRepresentation_->setVisible(false);
+        return temp;
+    }
 
-        return representation;
+    void PickupRepresentation::changedName()
+    {
+        // Registers the PickupRepresentation with the PickupManager.
+        PickupManager::getInstance().unregisterRepresentation(this->getOldName());
+        PickupManager::getInstance().registerRepresentation(this->getName(), this);
+    }
+
+    void PickupRepresentation::setSpawnerRepresentation(StaticEntity* representation)
+    {
+        this->spawnerRepresentation_ = representation;
+        if(this->spawnerRepresentation_ != NULL)
+            this->spawnerRepresentation_->setVisible(false);
     }
 
Index: code/trunk/src/modules/pickup/PickupRepresentation.h
===================================================================
--- code/trunk/src/modules/pickup/PickupRepresentation.h	(revision 9264)
+++ code/trunk/src/modules/pickup/PickupRepresentation.h	(revision 9348)
@@ -41,5 +41,4 @@
 
 #include "interfaces/Pickupable.h"
-#include "pickup/PickupIdentifier.h"
 #include "worldentities/StaticEntity.h"
 
@@ -54,5 +53,5 @@
     /**
     @brief
-        The PickupRepresentation class represents a specific pickup type (identified by its @ref orxonox::PickupIdentifier "PickupIdentifier"). It defines the information displayed in the GUI (PickupInventory) and how @ref orxonox::PickupSpawner "PickupSpawners" that spawn the pickup type look like.
+        The PickupRepresentation class represents a specific pickup type. It defines the information displayed in the GUI (PickupInventory) and how @ref orxonox::PickupSpawner "PickupSpawners" that spawn the pickup type look like.
         They are created through XML and are registered with the @ref orxonox::PickupManager "PickupManager".
 
@@ -64,9 +63,5 @@
             spawnerTemplate = "awesomePickupRepresentation"
             inventoryRepresentation = "AwesomePickup"
-        >
-            <pickup>
-                <SomePickup />
-            </pickup>
-        </PickupRepresentation>
+        />
         @endcode
         As you might have noticed, there is a parameter called <em>spawnerTemplate</em> and also another parameter called <em>inventoryRepresentation</em>. Let's first explain the second one, <em>inventoryRepresentation</em>.
@@ -133,13 +128,8 @@
             */
             inline const std::string& getInventoryRepresentation(void) const { return this->inventoryRepresentation_; } // tolua_export
-            /**
-            @brief Get the Pickupable represented by this PickupRepresentation.
-            @param index The index.
-            @return Returns (for index = 0) a pointer to the Pickupable. For index > 0 it returns NULL.
-            */
-            inline const Pickupable* getPickup(unsigned int index) const
-                { if(index == 0) return this->pickup_; return NULL; }
 
-            StaticEntity* getSpawnerRepresentation(PickupSpawner* spawner); //!< Get a spawnerRepresentation for a specific PickupSpawner.
+            virtual void changedName();
+
+            StaticEntity* createSpawnerRepresentation(PickupSpawner* spawner); //!< Create a spawnerRepresentation for a specific PickupSpawner.
 
         protected:
@@ -168,6 +158,6 @@
             @param representation A pointer to the StaticEntity that is the spawnerRepresentation of this PickupRepresentation.
             */
-            inline void setSpawnerRepresentation(StaticEntity* representation)
-                { this->spawnerRepresentation_ = representation; }
+            void setSpawnerRepresentation(StaticEntity* representation);
+
             /**
             @brief Set the image representing the pickup in the PickupInventory.
@@ -176,10 +166,4 @@
             inline void setInventoryRepresentation(const std::string& image)
                 { this->inventoryRepresentation_ = image; }
-            /**
-            @brief Set the Pickupable that is represented by this PickupRepresentation.
-            @param pickup A pointer to the Pickupable.
-            */
-            inline void setPickup(Pickupable* pickup)
-                { this->pickup_ = pickup; }
 
         private:
@@ -195,6 +179,4 @@
             std::string inventoryRepresentation_; //!< The name of an image representing the pickup in the PickupInventory.
 
-            Pickupable* pickup_; //!< The Pickupable that is represented by this PickupRepresentation.
-
     }; // tolua_export
 
Index: code/trunk/src/modules/pickup/PickupSpawner.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupSpawner.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/PickupSpawner.cc	(revision 9348)
@@ -55,48 +55,9 @@
         Pointer to the object which created this item.
     */
-    PickupSpawner::PickupSpawner(BaseObject* creator) : StaticEntity(creator), pickup_(NULL)
+    PickupSpawner::PickupSpawner(BaseObject* creator) : StaticEntity(creator), pickup_(NULL), representation_(NULL), pickupTemplate_(NULL)
     {
         RegisterObject(PickupSpawner);
 
         this->initialize();
-    }
-
-    /**
-    @brief
-        Constructor, Creates a fully functional PickupSpawner.
-    @param creator
-        The creator of this PickupSpawner.
-    @param pickup
-        The Pickupable to be spawned by this PickupSpawner.
-    @param triggerDistance
-        The distance at which the PickupSpawner will trigger.
-    @param respawnTime
-        The minimum time between two spawns.
-    @param maxSpawnedItems
-        The maximum number of items spawned by this PickupSpawner.
-    */
-    PickupSpawner::PickupSpawner(BaseObject* creator, Pickupable* pickup, float triggerDistance, float respawnTime, int maxSpawnedItems) : StaticEntity(creator), pickup_(NULL)
-    {
-        RegisterObject(PickupSpawner);
-
-        this->initialize();
-
-        this->pickup_ = pickup;
-
-        this->triggerDistance_ = triggerDistance;
-        this->respawnTime_ = respawnTime;
-        this->setMaxSpawnedItems(maxSpawnedItems);
-
-        if(this->pickup_ == NULL)
-        {
-            orxout(internal_warning, context::pickups) << "A PickupSpawner was created without a valid Pickupable. This won't work." << endl;
-            this->setActive(false);
-        }
-        else
-        {
-            PickupRepresentation* representation = PickupManager::getInstance().getRepresentation(this->pickup_->getPickupIdentifier());
-            this->attach(representation->getSpawnerRepresentation(this));
-            this->setActive(true);
-        }
     }
 
@@ -112,4 +73,6 @@
         this->spawnsRemaining_ = INF;
         this->selfDestruct_ = false;
+
+        this->setPickupable(NULL);
     }
 
@@ -122,4 +85,30 @@
         if(this->isInitialized() && this->selfDestruct_ && this->pickup_ != NULL)
             this->pickup_->destroy();
+    }
+
+    /**
+    @brief
+        Factory method, Creates a fully functional PickupSpawner.
+    @param creator
+        The creator of this PickupSpawner.
+    @param pickup
+        The Pickupable to be spawned by this PickupSpawner.
+    @param carrier
+        The PickupCarrier that carried the input pickup before it was dropped.
+    @param triggerDistance
+        The distance at which the PickupSpawner will trigger.
+    */
+    /*static*/ PickupSpawner* PickupSpawner::createDroppedPickup(BaseObject* creator, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance)
+    {
+        PickupSpawner* spawner = new PickupSpawner(creator);
+
+        spawner->setPickupable(pickup);
+        spawner->setTriggerDistance(triggerDistance);
+        spawner->setMaxSpawnedItems(1);
+
+        spawner->setPosition(carrier->getCarrierPosition());
+        spawner->block(carrier);
+
+        return spawner;
     }
 
@@ -136,33 +125,8 @@
         SUPER(PickupSpawner, XMLPort, xmlelement, mode);
 
-        XMLPortObject(PickupSpawner, Pickupable, "pickup", setPickupable, getPickupable, xmlelement, mode);
-
+        XMLPortParam(PickupSpawner, "pickup", setPickupTemplateName, getPickupTemplateName, xmlelement, mode);
         XMLPortParam(PickupSpawner, "triggerDistance", setTriggerDistance, getTriggerDistance, xmlelement, mode);
         XMLPortParam(PickupSpawner, "respawnTime", setRespawnTime, getRespawnTime, xmlelement, mode);
         XMLPortParam(PickupSpawner, "maxSpawnedItems", setMaxSpawnedItems, getMaxSpawnedItems, xmlelement, mode);
-
-        if(this->pickup_ == NULL)
-        {
-            orxout(internal_warning, context::pickups) << "A PickupSpawner was created without a valid Pickupable. This won't work." << endl;
-            this->setActive(false);
-        }
-        else
-        {
-            PickupRepresentation* representation = PickupManager::getInstance().getRepresentation(this->pickup_->getPickupIdentifier());
-            this->attach(representation->getSpawnerRepresentation(this));
-            this->setActive(true);
-        }
-    }
-
-    /**
-    @brief
-        Invoked when the activity has changed. Sets visibility of attached objects.
-    */
-    void PickupSpawner::changedActivity()
-    {
-        SUPER(PickupSpawner, changedActivity);
-
-        if(GameMode::isMaster())
-            this->setVisible(this->isActive());
     }
 
@@ -199,5 +163,5 @@
 
                 Vector3 distance = it->getWorldPosition() - this->getWorldPosition();
-                PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(*it);
+                PickupCarrier* carrier = static_cast<PickupCarrier*>(*it);
                 // If a PickupCarrier, that fits the target-range of the Pickupable spawned by this PickupSpawner, is in trigger-distance and the carrier is not blocked.
                 if(distance.length() < this->triggerDistance_ && carrier != NULL && this->blocked_.find(carrier) == this->blocked_.end())
@@ -212,4 +176,43 @@
     /**
     @brief
+        Trigger the PickupSpawner.
+        Adds the pickup to the Pawn that triggered, sets the timer to re-activate and deactives the PickupSpawner.
+    @param carrier
+        Carrier which triggered the PickupSpawner.
+    */
+    void PickupSpawner::trigger(PickupCarrier* carrier)
+    {
+        orxout(verbose, context::pickups) << "PickupSpawner (&" << this << ") triggered and active." << endl;
+
+        PickupCarrier* target = carrier->getTarget(this->pickup_);
+
+        this->block(carrier);
+
+        assert(target);
+        bool pickedUp = this->pickup_->pickup(target);
+        assert(pickedUp);
+        pickedUp = false; // To avoid compiler warning.
+
+        this->setPickupable(NULL);
+        this->decrementSpawnsRemaining();
+    }
+
+    void PickupSpawner::setPickupTemplateName(const std::string& name)
+    {
+        Template* temp = Template::getTemplate(name);
+        if (temp)
+            this->setPickupTemplate(temp);
+    }
+
+    void PickupSpawner::setPickupTemplate(Template* temp)
+    {
+        this->pickupTemplate_ = temp;
+        this->pickupTemplateName_ = temp->getName();
+
+        this->setPickupable(this->createPickup());
+    }
+
+    /**
+    @brief
         Sets the maximum number of spawned items.
     @param items
@@ -233,9 +236,9 @@
             this->spawnsRemaining_--;
 
+        this->setActive(false);
+
         if(this->spawnsRemaining_ != 0 && this->respawnTime_ > 0)
         {
             this->startRespawnTimer();
-
-            this->setActive(false);
             this->fireEvent();
         }
@@ -243,5 +246,4 @@
         {
             orxout(verbose, context::pickups) << "PickupSpawner (&" << this << ") empty, selfdestruct initialized." << endl;
-            this->setActive(false);
             this->destroy();
         }
@@ -255,4 +257,45 @@
     {
         this->respawnTimer_.setTimer(this->respawnTime_, false, createExecutor(createFunctor(&PickupSpawner::respawnTimerCallback, this)));
+    }
+
+    /**
+    @brief
+        Invoked by the timer, re-activates the PickupSpawner.
+    */
+    void PickupSpawner::respawnTimerCallback()
+    {
+        orxout(verbose, context::pickups) << "PickupSpawner (&" << this << ") reactivated." << endl;
+
+        this->setPickupable(this->createPickup());
+    }
+
+    /**
+    @brief
+        Creates a new Pickupable.
+    @return
+        The Pickupable created.
+    */
+    Pickupable* PickupSpawner::createPickup(void)
+    {
+        if(this->spawnsRemaining_ == 0)
+        {
+            orxout(internal_error, context::pickups) << "Massive Error: PickupSpawner still alive until having spawned last item." << endl;
+            return NULL;
+        }
+
+        if (this->pickupTemplate_ != NULL)
+        {
+            Identifier* identifier = this->pickupTemplate_->getBaseclassIdentifier();
+            if (identifier != NULL)
+            {
+                Pickupable* pickup = orxonox_cast<Pickupable*>(identifier->fabricate(this));
+                orxonox_cast<BaseObject*>(pickup)->addTemplate(this->pickupTemplate_);
+                return pickup;
+            }
+            else
+                orxout(internal_error, context::pickups) << "No base class defined in pickup-template " << this->pickupTemplateName_ << endl;
+        }
+
+        return NULL;
     }
 
@@ -265,94 +308,26 @@
     void PickupSpawner::setPickupable(Pickupable* pickup)
     {
-        if(this->pickup_ != NULL)
-        {
-            orxout(internal_error, context::pickups) << "In PickupSpawner (&" << this << "): setPickupable called, with this->pickup_ already set." << endl;
-            return;
-        }
-        if(pickup == NULL)
-        {
-            orxout(internal_error, context::pickups) << "In PickupSpawner (&" << this << "): Argument of setPickupable is NULL." << endl;
-            return;
+        if (this->representation_ != NULL)
+        {
+            this->representation_->destroy();
+            this->representation_ = NULL;
+        }
+
+        if (pickup != NULL)
+        {
+            if (this->pickup_ != NULL)
+                this->pickup_->destroy();
+
+            PickupRepresentation* representation = PickupManager::getInstance().getRepresentation(pickup->getRepresentationName());
+            this->representation_ = representation->createSpawnerRepresentation(this);
+            this->attach(this->representation_);
+            this->setActive(true);
+        }
+        else
+        {
+            this->setActive(false);
         }
 
         this->pickup_ = pickup;
     }
-
-    /**
-    @brief
-        Get the Pickupable that is spawned by this PickupSpawner.
-    @return
-        Returns the Pickupable that is spawned by this PickupSpawner.
-    */
-    const Pickupable* PickupSpawner::getPickupable(void) const
-    {
-        return this->pickup_;
-    }
-
-    /**
-    @brief
-        Trigger the PickupSpawner.
-        Adds the pickup to the Pawn that triggered, sets the timer to re-activate and deactives the PickupSpawner.
-    @param pawn
-        Pawn which triggered the PickupSpawner.
-    */
-    void PickupSpawner::trigger(Pawn* pawn)
-    {
-        if(this->isActive()) // Checks whether PickupSpawner is active.
-        {
-            orxout(verbose, context::pickups) << "PickupSpawner (&" << this << ") triggered and active." << endl;
-
-            PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(pawn);
-            assert(carrier);
-
-            // If the Pawn isn't a target of the Pickupable.
-            if(!carrier->isTarget(this->pickup_))
-            {
-                orxout(verbose, context::pickups) << "PickupSpawner (&" << this << ") triggered but Pawn wasn't a target of the Pickupable." << endl;
-                return;
-            }
-
-            PickupCarrier* target = carrier->getTarget(this->pickup_);
-            Pickupable* pickup = this->getPickup();
-
-            this->block(carrier);
-
-            assert(pickup);
-            assert(target);
-            bool pickedUp = pickup->pickup(target);
-            assert(pickedUp);
-            pickedUp = false; // To avoid compiler warning.
-
-            this->decrementSpawnsRemaining();
-        }
-    }
-
-    /**
-    @brief
-        Creates a new Pickupable.
-    @return
-        The Pickupable created.
-    */
-    Pickupable* PickupSpawner::getPickup(void)
-    {
-        if(this->spawnsRemaining_ == 0)
-        {
-            orxout(internal_error, context::pickups) << "Massive Error: PickupSpawner still alive until having spawned last item." << endl;
-            return NULL;
-        }
-
-        Pickupable* pickup = this->pickup_->clone();
-        return pickup;
-    }
-
-    /**
-    @brief
-        Invoked by the timer, re-activates the PickupSpawner.
-    */
-    void PickupSpawner::respawnTimerCallback()
-    {
-        orxout(verbose, context::pickups) << "PickupSpawner (&" << this << ") reactivated." << endl;
-
-        this->setActive(true);
-    }
 }
Index: code/trunk/src/modules/pickup/PickupSpawner.h
===================================================================
--- code/trunk/src/modules/pickup/PickupSpawner.h	(revision 9264)
+++ code/trunk/src/modules/pickup/PickupSpawner.h	(revision 9348)
@@ -78,9 +78,9 @@
         public:
             PickupSpawner(BaseObject* creator); //!< Default Constructor.
-            PickupSpawner(BaseObject* creator, Pickupable* pickup, float triggerDistance, float respawnTime, int maxSpawnedItems); //!< Constructor.
             virtual ~PickupSpawner(); //!< Destructor.
 
+            static PickupSpawner* createDroppedPickup(BaseObject* creator, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance = 10.0);
+
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);  //!< Method for creating a PickupSpawner through XML.
-            virtual void changedActivity(); //!< Invoked when activity has changed (set visibilty).
             virtual void tick(float dt); //!< Tick, checks if any Pawn is close enough to trigger.
 
@@ -103,6 +103,21 @@
             inline int getMaxSpawnedItems(void) const
                 { return this->maxSpawnedItems_; }
+            /**
+            @brief Returns the name of the template which is used to create a pickup for this spawner.
+            */
+            inline const std::string& getPickupTemplateName() const
+                { return this->pickupTemplateName_; }
+            /**
+            @brief Returns the template which is used to create a pickup for this spawner.
+            */
+            inline Template* getPickupTemplate() const
+                {return this->pickupTemplate_; }
 
-        protected:
+        private:
+            void initialize(void);
+
+            void trigger(PickupCarrier* carrier); //!< Method called when a carrier is close enough.
+            void respawnTimerCallback(); //!< Method called when the timer runs out.
+
             void decrementSpawnsRemaining(void); //!< Decrements the number of remaining spawns.
             void startRespawnTimer(void); //!< Invoked by the timer, re-activates the PickupSpawner.
@@ -128,18 +143,17 @@
             inline void setRespawnTime(float time)
                 { this->respawnTime_ = time; }
+
             void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
 
-            virtual Pickupable* getPickup(void); //!< Creates a new Pickupable.
+            void setPickupTemplateName(const std::string& name);
+            void setPickupTemplate(Template* temp);
 
+            Pickupable* createPickup(void); //!< Creates a new Pickupable.
             void setPickupable(Pickupable* pickup); //!< Sets a Pickupable for the PickupSpawner to spawn.
-            const Pickupable* getPickupable(void) const; //!< Get the Pickupable that is spawned by this PickupSpawner.
 
             Pickupable* pickup_; //!< The pickup to be spawned.
-
-        private:
-            void initialize(void);
-
-            void trigger(Pawn* pawn); //!< Method called when a Pawn is close enough.
-            void respawnTimerCallback(); //!< Method called when the timer runs out.
+            StaticEntity* representation_; //!< The active representation of the spawner.
+            std::string pickupTemplateName_; //!< The name of the pickup template.
+            Template* pickupTemplate_; //!< The template to be used to create a pickupable.
 
             int maxSpawnedItems_; //!< Maximum number of items spawned by this PickupSpawner.
Index: code/trunk/src/modules/pickup/items/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/pickup/items/CMakeLists.txt	(revision 9264)
+++ code/trunk/src/modules/pickup/items/CMakeLists.txt	(revision 9348)
@@ -7,3 +7,4 @@
   ShieldPickup.cc
   ShrinkPickup.cc
+  DamageBoostPickup.cc
 )
Index: code/trunk/src/modules/pickup/items/DamageBoostPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/DamageBoostPickup.cc	(revision 9348)
+++ code/trunk/src/modules/pickup/items/DamageBoostPickup.cc	(revision 9348)
@@ -0,0 +1,198 @@
+/*
+ *   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:
+ *      Kevin Lengauer
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file DamageBoostPickup.cc
+    @brief Implementation of the DamageBoostPickup class.
+*/
+
+#include "DamageBoostPickup.h"
+
+#include <sstream>
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include "worldentities/pawns/SpaceShip.h"
+
+namespace orxonox
+{
+    CreateFactory(DamageBoostPickup);
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes the member variables.
+    */
+    DamageBoostPickup::DamageBoostPickup(BaseObject* creator) : Pickup(creator)
+    {
+        RegisterObject(DamageBoostPickup);
+
+        this->initialize();
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    DamageBoostPickup::~DamageBoostPickup()
+    {
+    }
+
+    /**
+    @brief
+        Initializes the member variables.
+    */
+    void DamageBoostPickup::initialize(void)
+    {
+        this->duration_ = 0.0f;
+        this->damageMultiplier_ = 1.0f; //The default damage multiplier.
+        //Defines who is allowed to pick up the pickup.
+        this->addTarget(ClassIdentifier<SpaceShip>::getIdentifier());
+    }
+
+    /**
+    @brief
+        Method for creating a DamageBoostPickup object through XML.
+    */
+    void DamageBoostPickup::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
+    {
+        SUPER(DamageBoostPickup, XMLPort, xmlelement, mode);
+
+        XMLPortParam(DamageBoostPickup, "duration", setDuration, getDuration, xmlelement, mode);
+        XMLPortParam(DamageBoostPickup, "damageMultiplier", setDamageMultiplier, getDamageMultiplier, xmlelement, mode);
+    }
+
+    // Work in Progress setDamage Function
+    void DamageBoostPickup::setDamageMultiplier(float damageMultiplier)
+    {
+        if(damageMultiplier >= 1.0f)
+        {
+            this->damageMultiplier_ = damageMultiplier;
+        }
+    }
+
+
+    /**
+    @brief
+        Is called when the pickup has transisted from used to unused or the other way around.
+    */
+    void DamageBoostPickup::changedUsed(void)
+    {
+        SUPER(DamageBoostPickup, changedUsed);
+
+        SpaceShip* ship = this->carrierToSpaceShipHelper();
+        if(ship == NULL) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
+            this->Pickupable::destroy();
+
+
+        // If the pickup has transited to used.
+        if(this->isUsed())
+        {
+            // If its durationType is continuous, we set a Timer to be reminded, when the time has run out.
+            if(this->isContinuous())
+            {
+                if(!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() > 0.0f)
+                {
+                    this->durationTimer_.unpauseTimer();
+                }
+                else
+                {
+                    this->durationTimer_.setTimer(this->getDuration(), false, createExecutor(createFunctor(&DamageBoostPickup::pickupTimerCallback, this)));
+                }
+            }
+
+            // Saves the old default Damage that is needed to restore the original damage
+            this->olddamageMultiplier_ = 1.0f;
+            // Sets the new Damage with the damage multiplier
+            ship->setDamageMultiplier(this->getDamageMultiplier());
+        }
+        else
+        {
+
+            // We destroy the pickup if either, the pickup has activationType immediate and durationType once or it has durationType continuous and the duration was exceeded.
+            if((!this->isContinuous() && this->isImmediate()) || (this->isContinuous() && !this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() == this->getDuration()))
+            {
+                this->Pickupable::destroy();
+                ship->setDamageMultiplier ( this->olddamageMultiplier_);
+            }
+            // We pause the Timer if the pickup is continuous and the duration is not yet exceeded,
+            else if(this->isContinuous() && this->durationTimer_.isActive())
+            {
+                this->durationTimer_.pauseTimer();
+            }
+        }
+    }
+
+    /**
+    @brief
+        Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
+    @return
+        A pointer to the SpaceShip, or NULL if the conversion failed.
+    */
+    SpaceShip* DamageBoostPickup::carrierToSpaceShipHelper(void)
+    {
+        PickupCarrier* carrier = this->getCarrier();
+        SpaceShip* ship = orxonox_cast<SpaceShip*>(carrier);
+
+        if(ship == NULL)
+        {
+            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in DamageBoostPickup." << endl;
+        }
+
+        return ship;
+    }
+
+    /**
+    @brief
+        Sets the duration for which the DamageBoostPickup stays active.
+    @param duration
+        The duration in seconds.
+    */
+    void DamageBoostPickup::setDuration(float duration)
+    {
+        if(duration >= 0.0f)
+        {
+            this->duration_ = duration;
+        }
+        else
+        {
+            orxout(internal_error, context::pickups) << "Invalid duration in DamagePickup." << endl;
+            this->duration_ = 0.0f;
+        }
+    }
+
+    /**
+    @brief
+        Helper method. Is called by the Timer as soon as it expires.
+    */
+    void DamageBoostPickup::pickupTimerCallback(void)
+    {
+        this->setUsed(false);
+    }
+
+}
+
Index: code/trunk/src/modules/pickup/items/DamageBoostPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/DamageBoostPickup.h	(revision 9348)
+++ code/trunk/src/modules/pickup/items/DamageBoostPickup.h	(revision 9348)
@@ -0,0 +1,100 @@
+/*
+ *   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:
+ *      Kevin Lengauer
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file DamageBoostPickup.h
+    @brief Declaration of the DamageBoostPickup class.
+    @ingroup PickupItems
+*/
+
+#ifndef _DamageBoostPickup_H__
+#define _DamageBoostPickup_H__
+
+#include "pickup/PickupPrereqs.h"
+
+#include <string>
+
+#include "pickup/Pickup.h"
+#include "tools/interfaces/Tickable.h"
+
+namespace orxonox {
+
+    class _PickupExport DamageBoostPickup : public Pickup, public Tickable
+    {
+        public:
+
+            DamageBoostPickup(BaseObject* creator); //!< Constructor.
+            virtual ~DamageBoostPickup(); //!< Destructor.
+
+            virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a DamageBoostPickup object through XML.
+
+            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
+
+            /**
+            @brief Get the time the DamagePickup lasts.
+            @return Returns the time in seconds the DamagePickup lasts.
+            */
+            inline float getDuration(void) const
+                { return this->duration_; }
+
+            inline void setDuration( float duration );
+
+
+
+            /**
+             @brief set Damage multiplier
+             @param multiplier The default damage multiplier to set
+             */
+            inline float getDamageMultiplier()
+                { return this->damageMultiplier_; }
+
+
+
+
+        protected:
+            void setDamageMultiplier(float damageMultiplier); //!< Sets the DamageMultiplier according to the XML.
+
+
+        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.
+            SpaceShip* carrierToSpaceShipHelper(void); //!< Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
+            void pickupTimerCallback(void);
+
+
+
+            float damageMultiplier_; //!< The damage boost that is transferred to the Pawn.
+            float olddamageMultiplier_; //!< Helper to remember what the actual damage of the Pawn was before we changed it.
+
+            Timer durationTimer_; //!< Timer.
+            float duration_; //! Duration of damage boost.
+
+    };
+}
+
+#endif // _DamageBoostPickup_H__
Index: code/trunk/src/modules/pickup/items/DronePickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/DronePickup.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/items/DronePickup.cc	(revision 9348)
@@ -39,5 +39,4 @@
 
 #include "controllers/DroneController.h"
-#include "pickup/PickupIdentifier.h"
 #include "worldentities/Drone.h"
 #include "worldentities/pawns/Pawn.h"
@@ -75,17 +74,6 @@
     {
         this->addTarget(ClassIdentifier<Pawn>::getIdentifier());
-        this->setDurationTypeDirect(pickupDurationType::once);
+        this->setDurationType(pickupDurationType::once);
         this->droneTemplate_ = "";
-    }
-
-    /**
-    @brief
-        Initializes the PickupIdentifier of this pickup.
-    */
-    void DronePickup::initializeIdentifier(void)
-    {
-        std::string val = this->getDroneTemplate();
-        std::string type = "droneTemplate";
-        this->pickupIdentifier_->addParameter(type, val);
     }
 
@@ -98,6 +86,4 @@
         SUPER(DronePickup, XMLPort, xmlelement, mode);
         XMLPortParam(DronePickup, "droneTemplate", setDroneTemplate, getDroneTemplate, xmlelement, mode);
-
-        this->initializeIdentifier();
     }
 
@@ -108,5 +94,5 @@
         The name of the Template to e set.
     */
-    void DronePickup::setDroneTemplate(std::string templatename){
+    void DronePickup::setDroneTemplate(const std::string& templatename){
         droneTemplate_ = templatename;
     }
@@ -144,5 +130,5 @@
 
                 Controller* controller = drone->getController();
-                DroneController* droneController = dynamic_cast<DroneController*>(controller);
+                DroneController* droneController = orxonox_cast<DroneController*>(controller);
                 if(droneController != NULL)
                 {
@@ -175,5 +161,5 @@
     {
         PickupCarrier* carrier = this->getCarrier();
-        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
+        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
 
         if(pawn == NULL)
@@ -184,22 +170,3 @@
         return pawn;
     }
-
-    /**
-    @brief
-        Creates a duplicate of the input OrxonoxClass.
-    @param item
-        A pointer to the Orxonox class.
-    */
-    void DronePickup::clone(OrxonoxClass*& item)
-    {
-        if(item == NULL)
-            item = new DronePickup(this);
-
-        SUPER(DronePickup, clone, item);
-
-        DronePickup* pickup = dynamic_cast<DronePickup*>(item);
-        pickup->setDroneTemplate(this->getDroneTemplate());
-
-        pickup->initializeIdentifier();
-    }
 }
Index: code/trunk/src/modules/pickup/items/DronePickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/DronePickup.h	(revision 9264)
+++ code/trunk/src/modules/pickup/items/DronePickup.h	(revision 9348)
@@ -70,12 +70,9 @@
 
             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.
 
             const std::string& getDroneTemplate() const; //!< Get the name of the droneTemplate.
 
         protected:
-            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
-
-            void setDroneTemplate(std::string templatename); //!< Set the droneTemplate.
+            void setDroneTemplate(const std::string& templatename); //!< Set the droneTemplate.
 
         private:
Index: code/trunk/src/modules/pickup/items/HealthPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/HealthPickup.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/items/HealthPickup.cc	(revision 9348)
@@ -38,5 +38,4 @@
 #include "core/XMLPort.h"
 
-#include "pickup/PickupIdentifier.h"
 #include "worldentities/pawns/Pawn.h"
 
@@ -87,27 +86,4 @@
     /**
     @brief
-        Initializes the PickupIdentifier of this pickup.
-    */
-    void HealthPickup::initializeIdentifier(void)
-    {
-        std::stringstream stream;
-        stream << this->getHealth();
-        std::string type1 = "health";
-        std::string val1 = stream.str();
-        this->pickupIdentifier_->addParameter(type1, val1);
-
-        std::string val2 = this->getHealthType();
-        std::string type2 = "healthType";
-        this->pickupIdentifier_->addParameter(type2, val2);
-
-        stream.clear();
-        stream << this->getHealthRate();
-        std::string val3 = stream.str();
-        std::string type3 = "healthRate";
-        this->pickupIdentifier_->addParameter(type3, val3);
-    }
-
-    /**
-    @brief
         Method for creating a HealthPickup object through XML.
     */
@@ -118,10 +94,8 @@
         XMLPortParam(HealthPickup, "health", setHealth, getHealth, xmlelement, mode);
         XMLPortParam(HealthPickup, "healthRate", setHealthRate, getHealthRate, xmlelement, mode);
-        XMLPortParam(HealthPickup, "healthType", setHealthType, getHealthType, xmlelement, mode);
+        XMLPortParam(HealthPickup, "healthType", setHealthTypeAsString, getHealthTypeAsString, xmlelement, mode);
 
         if(!this->isContinuous())
-            this->healthRate_ = 0.0f;
-
-        this->initializeIdentifier();
+            this->setHealthRate(0.0f); // TODO: this logic should be inside tick(), not in XMLPort
     }
 
@@ -151,5 +125,5 @@
             this->setHealth(this->getHealth()-health);
 
-            switch(this->getHealthTypeDirect())
+            switch(this->getHealthType())
             {
                 case pickupHealthType::permanent:
@@ -198,5 +172,5 @@
 
                 float health = 0.0f;
-                switch(this->getHealthTypeDirect())
+                switch(this->getHealthType())
                 {
                     case pickupHealthType::permanent:
@@ -227,8 +201,8 @@
         else
         {
-            if(this->getHealthTypeDirect() == pickupHealthType::temporary)
+            if(this->getHealthType() == pickupHealthType::temporary)
             {
                 PickupCarrier* carrier = this->getCarrier();
-                Pawn* pawn = dynamic_cast<Pawn*>(carrier);
+                Pawn* pawn = orxonox_cast<Pawn*>(carrier);
 
                 if(pawn == NULL)
@@ -264,5 +238,5 @@
     {
         PickupCarrier* carrier = this->getCarrier();
-        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
+        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
 
         if(pawn == NULL)
@@ -270,25 +244,4 @@
 
         return pawn;
-    }
-
-    /**
-    @brief
-        Creates a duplicate of the input OrxonoxClass.
-    @param item
-        A pointer to the Orxonox class.
-    */
-    void HealthPickup::clone(OrxonoxClass*& item)
-    {
-        if(item == NULL)
-            item = new HealthPickup(this);
-
-        SUPER(HealthPickup, clone, item);
-
-        HealthPickup* pickup = dynamic_cast<HealthPickup*>(item);
-        pickup->setHealth(this->getHealth());
-        pickup->setHealthRate(this->getHealthRate());
-        pickup->setHealthTypeDirect(this->getHealthTypeDirect());
-
-        pickup->initializeIdentifier();
     }
 
@@ -299,7 +252,7 @@
         Returns the health type as a string.
     */
-    const std::string& HealthPickup::getHealthType(void) const
-    {
-        switch(this->getHealthTypeDirect())
+    const std::string& HealthPickup::getHealthTypeAsString(void) const
+    {
+        switch(this->getHealthType())
         {
             case pickupHealthType::limited:
@@ -352,12 +305,12 @@
         The type as a string.
     */
-    void HealthPickup::setHealthType(std::string type)
+    void HealthPickup::setHealthTypeAsString(const std::string& type)
     {
         if(type == HealthPickup::healthTypeLimited_s)
-            this->setHealthTypeDirect(pickupHealthType::limited);
+            this->setHealthType(pickupHealthType::limited);
         else if(type == HealthPickup::healthTypeTemporary_s)
-            this->setHealthTypeDirect(pickupHealthType::temporary);
+            this->setHealthType(pickupHealthType::temporary);
         else if(type == HealthPickup::healthTypePermanent_s)
-            this->setHealthTypeDirect(pickupHealthType::permanent);
+            this->setHealthType(pickupHealthType::permanent);
         else
             orxout(internal_error, context::pickups) << "Invalid healthType '" << type << "' in HealthPickup." << endl;
Index: code/trunk/src/modules/pickup/items/HealthPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/HealthPickup.h	(revision 9264)
+++ code/trunk/src/modules/pickup/items/HealthPickup.h	(revision 9348)
@@ -97,5 +97,4 @@
 
             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.
 
             /**
@@ -116,11 +115,9 @@
             @return Returns the health type as an enum.
             */
-            inline pickupHealthType::Value getHealthTypeDirect(void) const
+            inline pickupHealthType::Value getHealthType(void) const
                 { return this->healthType_; }
-            const std::string& getHealthType(void) const; //!< Get the health type of this pickup.
+            const std::string& getHealthTypeAsString(void) const; //!< Get the health type of this pickup.
 
         protected:
-            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
-
             void setHealth(float health); //!< Sets the health.
             void setHealthRate(float speed); //!< Set the rate at which health is transferred if the pickup is continuous.
@@ -130,7 +127,7 @@
             @param type The type of this pickup as an enum.
             */
-            inline void setHealthTypeDirect(pickupHealthType::Value type)
+            inline void setHealthType(pickupHealthType::Value type)
                 { this->healthType_ = type; }
-            void setHealthType(std::string type); //!< Set the type of the HealthPickup.
+            void setHealthTypeAsString(const std::string& type); //!< Set the type of the HealthPickup.
 
         private:
Index: code/trunk/src/modules/pickup/items/InvisiblePickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/InvisiblePickup.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/items/InvisiblePickup.cc	(revision 9348)
@@ -40,5 +40,4 @@
 #include "core/XMLPort.h"
 
-#include "pickup/PickupIdentifier.h"
 #include "worldentities/pawns/Pawn.h"
 
@@ -79,17 +78,4 @@
     /**
     @brief
-        Initializes the PickupIdentifier of this pickup.
-    */
-    void InvisiblePickup::initializeIdentifier(void)
-    {
-        std::stringstream stream;
-        stream << this->getDuration();
-        std::string type1 = "duration";
-        std::string val1 = stream.str();
-        this->pickupIdentifier_->addParameter(type1, val1);
-    }
-
-    /**
-    @brief
         Method for creating a HealthPickup object through XML.
     */
@@ -98,6 +84,4 @@
         SUPER(InvisiblePickup, XMLPort, xmlelement, mode);
         XMLPortParam(InvisiblePickup, "duration", setDuration, getDuration, xmlelement, mode);
-
-        this->initializeIdentifier();
     }
 
@@ -148,22 +132,4 @@
     /**
     @brief
-        Creates a duplicate of the input OrxonoxClass.
-    @param item
-        A pointer to the Orxonox class.
-    */
-    void InvisiblePickup::clone(OrxonoxClass*& item)
-    {
-        if(item == NULL)
-            item = new InvisiblePickup(this);
-
-        SUPER(InvisiblePickup, clone, item);
-
-        InvisiblePickup* pickup = dynamic_cast<InvisiblePickup*>(item);
-        pickup->setDuration(this->getDuration());
-        pickup->initializeIdentifier();
-    }
-
-    /**
-    @brief
         Sets the invisibility.
     @param invisibility
@@ -202,5 +168,5 @@
     {
         PickupCarrier* carrier = this->getCarrier();
-        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
+        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
 
         if(pawn == NULL)
Index: code/trunk/src/modules/pickup/items/InvisiblePickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/InvisiblePickup.h	(revision 9264)
+++ code/trunk/src/modules/pickup/items/InvisiblePickup.h	(revision 9348)
@@ -72,8 +72,7 @@
             InvisiblePickup(BaseObject* creator); //!< Constructor.
             virtual ~InvisiblePickup(); //!< 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.
 
             /**
@@ -91,6 +90,4 @@
 
         protected:
-            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
-
             bool setInvisible(bool invisibility); //!< Set the Pawn to be invisible or visible again.
             void setDuration(float duration); //!< Sets the time the InvisibilityPickup will last.
Index: code/trunk/src/modules/pickup/items/MetaPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/MetaPickup.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/items/MetaPickup.cc	(revision 9348)
@@ -36,5 +36,4 @@
 
 #include "interfaces/PickupCarrier.h"
-#include "pickup/PickupIdentifier.h"
 #include "worldentities/pawns/Pawn.h"
 
@@ -80,5 +79,5 @@
         this->addTarget(ClassIdentifier<PickupCarrier>::getIdentifier());
 
-        this->setDurationTypeDirect(pickupDurationType::once);
+        this->setDurationType(pickupDurationType::once);
         this->metaType_ = pickupMetaType::none;
     }
@@ -86,15 +85,4 @@
     /**
     @brief
-        Helper method to initialize the PickupIdentifier.
-    */
-    void MetaPickup::initializeIdentifier(void)
-    {
-        std::string val = this->getMetaType();
-        std::string type = "metaType";
-        this->pickupIdentifier_->addParameter(type, val);
-    }
-
-    /**
-    @brief
         Method for creating a MetaPickup object through XML.
     */
@@ -103,7 +91,5 @@
         SUPER(MetaPickup, XMLPort, xmlelement, mode);
 
-        XMLPortParam(MetaPickup, "metaType", setMetaType, getMetaType, xmlelement, mode);
-
-        this->initializeIdentifier();
+        XMLPortParam(MetaPickup, "metaType", setMetaTypeAsString, getMetaTypeAsString, xmlelement, mode);
     }
 
@@ -121,8 +107,8 @@
         {
             PickupCarrier* carrier = this->getCarrier();
-            if(this->getMetaTypeDirect() != pickupMetaType::none && carrier != NULL)
+            if(this->getMetaType() != pickupMetaType::none && carrier != NULL)
             {
                 // If the metaType is destroyCarrier, then the PickupCarrier is destroyed.
-                if(this->getMetaTypeDirect() == pickupMetaType::destroyCarrier)
+                if(this->getMetaType() == pickupMetaType::destroyCarrier)
                 {
                     Pawn* pawn = orxonox_cast<Pawn*>(carrier);
@@ -139,15 +125,15 @@
 
                     // If the metaType is use, then the Pickupable is set to used.
-                    if(this->getMetaTypeDirect() == pickupMetaType::use && !pickup->isUsed())
+                    if(this->getMetaType() == pickupMetaType::use && !pickup->isUsed())
                     {
                         pickup->setUsed(true);
                     }
                     // If the metaType is drop, then the Pickupable is dropped.
-                    else if(this->getMetaTypeDirect() == pickupMetaType::drop)
+                    else if(this->getMetaType() == pickupMetaType::drop)
                     {
                         pickup->drop();
                     }
                     // If the metaType is destroy, then the Pickupable is destroyed.
-                    else if(this->getMetaTypeDirect() == pickupMetaType::destroy)
+                    else if(this->getMetaType() == pickupMetaType::destroy)
                     {
                         pickup->Pickupable::destroy();
@@ -161,30 +147,11 @@
     /**
     @brief
-        Creates a duplicate of the input OrxonoxClass.
-    @param item
-        A pointer to the Orxonox class.
-    */
-    void MetaPickup::clone(OrxonoxClass*& item)
-    {
-        if(item == NULL)
-            item = new MetaPickup(this);
-
-        SUPER(MetaPickup, clone, item);
-
-        MetaPickup* pickup = dynamic_cast<MetaPickup*>(item);
-        pickup->setMetaTypeDirect(this->getMetaTypeDirect());
-
-        pickup->initializeIdentifier();
-    }
-
-    /**
-    @brief
         Get the meta type of this MetaPickup.
     @return
         Returns a string with the meta type of the MetaPickup.
     */
-    const std::string& MetaPickup::getMetaType(void) const
-    {
-        switch(this->getMetaTypeDirect())
+    const std::string& MetaPickup::getMetaTypeAsString(void) const
+    {
+        switch(this->getMetaType())
         {
             case pickupMetaType::none:
@@ -209,25 +176,25 @@
         A string with the type to be set.
     */
-    void MetaPickup::setMetaType(const std::string& type)
+    void MetaPickup::setMetaTypeAsString(const std::string& type)
     {
         if(type == MetaPickup::metaTypeNone_s)
         {
-            this->setMetaTypeDirect(pickupMetaType::none);
+            this->setMetaType(pickupMetaType::none);
         }
         else if(type == MetaPickup::metaTypeUse_s)
         {
-            this->setMetaTypeDirect(pickupMetaType::use);
+            this->setMetaType(pickupMetaType::use);
         }
         else if(type == MetaPickup::metaTypeDrop_s)
         {
-            this->setMetaTypeDirect(pickupMetaType::drop);
+            this->setMetaType(pickupMetaType::drop);
         }
         else if(type == MetaPickup::metaTypeDestroy_s)
         {
-            this->setMetaTypeDirect(pickupMetaType::destroy);
+            this->setMetaType(pickupMetaType::destroy);
         }
         else if(type == MetaPickup::metaTypeDestroyCarrier_s)
         {
-            this->setMetaTypeDirect(pickupMetaType::destroyCarrier);
+            this->setMetaType(pickupMetaType::destroyCarrier);
         }
         else
Index: code/trunk/src/modules/pickup/items/MetaPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/MetaPickup.h	(revision 9264)
+++ code/trunk/src/modules/pickup/items/MetaPickup.h	(revision 9348)
@@ -69,5 +69,5 @@
 
         The default value is <em>none</em>, which basically does nothing.
-        
+
         The parameter <b>activation type</b> can be used to specify, whether the MetaPickup is used upon pickup (<em>immediate</em>) or not (<em>onUse</em>). With <em>immediate</em> being the default.
 
@@ -95,5 +95,4 @@
 
             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.
 
             /**
@@ -101,18 +100,16 @@
             @return Returns an enum with the meta type of the MetaPickup.
             */
-            inline pickupMetaType::Value getMetaTypeDirect(void) const
+            inline pickupMetaType::Value getMetaType(void) const
                 { return this->metaType_; }
-            const std::string& getMetaType(void) const; //!< Get the meta type of this MetaPickup.
+            const std::string& getMetaTypeAsString(void) const; //!< Get the meta type of this MetaPickup.
 
         protected:
-            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
-
             /**
             @brief Set the meta type of the MetaPickup.
             @param type The meta type as an enum.
             */
-            inline void setMetaTypeDirect(pickupMetaType::Value type)
+            inline void setMetaType(pickupMetaType::Value type)
                 { this->metaType_ =  type; }
-            void setMetaType(const std::string& type); //!< Set the meta type of this MetaPickup.
+            void setMetaTypeAsString(const std::string& type); //!< Set the meta type of this MetaPickup.
 
         private:
Index: code/trunk/src/modules/pickup/items/ShieldPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/ShieldPickup.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/items/ShieldPickup.cc	(revision 9348)
@@ -38,5 +38,4 @@
 #include "core/XMLPort.h"
 
-#include "pickup/PickupIdentifier.h"
 #include "worldentities/pawns/Pawn.h"
 
@@ -80,30 +79,4 @@
     /**
     @brief
-        Initializes the PickupIdentifier of this pickup.
-    */
-    void ShieldPickup::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->getShieldHealth();
-        std::string type2 = "ShieldHealth";
-        std::string val2 = stream.str();
-        this->pickupIdentifier_->addParameter(type2, val2);
-
-        stream.clear();
-        stream << this->getShieldAbsorption();
-        std::string type3 = "ShieldAbsorption";
-        std::string val3 = stream.str();
-        this->pickupIdentifier_->addParameter(type3, val3);
-
-    }
-
-    /**
-    @brief
         Method for creating a ShieldPickup object through XML.
     */
@@ -115,6 +88,4 @@
         XMLPortParam(ShieldPickup, "shieldabsorption", setShieldAbsorption, getShieldAbsorption, xmlelement, mode);
         XMLPortParam(ShieldPickup, "duration", setDuration, getDuration, xmlelement, mode);
-
-        this->initializeIdentifier();
     }
 
@@ -177,5 +148,5 @@
     {
         PickupCarrier* carrier = this->getCarrier();
-        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
+        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
 
         if(pawn == NULL)
@@ -184,24 +155,4 @@
         }
         return pawn;
-    }
-
-    /**
-    @brief
-        Creates a duplicate of the input OrxonoxClass.
-    @param item
-        A pointer to the Orxonox class.
-    */
-    void ShieldPickup::clone(OrxonoxClass*& item)
-    {
-        if(item == NULL)
-            item = new ShieldPickup(this);
-
-        SUPER(ShieldPickup, clone, item);
-
-        ShieldPickup* pickup = dynamic_cast<ShieldPickup*>(item);
-        pickup->setDuration(this->getDuration());
-        pickup->setShieldAbsorption(this->getShieldAbsorption());
-        pickup->setShieldHealth(this->getShieldHealth());
-        pickup->initializeIdentifier();
     }
 
Index: code/trunk/src/modules/pickup/items/ShieldPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/ShieldPickup.h	(revision 9264)
+++ code/trunk/src/modules/pickup/items/ShieldPickup.h	(revision 9348)
@@ -82,5 +82,4 @@
 
             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.
 
             /**
@@ -104,5 +103,4 @@
 
         protected:
-            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
             void pickupTimerCallback(void); //!< Helper method. Is called by the Timer as soon as it expires.
 
Index: code/trunk/src/modules/pickup/items/ShrinkPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/ShrinkPickup.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/items/ShrinkPickup.cc	(revision 9348)
@@ -40,5 +40,4 @@
 #include "core/XMLPort.h"
 
-#include "pickup/PickupIdentifier.h"
 #include "worldentities/pawns/Pawn.h"
 
@@ -81,25 +80,4 @@
     }
 
-    void ShrinkPickup::initializeIdentifier(void)
-    {
-        std::stringstream stream;
-        stream << this->getShrinkFactor();
-        std::string type1 = "shrinkFactor";
-        std::string val1 = stream.str();
-        this->pickupIdentifier_->addParameter(type1, val1);
-
-        stream.clear();
-        stream << this->getDuration();
-        std::string val2 = stream.str();
-        std::string type2 = "duration";
-        this->pickupIdentifier_->addParameter(type2, val2);
-
-        stream.clear();
-        stream << this->getShrinkDuration();
-        std::string val3 = stream.str();
-        std::string type3 = "shrinkDuration";
-        this->pickupIdentifier_->addParameter(type3, val3);
-    }
-
    /**
     @brief
@@ -113,6 +91,46 @@
         XMLPortParam(ShrinkPickup, "duration", setDuration, getDuration, xmlelement, mode);
         XMLPortParam(ShrinkPickup, "shrinkDuration", setShrinkDuration, getShrinkDuration, xmlelement, mode);
-
-        this->initializeIdentifier();
+    }
+
+    /**
+    @brief Sets the shrinking factor.
+    @param factor The factor, needs to greater than 1.
+    */
+    void ShrinkPickup::setShrinkFactor(float factor)
+    {
+        if(factor <= 1.0f)
+        {
+            orxout(internal_warning, context::pickups) << "Invalid shrinking factor in ShrinkPickup. Ignoring.." << endl;
+            return;
+        }
+        this->shrinkFactor_ = factor;
+    }
+
+    /**
+    @brief Set the duration for which the ship remains shrunken.
+    @param duration The duration, needs to be non-negative.
+    */
+    void ShrinkPickup::setDuration(float duration)
+    {
+        if(duration < 0.0f)
+        {
+            orxout(internal_warning, context::pickups) << "Invalid duration in ShrinkPickup. Ignoring.." << endl;
+            return;
+        }
+        this->duration_ = duration;
+    }
+
+    /**
+    @brief Set the shrink duration.
+    @param speed The shrink duration, needs to be positive.
+    */
+    void ShrinkPickup::setShrinkDuration(float speed)
+    {
+        if(speed <= 0.0f)
+        {
+            orxout(internal_warning, context::pickups) << "Invalid shrink duration in ShrinkPickup. Ignoring.." << endl;
+            return;
+        }
+        this->shrinkDuration_ = speed;
     }
 
@@ -148,5 +166,5 @@
     {
         SUPER(ShrinkPickup, changedPickedUp);
-        
+
         if(!this->isPickedUp() && this->isActive_)
         {
@@ -271,5 +289,5 @@
 
                 bool destroy = false;
-                
+
                 // Stop shrinking if the desired size is reached.
                 if(this->timeRemainig_ <= 0.0f)
@@ -314,27 +332,7 @@
     {
         PickupCarrier* carrier = this->getCarrier();
-        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
+        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
 
         return pawn;
     }
-
-    /**
-    @brief
-        Creates a duplicate of the input OrxonoxClass.
-    @param item
-        A pointer to the Orxonox class.
-    */
-    void ShrinkPickup::clone(OrxonoxClass*& item)
-    {
-        if(item == NULL)
-            item = new ShrinkPickup(this);
-
-        SUPER(ShrinkPickup, clone, item);
-        ShrinkPickup* pickup = dynamic_cast<ShrinkPickup*>(item);
-        pickup->setShrinkFactor(this->getShrinkFactor());
-        pickup->setDuration(this->getDuration());
-        pickup->setShrinkDuration(this->getShrinkDuration());
-
-        pickup->initializeIdentifier();
-    }
 }
Index: code/trunk/src/modules/pickup/items/ShrinkPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/ShrinkPickup.h	(revision 9264)
+++ code/trunk/src/modules/pickup/items/ShrinkPickup.h	(revision 9348)
@@ -80,5 +80,4 @@
             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.
 
             /**
@@ -88,10 +87,6 @@
             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) { orxout(internal_warning, context::pickups) << "Invalid shrinking factor in ShrinkPickup. Ignoring.." << endl; return; } this->shrinkFactor_ = factor; }
+            void setShrinkFactor(float factor);
+
             /**
             @brief Get the duration for which the ship remains shrunken.
@@ -100,10 +95,6 @@
             inline float getDuration(void) const
                 { return this->duration_; }
-            /**
-            @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) { orxout(internal_warning, context::pickups) << "Invalid duration in ShrinkPickup. Ignoring.." << endl; return; } this->duration_ = duration; }
+            void setDuration(float duration);
+
             /**
             @brief Get the shrink speed.
@@ -112,13 +103,5 @@
             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) { orxout(internal_warning, context::pickups) << "Invalid shrink duration in ShrinkPickup. Ignoring.." << endl; return; } this->shrinkDuration_ = speed; }
-
-        protected:
-            void initializeIdentifier(void);
+            void setShrinkDuration(float speed);
 
         private:
@@ -135,5 +118,5 @@
             float currentFactor_;       //!< The shrink factor that is currently applied.
             float timeRemainig_;        //!< The remaining shrink time.
-            
+
             Pawn* carrierToPawnHelper(void);
             Timer durationTimer_;
Index: code/trunk/src/modules/pickup/items/SpeedPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/SpeedPickup.cc	(revision 9264)
+++ code/trunk/src/modules/pickup/items/SpeedPickup.cc	(revision 9348)
@@ -38,5 +38,4 @@
 #include "core/XMLPort.h"
 
-#include "pickup/PickupIdentifier.h"
 #include "worldentities/pawns/SpaceShip.h"
 
@@ -80,29 +79,4 @@
     /**
     @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.
     */
@@ -114,6 +88,4 @@
         XMLPortParam(SpeedPickup, "speedAdd", setSpeedAdd, getSpeedAdd, xmlelement, mode);
         XMLPortParam(SpeedPickup, "speedMultiply", setSpeedMultiply, getSpeedMultiply, xmlelement, mode);
-
-        this->initializeIdentifier();
     }
 
@@ -176,5 +148,5 @@
     {
         PickupCarrier* carrier = this->getCarrier();
-        SpaceShip* ship = dynamic_cast<SpaceShip*>(carrier);
+        SpaceShip* ship = orxonox_cast<SpaceShip*>(carrier);
 
         if(ship == NULL)
@@ -184,25 +156,4 @@
 
         return ship;
-    }
-
-    /**
-    @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();
     }
 
Index: code/trunk/src/modules/pickup/items/SpeedPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/SpeedPickup.h	(revision 9264)
+++ code/trunk/src/modules/pickup/items/SpeedPickup.h	(revision 9348)
@@ -81,5 +81,4 @@
 
             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.
 
             /**
@@ -103,5 +102,4 @@
 
         protected:
-            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
             void pickupTimerCallback(void); //!< Function that gets called when timer ends.
 
@@ -112,5 +110,5 @@
         private:
             void initialize(void); //!< Initializes the member variables.
-            SpaceShip* carrierToSpaceShipHelper(void); //!< Helper to transform the PickupCarrier to a SpaceSHip, and throw an error message if the conversion fails.
+            SpaceShip* carrierToSpaceShipHelper(void); //!< Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
 
             Timer durationTimer_; //!< Timer.
Index: code/trunk/src/modules/pong/Pong.cc
===================================================================
--- code/trunk/src/modules/pong/Pong.cc	(revision 9264)
+++ code/trunk/src/modules/pong/Pong.cc	(revision 9348)
@@ -256,7 +256,7 @@
         Is called when the player scored.
     */
-    void Pong::playerScored(PlayerInfo* player)
-    {
-        Deathmatch::playerScored(player);
+    void Pong::playerScored(PlayerInfo* player, int score)
+    {
+        Deathmatch::playerScored(player, score);
 
         if (this->center_ != NULL) // If there is a centerpoint.
Index: code/trunk/src/modules/pong/Pong.h
===================================================================
--- code/trunk/src/modules/pong/Pong.h	(revision 9264)
+++ code/trunk/src/modules/pong/Pong.h	(revision 9348)
@@ -73,5 +73,5 @@
             virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player.
 
-            virtual void playerScored(PlayerInfo* player); //!< Is called when the player scored.
+            virtual void playerScored(PlayerInfo* player, int score = 1); //!< Is called when the player scored.
 
             /**
Index: code/trunk/src/modules/tetris/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/tetris/CMakeLists.txt	(revision 9264)
+++ code/trunk/src/modules/tetris/CMakeLists.txt	(revision 9348)
@@ -3,4 +3,6 @@
   TetrisCenterpoint.cc
   TetrisStone.cc
+  TetrisBrick.cc
+  TetrisScore.cc
 )
 
@@ -10,4 +12,5 @@
   LINK_LIBRARIES
     orxonox
+    overlays
   SOURCE_FILES ${TETRIS_SRC_FILES}
 )
Index: code/trunk/src/modules/tetris/Tetris.cc
===================================================================
--- code/trunk/src/modules/tetris/Tetris.cc	(revision 9264)
+++ code/trunk/src/modules/tetris/Tetris.cc	(revision 9348)
@@ -23,6 +23,12 @@
  *      ...
  *   Co-authors:
- *      ...
- *
+ *      Johannes Ritz
+ *
+ *
+ *
+ *
+ *TASK c) end the game in a nicer way
+ *TASK d) save the highscore
+ *TASK e) eye candy
  */
 
@@ -42,4 +48,5 @@
 #include "TetrisCenterpoint.h"
 #include "TetrisStone.h"
+#include "TetrisBrick.h"
 #include "infos/PlayerInfo.h"
 
@@ -52,4 +59,5 @@
     @brief
         Constructor. Registers and initializes the object.
+    @ingroup Tetris
     */
     Tetris::Tetris(BaseObject* creator) : Deathmatch(creator)
@@ -57,11 +65,13 @@
         RegisterObject(Tetris);
 
-        this->activeStone_ = NULL;
+        this->activeBrick_ = 0;
 
         // Pre-set the timer, but don't start it yet.
-        this->starttimer_.setTimer(1.0, false, createExecutor(createFunctor(&Tetris::startStone, this)));
+        this->starttimer_.setTimer(1.0, false, createExecutor(createFunctor(&Tetris::startBrick, this)));
         this->starttimer_.stopTimer();
 
         this->player_ = NULL;
+        this->setHUDTemplate("TetrisHUD");
+        this->futureBrick_ = 0;
     }
 
@@ -82,5 +92,18 @@
     void Tetris::cleanup()
     {
-
+        if (this->activeBrick_)
+        {
+            this->activeBrick_->destroy();
+            this->activeBrick_ = 0;
+        }
+        if (this->futureBrick_)
+        {
+            this->futureBrick_->destroy();
+            this->futureBrick_ = 0;
+        }
+
+        for (std::list<SmartPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
+            (*it)->destroy();
+        this->stones_.clear();
     }
 
@@ -89,11 +112,14 @@
         SUPER(Tetris, tick, dt);
 
-        if(this->activeStone_ != NULL)
-        {
-            if(!this->isValidStonePosition(this->activeStone_, this->activeStone_->getPosition()))
-            {
-                this->activeStone_->setVelocity(Vector3::ZERO);
-                this->createStone();
-                this->startStone();
+        if((this->activeBrick_ != NULL)&&(!this->hasEnded()))
+        {
+            if(!this->isValidBrickPosition(this->activeBrick_))
+            {
+                for (unsigned int i = 0; i < this->activeBrick_->getNumberOfStones(); i++)
+                    this->stones_.push_back(this->activeBrick_->getStone(i));
+                this->activeBrick_->setVelocity(Vector3::ZERO);
+                this->activeBrick_->releaseStones(this->center_);
+                this->findFullRows();
+                this->startBrick();
             }
         }
@@ -109,9 +135,6 @@
             return false;
 
-        for(std::vector<TetrisStone*>::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
-        {
-            if(stone == *it)
-                continue;
-
+        for(std::list<SmartPtr<TetrisStone> >::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
+        {
             const Vector3& currentStonePosition = (*it)->getPosition(); //!< Saves the position of the currentStone
 
@@ -123,19 +146,61 @@
     }
 
+    /**
+    @brief
+        Check for each stone in a brick if it is moved the right way.
+    */
+    bool Tetris::isValidMove(TetrisBrick* brick, const Vector3& position, bool isRotation = false)
+    {
+        assert(brick);
+
+        for (unsigned int i = 0; i < brick->getNumberOfStones(); i++ )
+        {
+            TetrisStone* stone = brick->getStone(i);
+            Vector3 stonePosition; //the current stone's offset to position
+            if(isRotation)
+                stonePosition = rotateVector(stone->getPosition(), brick->getRotationCount()+1);
+            else
+                stonePosition = rotateVector(stone->getPosition(), brick->getRotationCount());
+
+            if(! this->isValidMove(stone, position + stonePosition ))
+            {
+                return false;
+            }
+
+            //catch illegal rotation (such that collisions with ground are not permitted)
+            if(isRotation)
+            {
+                if((position + stonePosition).y < this->center_->getStoneSize()/2.0f) //!< If the stone has reached the bottom of the level
+                {
+                    return false;
+                }
+            }
+        }
+        return true;
+
+    }
+
+
+
     bool Tetris::isValidStonePosition(TetrisStone* stone, const Vector3& position)
     {
         assert(stone);
 
-        // we use a reverse iterator because we have to check for collisions with the topmost stones first
-        for(std::vector<TetrisStone*>::const_reverse_iterator it = this->stones_.rbegin(); it != this->stones_.rend(); ++it)
-        {
-            if(stone == *it)
+        // check for collisions with all stones
+        for(std::list<SmartPtr<TetrisStone> >::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
+        {
+            //Vector3 currentStonePosition = rotateVector((*it)->getPosition(), this->activeBrick_->getRotationCount());
+            const Vector3& currentStonePosition = (*it)->getPosition(); //!< Saves the position of the currentStone
+            //!< Saves the position of the currentStone
+
+            //filter out cases where the falling stone is already below a steady stone
+            if(position.y < currentStonePosition.y - this->center_->getStoneSize()/2.0f)
                 continue;
-
-            const Vector3& currentStonePosition = (*it)->getPosition(); //!< Saves the position of the currentStone
-
             if((position.x == currentStonePosition.x) && (position.y < currentStonePosition.y + this->center_->getStoneSize()))
             {
-                this->activeStone_->setPosition(Vector3(this->activeStone_->getPosition().x, currentStonePosition.y+this->center_->getStoneSize(), this->activeStone_->getPosition().z));
+                float y_offset = static_cast<int>((this->activeBrick_->getPosition().y-currentStonePosition.y+10)/10)*10 + currentStonePosition.y;
+                if(y_offset < 0) //filter out extreme cases (very rare bug)
+                    y_offset = 0;
+                this->activeBrick_->setPosition(Vector3(this->activeBrick_->getPosition().x, y_offset, this->activeBrick_->getPosition().z));
                 return false;
             }// This case applies if the stones overlap partially vertically
@@ -145,5 +210,8 @@
         if(position.y < this->center_->getStoneSize()/2.0f) //!< If the stone has reached the bottom of the level
         {
-            stone->setPosition(Vector3(stone->getPosition().x, this->center_->getStoneSize()/2.0f, stone->getPosition().z));
+            float yOffset = stone->getPosition().y + this->center_->getStoneSize()/2.0f;//calculate offset
+            if(yOffset < 0) //catch brake-throughs
+                yOffset = 0;
+            this->activeBrick_->setPosition(Vector3(this->activeBrick_->getPosition().x, yOffset, this->activeBrick_->getPosition().z));
             return false;
         }
@@ -151,4 +219,44 @@
         return true;
     }
+    /**
+     * @brief This function determines wether a brick touches another brick or the ground.
+     *
+     */
+    bool Tetris::isValidBrickPosition(TetrisBrick* brick)
+    {
+        assert(brick);
+
+        const Vector3& brickPosition = this->activeBrick_->getPosition();
+
+        // check all stones in the brick
+        for (unsigned int i = 0; i < brick->getNumberOfStones(); i++ )
+        {
+            TetrisStone* stone = brick->getStone(i);
+            const Vector3& stonePosition = rotateVector(stone->getPosition(), brick->getRotationCount());
+            if(! this->isValidStonePosition(stone, brickPosition + stonePosition) )
+            {
+                // recurse because all stones have to checked again after the brick was re-positioned
+                this->isValidBrickPosition(brick);
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+    @brief
+        A Vector3 is rolled 90 * degrees * amount (anticlockwise rotation)
+    */
+    Vector3 Tetris::rotateVector(Vector3 position, unsigned int amount)
+    {
+        float temp = 0;
+        for(unsigned int i = 0; i < amount; i++)
+        {
+            temp = position.x;
+            position.x = -position.y;
+            position.y = temp;
+        }
+        return position;
+    }
 
     /**
@@ -160,6 +268,6 @@
         if (this->center_ != NULL) // There needs to be a TetrisCenterpoint, i.e. the area the game takes place.
         {
-            // Create the first stone.
-            this->createStone();
+            // Create the first brick.
+            this->createBrick();
         }
         else // If no centerpoint was specified, an error is thrown and the level is exited.
@@ -190,4 +298,10 @@
     void Tetris::end()
     {
+        this->activeBrick_->setVelocity(Vector3::ZERO);
+        if(this->activeBrick_ != NULL)
+        {
+            this->player_->stopControl();
+        }
+
         this->cleanup();
 
@@ -225,9 +339,7 @@
     }
 
-    /**
-    @brief
-        Starts the first stone.
-    */
-    void Tetris::startStone(void)
+
+
+    void Tetris::startBrick(void)
     {
         if(this->player_ == NULL)
@@ -235,39 +347,50 @@
 
         unsigned int cameraIndex = 0;
-        if(this->activeStone_ != NULL)
+        if(this->activeBrick_ != NULL)
         {
             // Get camera settings
-            cameraIndex = this->activeStone_->getCurrentCameraIndex();
+            cameraIndex = this->activeBrick_->getCurrentCameraIndex();
             this->player_->stopControl();
-        }
-        
-        // Make the last stone to be created the active stone.
-        this->activeStone_ = this->stones_.back();
-        
-        this->player_->startControl(this->activeStone_);
-        this->activeStone_->setVelocity(0.0f, -this->center_->getStoneSpeed(), 0.0f);
-        this->activeStone_->setCameraPosition(cameraIndex);
-    }
-
-    /**
-    @brief
-        Creates a new stone.
-    */
-    void Tetris::createStone(void)
-    {
-        // Create a new stone and add it to the list of stones.
-        TetrisStone* stone = new TetrisStone(this->center_);
-        this->stones_.push_back(stone);
-        
-        // Apply the stone template to the stone.
-        stone->addTemplate(this->center_->getStoneTemplate());
-        
-        // Attach the stone to the Centerpoint and set the position of the stone to be at the top middle.
-        this->center_->attach(stone);
+            // destroy old active brick
+            this->activeBrick_->destroy();
+        }
+
+        // Make the last brick to be created the active brick.
+        this->activeBrick_ = this->futureBrick_;
+        this->futureBrick_ = 0;
+
+        // set its position
+        this->player_->startControl(this->activeBrick_);
         float xPos = (this->center_->getWidth()/2 + ((this->center_->getWidth() % 2)*2-1)/2.0f)*this->center_->getStoneSize();
         float yPos = (this->center_->getHeight()-0.5f)*this->center_->getStoneSize();
-        stone->setPosition(xPos, yPos, 0.0f);
-        stone->setGame(this);
-    }
+        this->activeBrick_->setPosition(xPos, yPos, 0.0f);
+        this->activeBrick_->setVelocity(0.0f, -this->center_->getStoneSpeed(), 0.0f);
+        this->activeBrick_->setCameraPosition(cameraIndex);
+
+        // create a new future brick
+        this->createBrick();
+
+        // check if the new brick is in a valid position, otherwise end the game
+        if (!this->isValidBrickPosition(this->activeBrick_))
+            this->end();
+    }
+
+    void Tetris::createBrick(void)             //TODO: random rotation offset between 0 and 3 (times 90°)
+    {
+        // create new futureBrick_
+        this->futureBrick_ = new TetrisBrick(this->center_);
+
+
+        // Apply the stone template to the stone.
+        this->futureBrick_->addTemplate(this->center_->getBrickTemplate());
+
+        // Attach the brick to the Centerpoint and set the position of the brick to be at the left side.
+        this->center_->attach(this->futureBrick_);
+        float xPos = (this->center_->getWidth()*1.6f + ((this->center_->getWidth() % 2)*2-1)/2.0f)*this->center_->getStoneSize();
+        float yPos = (this->center_->getHeight()-5.1f)*this->center_->getStoneSize();
+        this->futureBrick_->setPosition(xPos, yPos, 0.0f);
+        this->futureBrick_->setGame(this);
+    }
+
 
     /**
@@ -282,4 +405,9 @@
     }
 
+    /*TetrisCenterpoint* Tetris::getCenterpoint(void) const
+    {
+        return this->center_;
+    }*/
+
     /**
     @brief Set the TetrisCenterpoint (the playing field).
@@ -291,3 +419,56 @@
     }
 
+    /**
+    @brief Check each row if it is full. Removes all full rows. Update
+    @brief Manages score.
+    */
+    void Tetris::findFullRows()
+    {
+        unsigned int correctPosition = 0;
+        unsigned int stonesPerRow = 0;
+        for (unsigned int row = 0; row < this->center_->getHeight(); row++)
+        {
+            stonesPerRow = 0;
+            for(std::list<SmartPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); )
+            {
+                std::list<SmartPtr<TetrisStone> >::iterator it_temp = it++;
+                correctPosition = static_cast<unsigned int>(((*it_temp)->getPosition().y - 5)/this->center_->getStoneSize());
+                if(correctPosition == row)
+                {
+                    stonesPerRow++;
+                    if(stonesPerRow == this->center_->getWidth())
+                    {
+                        clearRow(row);
+                        row--; //the row counter has to be decreased in order to detect multiple rows!
+                        this->playerScored(this->player_);// add points
+                        //increase the stone's speed
+                        this->center_->setStoneSpeed(this->center_->getStoneSpeed()+1.0f);
+                    }
+                }
+            }
+        }
+    }
+
+    void Tetris::clearRow(unsigned int row)
+    {// clear the full row
+        for(std::list<SmartPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); )
+        {
+            if(static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize()) == row)
+            {
+                (*it)->destroy();
+                this->stones_.erase(it++);
+            }
+            else
+                ++it;
+        }
+      // adjust height of stones above the deleted row //TODO: check if this could be a source of a bug.
+        for(std::list<SmartPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
+        {
+            if(static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize()) > row)
+                (*it)->setPosition((*it)->getPosition()-Vector3(0,10,0));
+        }
+
+    }
+
+
 }
Index: code/trunk/src/modules/tetris/Tetris.h
===================================================================
--- code/trunk/src/modules/tetris/Tetris.h	(revision 9264)
+++ code/trunk/src/modules/tetris/Tetris.h	(revision 9348)
@@ -56,5 +56,5 @@
         public:
             Tetris(BaseObject* creator); //!< Constructor. Registers and initializes the object.
-            virtual ~Tetris(); //!< Destructor. Cleans up, if initialized.           
+            virtual ~Tetris(); //!< Destructor. Cleans up, if initialized.
 
             virtual void start(void); //!< Starts the Tetris minigame.
@@ -68,23 +68,32 @@
 
             PlayerInfo* getPlayer(void) const; //!< Get the player.
+            WeakPtr<TetrisCenterpoint> getCenterpoint(void)
+                { return this->center_; }
 
             bool isValidMove(TetrisStone* stone, const Vector3& position);
+            bool isValidMove(TetrisBrick* brick, const Vector3& position, bool isRotation);
+            Vector3 rotateVector(Vector3 position, unsigned int amount);
 
         protected:
             virtual void spawnPlayersIfRequested(); //!< Spawns player.
 
+
         private:
-            void startStone(void); //!< Starts with the first stone.
-            void createStone(void);
+            void startBrick(void);
+            void createBrick(void);
             void cleanup(void); //!< Cleans up the Gametype by destroying the ball and the bats.
             bool isValidStonePosition(TetrisStone* stone, const Vector3& position);
-            
+            bool isValidBrickPosition(TetrisBrick* brick);
+            void findFullRows(void);
+            void clearRow(unsigned int row);
+
+
             PlayerInfo* player_;
 
             WeakPtr<TetrisCenterpoint> center_; //!< The playing field.
-            std::vector<TetrisStone*> stones_; //!< A list of all stones in play.
-            std::vector< std::vector<bool> > grid_;
-            TetrisStone* activeStone_;
-            
+            std::list<SmartPtr<TetrisStone> > stones_; //!< A list of all stones in play.
+            WeakPtr<TetrisBrick> activeBrick_;
+            WeakPtr<TetrisBrick> futureBrick_;
+
             Timer starttimer_; //!< A timer to delay the start of the game.
     };
Index: code/trunk/src/modules/tetris/TetrisBrick.cc
===================================================================
--- code/trunk/src/modules/tetris/TetrisBrick.cc	(revision 9348)
+++ code/trunk/src/modules/tetris/TetrisBrick.cc	(revision 9348)
@@ -0,0 +1,247 @@
+/*
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file TetrisBrick.cc
+    @brief Implementation of the TetrisBrick class.
+*/
+
+#include "TetrisBrick.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include "TetrisCenterpoint.h"
+#include "TetrisStone.h"
+#include "Tetris.h"
+#include "util/Math.h"
+
+namespace orxonox
+{
+    CreateFactory(TetrisBrick);
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    @ingroup Tetris
+    */
+    TetrisBrick::TetrisBrick(BaseObject* creator): ControllableEntity(creator)
+    {
+        RegisterObject(TetrisBrick);
+        this->shapeIndex_ = static_cast<unsigned int>(rnd(7.0f)); //<! random number between 0 and 7
+        this->stonesPerBrick_ = 4; //<! most tetris bricks is formed by 4 stones
+        this->delay_ = false;
+        this->delayTimer_.setTimer(0.2f, false, createExecutor(createFunctor(&TetrisBrick::enableMovement, this)));
+        this->lockRotation_ = false;
+        this->tetris_ = this->getTetris();
+        this->size_ = 10.0f; //TODO: fix this via this->tetris_->center_->getStoneSize();
+        this->rotationCount_ = 0;
+        this->createBrick(); //<! create a whole new Brick;
+    }
+
+    /**
+    @brief
+        This function partly initializes a TetrisBrick as an array of TetrisStones
+    */
+    void TetrisBrick::createBrick(void)
+    { //Index 0 : single stone, 1 : 4 in a row; 2: 4-Block right shifted; 3: 'T' 4: 4-Block left shifted;
+      //Index 5 : 4-Block; 6 : 'L'; 7 : mirrored 'L';
+        if(this->shapeIndex_ == 0)
+            this->stonesPerBrick_ = 1;
+        for (unsigned int i = 0; i < this->stonesPerBrick_; i++)
+        {
+            // Create a new stone and add it to the brick.
+            TetrisStone* stone = new TetrisStone(this);
+            this->brickStones_.push_back(stone);
+            this->attach(stone);
+            this->formBrick(stone, i);
+            if(this->tetris_ != NULL)
+            {
+                stone->setGame(this->tetris_);
+                if(this->tetris_->getCenterpoint() != NULL)
+                    stone->addTemplate(this->tetris_->getCenterpoint()->getStoneTemplate());
+                else
+                	orxout()<< "tetris_->getCenterpoint == NULL in TetrisBrick.cc"<< endl;
+            }
+            else
+                orxout()<< "tetris_ == NULL in TetrisBrick.cc"<< endl;
+        }
+    }
+
+    /**
+    @brief
+        This function creates the shape of a TetrisBrick. ! Spaghetti-Code !
+    @param i
+        The stone's number.
+    @param stone
+        The TetrisStone that is placed relative to the brick's position.
+    */
+    void TetrisBrick::formBrick(TetrisStone* stone, unsigned int i)
+    {
+        if(i == 0) //setting the first stone as
+        {
+            stone->setPosition(0.0f, 0.0f, 0.0f);
+        }
+        else if(i == 1)
+        {
+            stone->setPosition(0.0f, size_, 0.0f);
+        }
+        else if(i == 2)
+        {
+            if(this->shapeIndex_ == 1 || this->shapeIndex_ == 6 || this->shapeIndex_ == 7)
+            {
+            	stone->setPosition(0.0f, 2*size_, 0.0f);
+            }
+            else if(this->shapeIndex_ == 3 || this->shapeIndex_ == 4|| this->shapeIndex_ == 5)
+            {
+            	stone->setPosition(size_, 0, 0.0f);
+            }
+            else if(this->shapeIndex_ == 2)
+            {
+            	stone->setPosition(-size_, 0, 0.0f);
+            }
+        }
+        else if(i == 3)
+        {
+            if(this->shapeIndex_ == 2 || this->shapeIndex_ == 5)
+            {
+            	stone->setPosition(size_, size_, 0.0f);
+            }
+            else if(this->shapeIndex_ == 1)
+            {
+            	stone->setPosition(0, 3*size_, 0.0f);
+            }
+            else if(this->shapeIndex_ == 3 || this->shapeIndex_ == 7)
+            {
+            	stone->setPosition(-size_, 0, 0.0f);
+            }
+            else if(this->shapeIndex_ == 4)
+            {
+            	stone->setPosition(-size_, size_, 0.0f);
+            }
+            else if(this->shapeIndex_ == 6)
+            {
+            	stone->setPosition(size_, 0, 0.0f);
+            }
+        }
+    }
+
+    bool TetrisBrick::isValidMove(const Vector3& position, bool isRotation = false)
+    {
+    	return this->tetris_->isValidMove(this,position, isRotation);
+    }
+
+    TetrisStone* TetrisBrick::getStone(unsigned int i)
+    {
+    	if(i < this->brickStones_.size())
+            return this->brickStones_[i];
+    	else return NULL;
+    }
+
+
+    Tetris* TetrisBrick::getTetris()
+    {
+        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
+        {
+            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype().get());
+            return tetrisGametype;
+        }
+        return NULL;
+    }
+
+    /**
+    @brief
+        Overloaded the function to rotate the Brick.
+    @param value
+        A vector whose first component is the angle by which to rotate.
+    */
+    void TetrisBrick::moveFrontBack(const Vector2& value)
+    {
+        if(value.x < 0) //speedup on key down
+        {
+            this->setVelocity(this->getVelocity()*1.1);
+        }
+        else if(!this->lockRotation_) //rotate when key up is pressed
+        {
+        	if(!isValidMove(this->getPosition(), true)) //catch illegal rotations
+        	    return;
+            this->lockRotation_ = true; // multiple calls of this function have to be filtered out.
+            this->rotationTimer_.setTimer(0.1f, false, createExecutor(createFunctor(&TetrisBrick::unlockRotation, this)));
+            Quaternion q(Degree(90), Vector3::UNIT_Z);
+            this->setOrientation(this->getOrientation()*q); //rotation: roll 90°
+            this->rotationCount_ = (this->rotationCount_ + 1) % 4;
+        }
+    }
+
+    /**
+    @brief
+        Overloaded the function to steer the Brick right and left
+    @param value
+        A vector whose first component is the direction in which we want to steer the Brick.
+    */
+    void TetrisBrick::moveRightLeft(const Vector2& value)
+    {
+        if(!this->delay_)
+        {
+            const Vector3& position = this->getPosition();
+            Vector3 newPos = Vector3(position.x+value.x/abs(value.x)*this->size_, position.y, position.z);
+            if(!this->isValidMove(newPos))
+                return;
+
+            this->setPosition(newPos);
+            this->delay_ = true;
+            this->delayTimer_.startTimer();
+        }
+    }
+
+    /**
+    @brief
+        Is called when the player changed.
+    */
+    void TetrisBrick::changedPlayer()
+    {
+        this->setVelocity(0.0f, 0.0f, 0.0f);
+    }
+
+    /**
+    @brief
+        Attaches stones to the Centerpoint.
+    */
+    void TetrisBrick::releaseStones(TetrisCenterpoint* center)
+    {
+        assert(this->tetris_);
+        for(unsigned int i = 0; i < this->brickStones_.size(); i++)
+        {
+            this->brickStones_[i]->detachFromParent();
+            this->brickStones_[i]->attachToParent(center);
+            this->brickStones_[i]->setPosition(this->getPosition()+this->tetris_->rotateVector(this->brickStones_[i]->getPosition(),this->rotationCount_ ));
+        }
+        this->brickStones_.clear();
+    }
+
+}
Index: code/trunk/src/modules/tetris/TetrisBrick.h
===================================================================
--- code/trunk/src/modules/tetris/TetrisBrick.h	(revision 9348)
+++ code/trunk/src/modules/tetris/TetrisBrick.h	(revision 9348)
@@ -0,0 +1,106 @@
+/*
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file TetrisBrick.h
+    @brief Declaration of the TetrisBrick class.
+    @ingroup Tetris
+*/
+
+#ifndef _TetrisBrick_H__
+#define _TetrisBrick_H__
+
+#include "tetris/TetrisPrereqs.h"
+
+#include "worldentities/ControllableEntity.h"
+#include "tools/Timer.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        ContainerClass in order to create TetrisBricks by combining TetrisStones.
+    @author
+
+    @ingroup Tetris
+    */
+    class _TetrisExport TetrisBrick : public ControllableEntity
+    {
+        public:
+            TetrisBrick(BaseObject* creator); //!< Constructor. Registers and initializes the object.
+            virtual ~TetrisBrick() {}
+
+            virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
+            virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
+            virtual void changedPlayer(); //!< Is called when the player changed.
+
+            bool isValidMove(const Vector3& position, bool isRotation);
+            unsigned int getNumberOfStones(void) const
+                { return this->brickStones_.size(); }
+            TetrisStone* getStone(unsigned int i);
+
+            void setGame(Tetris* tetris)
+                { assert(tetris); tetris_ = tetris; }
+            unsigned int getRotationCount(void)
+                { return this->rotationCount_;}
+
+            void releaseStones(TetrisCenterpoint* center);
+
+        protected:
+            void createBrick(void); //!< Create a cluster of TetrisStones
+            void formBrick(TetrisStone* stone, unsigned int i);
+            Tetris* getTetris();
+
+            unsigned int shapeIndex_; //!< My way to represent the different brick shapes.
+            unsigned int stonesPerBrick_; //!< So many stones are contained in this brick.
+            std::vector<TetrisStone*> brickStones_; //!< A list of all stones in a brick.
+
+
+            void enableMovement(void)
+                { this->delay_ = false; }
+            void unlockRotation(void)
+                { this->lockRotation_ = false; }
+
+            float getSize(void) const
+                { return this->size_; }
+
+
+            float size_; //!< The dimensions a stone has in the game world. //TODO: get stone dimensions
+            bool delay_;
+            bool lockRotation_;
+
+            unsigned int rotationCount_; //!< Stores the bricks orientation
+            Timer delayTimer_;
+            Timer rotationTimer_; ///!< This timer is used to filter out multiple rotation inputs.
+            Tetris* tetris_; //<! The Tetris class is responsible to initialize this value.
+
+    };
+}
+
+#endif /* _TetrisBrick_H__ */
Index: code/trunk/src/modules/tetris/TetrisCenterpoint.cc
===================================================================
--- code/trunk/src/modules/tetris/TetrisCenterpoint.cc	(revision 9264)
+++ code/trunk/src/modules/tetris/TetrisCenterpoint.cc	(revision 9348)
@@ -30,4 +30,5 @@
     @file TetrisCenterpoint.cc
     @brief Implementation of the TetrisCenterpoint class.
+    @ingroup Tetris
 */
 
@@ -55,4 +56,5 @@
         this->stoneSize_ = 10.0f;
         this->stoneTemplate_ = "";
+        this->brickTemplate_ = "";
         this->stoneSpeed_ = 20.0f;
         
@@ -69,7 +71,8 @@
 
         XMLPortParam(TetrisCenterpoint, "width", setWidth, getWidth, xmlelement, mode); // die Breite
-        XMLPortParam(TetrisCenterpoint, "height", setHeight, setWidth, xmlelement, mode); // die Grösse
+        XMLPortParam(TetrisCenterpoint, "height", setHeight, getHeight, xmlelement, mode); // die Grösse //was sollte das mit setWidth??
         XMLPortParam(TetrisCenterpoint, "stoneSize", setStoneSize, getStoneSize, xmlelement, mode); 
         XMLPortParam(TetrisCenterpoint, "stoneTemplate", setStoneTemplate, getStoneTemplate, xmlelement, mode);
+        XMLPortParam(TetrisCenterpoint, "brickTemplate", setBrickTemplate, getBrickTemplate, xmlelement, mode);
         XMLPortParam(TetrisCenterpoint, "stoneSpeed", setStoneSpeed, getStoneSpeed, xmlelement, mode);
     }
Index: code/trunk/src/modules/tetris/TetrisCenterpoint.h
===================================================================
--- code/trunk/src/modules/tetris/TetrisCenterpoint.h	(revision 9264)
+++ code/trunk/src/modules/tetris/TetrisCenterpoint.h	(revision 9348)
@@ -45,5 +45,6 @@
 
 namespace orxonox
-{
+{//idea: add 2 triggers to the centerpoint (one to determine when a box would go above the centerpoint;
+//the other to find out when the lowest row is filled totally)
     
     /**
@@ -118,4 +119,17 @@
             
             /**
+            @brief Set the template for the bricks.
+            @param template The template name to be applied to each brick.
+            */
+            void setBrickTemplate(const std::string& templateName)
+                { this->brickTemplate_ = templateName; }
+            /**
+            @brief Get the template for the bricks.
+            @return Returns the template name to be applied to each brick.
+            */
+            const std::string& getBrickTemplate(void) const
+                { return this->brickTemplate_; }
+
+            /**
             @brief Set the speed of the stones.
             @param speed The speed to be set.
@@ -137,4 +151,5 @@
             float stoneSize_;
             std::string stoneTemplate_;
+            std::string brickTemplate_;
             float stoneSpeed_;
 
Index: code/trunk/src/modules/tetris/TetrisPrereqs.h
===================================================================
--- code/trunk/src/modules/tetris/TetrisPrereqs.h	(revision 9264)
+++ code/trunk/src/modules/tetris/TetrisPrereqs.h	(revision 9348)
@@ -68,4 +68,6 @@
     class TetrisCenterpoint;
     class TetrisStone;
+    class TetrisBrick;
+    class TetrisScore;
 }
 
Index: code/trunk/src/modules/tetris/TetrisScore.cc
===================================================================
--- code/trunk/src/modules/tetris/TetrisScore.cc	(revision 9348)
+++ code/trunk/src/modules/tetris/TetrisScore.cc	(revision 9348)
@@ -0,0 +1,124 @@
+/*
+ *   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:
+ *      Johannes Ritz
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file TetrisScore.cc
+    @brief Implementation of the TetrisScore class.
+    @ingroup Tetris
+*/
+
+#include "TetrisScore.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+
+#include "infos/PlayerInfo.h"
+
+#include "Tetris.h"
+
+namespace orxonox
+{
+    CreateFactory(TetrisScore);
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    @ingroup Tetris
+    */
+    TetrisScore::TetrisScore(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(TetrisScore);
+
+        this->owner_ = 0;
+        this->player_ = NULL;
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    TetrisScore::~TetrisScore()
+    {
+    }
+
+    /**
+    @brief
+        Method to create a TetrisScore through XML.
+    */
+    void TetrisScore::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(TetrisScore, XMLPort, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Is called each tick.
+        Creates and sets the caption to be displayed by the TetrisScore.
+    @param dt
+        The time that has elapsed since the last tick.
+    */
+    void TetrisScore::tick(float dt)
+    {
+        SUPER(TetrisScore, tick, dt);
+
+        // If the owner is set. The owner being a Tetris game.
+        if (this->owner_ != NULL)
+        {
+            std::string score("0");
+	        if(!this->owner_->hasEnded())
+            {
+                //get the player
+                player_ = this->owner_->getPlayer();
+            }
+
+            if(this->owner_->hasStarted())
+            {
+                // Save the name and score of each player as a string.
+                if (player_ != NULL)
+                    score = multi_cast<std::string>(this->owner_->getScore(player_));
+            }
+            this->setCaption(score);
+        }
+    }
+
+    /**
+    @brief
+        Is called when the owner changes.
+        Sets the owner to NULL, if it is not a pointer to a Tetris game.
+    */
+    void TetrisScore::changedOwner()
+    {
+        SUPER(TetrisScore, changedOwner);
+
+        if (this->getOwner() != NULL && this->getOwner()->getGametype())
+            this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype().get());
+        else
+            this->owner_ = 0;
+    }
+}
Index: code/trunk/src/modules/tetris/TetrisScore.h
===================================================================
--- code/trunk/src/modules/tetris/TetrisScore.h	(revision 9348)
+++ code/trunk/src/modules/tetris/TetrisScore.h	(revision 9348)
@@ -0,0 +1,71 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file TetrisScore.h
+    @brief Declaration of the TetrisScore class.
+    @ingroup Tetris
+*/
+
+#ifndef _TetrisScore_H__
+#define _TetrisScore_H__
+
+#include "tetris/TetrisPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        The TetrisScore class displays the score for a game of @ref orxonox::Tetris "Tetris".
+
+    @author
+        Johannes Ritz
+
+    @ingroup Tetris
+    */
+    class _TetrisExport TetrisScore : public OverlayText, public Tickable
+    {
+        public:
+            TetrisScore(BaseObject* creator);
+            virtual ~TetrisScore();
+
+            virtual void tick(float dt); //!< Creates and sets the caption to be displayed by the TetrisScore.
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedOwner(); //!< Is called when the owner changes.
+
+        private:
+            Tetris* owner_; //!< The Tetris game that owns this TetrisScore.
+            PlayerInfo* player_; //!< Store information about the player permanently.
+    };
+}
+#endif /* _TetrisScore_H__ */
Index: code/trunk/src/modules/tetris/TetrisStone.cc
===================================================================
--- code/trunk/src/modules/tetris/TetrisStone.cc	(revision 9264)
+++ code/trunk/src/modules/tetris/TetrisStone.cc	(revision 9348)
@@ -30,4 +30,5 @@
     @file TetrisStone.cc
     @brief Implementation of the TetrisStone class.
+    @ingroup Tetris
 */
 
@@ -47,11 +48,13 @@
         Constructor. Registers and initializes the object.
     */
-    TetrisStone::TetrisStone(BaseObject* creator) : ControllableEntity(creator)
+    TetrisStone::TetrisStone(BaseObject* creator) : MovableEntity(creator)
     {
         RegisterObject(TetrisStone);
-        
+
         this->size_ = 10.0f;
         this->delay_ = false;
         this->delayTimer_.setTimer(0.2f, false, createExecutor(createFunctor(&TetrisStone::enableMovement, this)));
+        this->lockRotation_ = false;
+
     }
 
@@ -64,7 +67,15 @@
     void TetrisStone::moveFrontBack(const Vector2& value)
     {
-        if(value.x < 0)
+        if(value.x < 0) //speedup on key down
         {
             this->setVelocity(this->getVelocity()*1.1);
+        }
+        else if(!this->lockRotation_) //rotate when key up is pressed
+        {
+            this->lockRotation_ = true; // multiple calls of this function have to be filtered out.
+            this->rotationTimer_.setTimer(0.1f, false, createExecutor(createFunctor(&TetrisStone::unlockRotation, this)));
+            Quaternion q(Degree(90), Vector3::UNIT_Z);
+            this->setOrientation(this->getOrientation()*q); //rotation: roll 90°
+
         }
     }
Index: code/trunk/src/modules/tetris/TetrisStone.h
===================================================================
--- code/trunk/src/modules/tetris/TetrisStone.h	(revision 9264)
+++ code/trunk/src/modules/tetris/TetrisStone.h	(revision 9348)
@@ -38,5 +38,5 @@
 #include "tetris/TetrisPrereqs.h"
 
-#include "worldentities/ControllableEntity.h"
+#include "worldentities/MovableEntity.h"
 #include "tools/Timer.h"
 
@@ -51,5 +51,5 @@
     @ingroup Tetris
     */
-    class _TetrisExport TetrisStone : public ControllableEntity
+    class _TetrisExport TetrisStone : public MovableEntity
     {
         public:
@@ -81,8 +81,12 @@
             void enableMovement(void)
                 { this->delay_ = false; }
-            
+            void unlockRotation(void)
+                { this->lockRotation_ = false; }
+
             float size_; //!< The dimensions a stone has in the game world.
             bool delay_;
+            bool lockRotation_;
             Timer delayTimer_;
+            Timer rotationTimer_; ///!< This timer is used to filter out multiple rotation inputs.
 
             Tetris* tetris_;
Index: code/trunk/src/modules/towerdefense/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/towerdefense/CMakeLists.txt	(revision 9348)
+++ code/trunk/src/modules/towerdefense/CMakeLists.txt	(revision 9348)
@@ -0,0 +1,17 @@
+SET_SOURCE_FILES(TOWERDEFENSE_SRC_FILES
+  TowerDefense.cc
+  Tower.cc
+  TowerDefenseCenterpoint.cc
+  TowerDefenseHUDController.cc
+  TowerDefensePlayerStats.cc
+
+)
+
+ORXONOX_ADD_LIBRARY(TowerDefense
+  MODULE
+  FIND_HEADER_FILES
+  LINK_LIBRARIES
+    orxonox
+    overlays
+  SOURCE_FILES ${TOWERDEFENSE_SRC_FILES}
+)
Index: code/trunk/src/modules/towerdefense/TDEnemy.h
===================================================================
--- code/trunk/src/modules/towerdefense/TDEnemy.h	(revision 9348)
+++ code/trunk/src/modules/towerdefense/TDEnemy.h	(revision 9348)
@@ -0,0 +1,26 @@
+/*
+ * TDEnemy.h
+ *
+ *  Created on: Mar 30, 2012
+ *      Author: weigeltm
+ */
+
+#ifndef TDENEMY_H_
+#define TDENEMY_H_
+
+class TDEnemy
+{
+
+private:
+    float health;
+    float speed;
+    float armour;
+
+
+
+
+
+};
+
+
+#endif /* TDENEMY_H_ */
Index: code/trunk/src/modules/towerdefense/Tower.cc
===================================================================
--- code/trunk/src/modules/towerdefense/Tower.cc	(revision 9348)
+++ code/trunk/src/modules/towerdefense/Tower.cc	(revision 9348)
@@ -0,0 +1,113 @@
+//
+//  Tower.cc
+//  Orxonox
+//
+//  Created by Fabian Mentzer on 29.04.12.
+//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+/* Not implemented fully */
+
+#include "Tower.h"
+
+#include "core/CoreIncludes.h"
+//#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(Tower);
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    */
+    Tower::Tower(BaseObject* creator) : Pawn(creator)
+    {
+        RegisterObject(Tower);
+
+        this->setCollisionType(WorldEntity::Dynamic);
+
+        //this->removeAllEngines();
+
+        /*
+        this->size_ = 10.0f;
+        this->delay_ = false;
+        this->delayTimer_.setTimer(0.2f, false, createExecutor(createFunctor(&TetrisStone::enableMovement, this)));
+        */
+    }
+
+    void Tower::setOrientation(const Quaternion& orientation)
+    {
+        static int ori;
+        orxout() << "orientation " << ++ori << endl;
+    }
+
+    void Tower::rotateYaw(const Vector2& value)
+    {
+        static int yaw;
+        orxout() << "rotateYaw " << ++yaw << endl;
+    }
+
+    void Tower::rotatePitch(const Vector2& value)
+    {
+        static int pitch;
+        orxout() << "rotatePitch " << ++pitch << endl;
+    }
+
+    void Tower::rotateRoll(const Vector2& value)
+    {
+        static int roll;
+        orxout() << "rotateRoll" << ++roll << endl;
+    }
+
+    // This function is called whenever a player presses the up or the down key.
+    // You have to implement what happens when the up or the down key is pressed.
+    // value.x < 0 means: down key is pressed.
+    // I suggest to create a new class which is a controllable entity I will refer to as "TowerMover". This is the controllable entity that the
+    // player controls in order to move the tower along the centerpoint and in order to place the tower at the appropriate position.
+    //
+
+    // The tower itsself is controlled by a WayPointPatroController at the instance you place it on the centerpoint.
+    //(don't forget to set the team_ parameter such that all tower are in the same team)
+
+    //How to move a tower: simply attach the tower to the TowerMover
+    //How to place a tower: detach the tower from the TowerMover
+
+    /**
+    @brief
+        Overloaded the function to rotate the stone.
+    @param value
+        A vector whose first component is the angle by which to rotate.
+    */
+    /*
+    void Tower::moveFrontBack(const Vector2& value)
+    {
+        //orxout() << "frontBack.x: " << value.x << endl;
+    }
+    */
+
+    /**
+    @brief
+        Overloaded the function to steer the stone right and left
+    @param value
+        A vector whose first component is the direction in which we want to steer the stone.
+    */
+    /*
+    void Tower::moveRightLeft(const Vector2& value)
+    {
+        //orxout() << "rightLeft.x: " << value.x << endl;
+
+        if(!this->delay_)
+        {
+            const Vector3& position = this->getPosition();
+            Vector3 newPos = Vector3(position.x+value.x/abs(value.x)*this->size_, position.y, position.z);
+            if(!this->tetris_->isValidMove(this, newPos))
+                return;
+
+            this->setPosition(newPos);
+            this->delay_ = true;
+            this->delayTimer_.startTimer();
+        }
+    }
+    */
+}
Index: code/trunk/src/modules/towerdefense/Tower.h
===================================================================
--- code/trunk/src/modules/towerdefense/Tower.h	(revision 9348)
+++ code/trunk/src/modules/towerdefense/Tower.h	(revision 9348)
@@ -0,0 +1,52 @@
+//
+//  Tower.h
+//  Orxonox
+//
+//  Created by Fabian Mentzer on 29.04.12.
+//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+/**
+@brief
+See TowerDefenseReadme.txt for Information.
+
+@ingroup TowerDefense
+*/
+
+
+#ifndef Orxonox_Tower_h
+#define Orxonox_Tower_h
+
+#include "towerdefense/TowerDefensePrereqs.h"
+#include "worldentities/pawns/SpaceShip.h"
+
+
+namespace orxonox
+{
+    class _TowerDefenseExport Tower : public Pawn
+    {
+    public:
+        Tower(BaseObject* creator);
+        virtual ~Tower() {};
+
+        // Maybe later override these to move towers with cursor keys
+        /*
+        virtual void moveFrontBack(const Vector2& value);
+        virtual void moveRightLeft(const Vector2& value);
+        */
+
+        // Overriding these to stop towers from spasing out
+        void setOrientation(const Quaternion& orientation);
+        virtual void rotateYaw(const Vector2& value);
+        virtual void rotatePitch(const Vector2& value);
+        virtual void rotateRoll(const Vector2& value);
+
+        void setGame(TowerDefense* towerdefense)
+        { assert(towerdefense); game_ = towerdefense; }
+    private:
+        TowerDefense* game_;
+    };
+}
+
+
+#endif
Index: code/trunk/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefense.cc	(revision 9348)
+++ code/trunk/src/modules/towerdefense/TowerDefense.cc	(revision 9348)
@@ -0,0 +1,307 @@
+/*
+ *   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:
+ *
+ *   Co-authors:
+ *      ...
+ *
+ *NACHRICHT:
+ *
+ * Hier empfehle ich euch die gesamte Spielogik unter zu bringen. Viele Funktionen werden automatisch
+ * bei gewissen Ereignissen aufgerufen bzw. lösen Ereignisse aus
+ *
+ *Z.B:
+ * start() //wird aufgerufen, bevor das Spiel losgeht
+ * end() //wenn man diese Funktion aufruft wird
+ * pawnKilled() // wird aufgerufen, wenn ein Pawn stirbt (z.B: wenn )
+ * playerScored() // kann man aufrufen um dem Spieler Punkte zu vergeben.
+ *
+ *
+ *
+ *TIPP: Eclipse hilft euch schnell auf bereits vorhanden Funktionen zuzugreifen:
+ * einfach "this->" eingeben und kurz warten. Dann tauch eine Liste mit Vorschlägen auf. Wenn ihr jetzt weiter
+ * tippt, werden die Vorschläge entsprechend gefiltert.
+ *
+ *
+ *TIPP: schaut euch mal Tetris::createStone() an. Dort wird ein TetrisStone-Objekt (ControllableEntity) erzeugt,
+ * ihm ein Template zugewiesen (welches vorher im Level definiert wurde und dem CenterPoint übergeben wurde)
+ * Ähnlich könnt ihr vorgehen, um einen Turm zu erzeugen. (Zusätzlich braucht ein Turm noch einen Controller)
+ * z.B: WaypointPatrolController. Wenn kein Team zugewiesen wurde bekämpft ein WaypointPatrolController alles,
+ * was in seiner Reichweite liegt.
+ *
+ *
+ *HUD:
+ * Ein Gametype kann ein HUD (Head up Display haben.) Z.B: hat Pong eine Anzeige welcher Spieler wieviele Punkte hat.
+ * Generell kann man a) Grafiken oder b) Zeichen in einer HUD anzeigen.
+ * Fuer den ersten Schritt reicht reiner Text.
+ *
+ * a)
+ * PongScore.cc uebernehmen und eigene Klasse draus machen.
+ * Wenn ihr bloss anzeigen wollt wieviele Punkte der Spieler bereits erspielt hat (Punkte = Kapital fuer neue Tuerme) dann orientiert ihr euch an
+ * TetrisScore.cc (im pCuts branch): http://www.orxonox.net/browser/code/branches/pCuts/src/modules/tetris/TetrisScore.cc
+ * Ich habe TetrisScore lediglich dazu gebraucht, um eine Variable auf dem HUD auszugeben. Ein Objekt fuer statischen Text gibt es bereits.
+ *
+ * b)
+ * Im naesten Schritt erstellt man die Vorlage fuer das HUD-Objekt: siehe /data/overlays/pongHUD
+ * OverlayText ist eine Vorlage fuer statischen text zb: "Points Scored:". Aus mir nicht erklaerlichen Gruenden sollte man die OverlayText
+ * Objekte immer erst nach dem PongScore anlegen.
+ *
+ * c)  Im TowerDefense gamtype muss im Constructor noch das HUD-Template gesetzt werden.
+ *
+ * d) in CMakeLists.txt noch das Module includen das fuer die Overlays zustaendig ist. Siehe das gleiche File im Pong module.
+ *
+ *
+ *
+ */
+
+#include "TowerDefense.h"
+#include "Tower.h"
+#include "TowerDefenseCenterpoint.h"
+
+#include "worldentities/SpawnPoint.h"
+#include "worldentities/pawns/Pawn.h"
+#include "worldentities/pawns/SpaceShip.h"
+#include "controllers/WaypointController.h"
+
+#include "graphics/Model.h"
+#include "infos/PlayerInfo.h"
+
+#include "chat/ChatManager.h"
+
+/* Part of a temporary hack to allow the player to add towers */
+#include "core/command/ConsoleCommand.h"
+
+namespace orxonox
+{
+    CreateUnloadableFactory(TowerDefense);
+
+    TowerDefense::TowerDefense(BaseObject* creator) : Deathmatch(creator)
+    {
+        RegisterObject(TowerDefense);
+
+        this->setHUDTemplate("TowerDefenseHUD");
+
+        this->stats_ = new TowerDefensePlayerStats();
+
+        /* Temporary hack to allow the player to add towers */
+        this->dedicatedAddTower_ = createConsoleCommand( "addTower", createExecutor( createFunctor(&TowerDefense::addTower, this) ) );
+    }
+
+    TowerDefense::~TowerDefense()
+    {
+        /* Part of a temporary hack to allow the player to add towers */
+        if (this->isInitialized())
+        {
+            if( this->dedicatedAddTower_ )
+                delete this->dedicatedAddTower_;
+        }
+    }
+
+    void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint)
+    {
+        orxout() << "Centerpoint now setting..." << endl;
+        this->center_ = centerpoint;
+        orxout() << "Centerpoint now set..." << endl;
+    }
+
+    void TowerDefense::start()
+    {
+        Deathmatch::start();
+
+        const int kInitialTowerCount = 3;
+        Coordinate initialTowerCoordinates[kInitialTowerCount] = {{3,2}, {8,5}, {12,10}};
+
+        for (int i = 0; i < kInitialTowerCount; i++)
+        {
+            Coordinate coordinate = initialTowerCoordinates[i];
+            addTower(coordinate.x, coordinate.y);
+        }
+
+        ChatManager::message("Use the console command addTower x y to add towers");
+
+        //TODO: let the player control his controllable entity && TODO: create a new ControllableEntity for the player
+    }
+
+    void TowerDefense::end()
+    {
+        Deathmatch::end();
+
+        ChatManager::message("Match is over");
+    }
+
+    void TowerDefense::addTower(int x, int y)
+    {
+        const TowerCost towerCost = TDDefaultTowerCost;
+
+        if (!this->hasEnoughCreditForTower(towerCost))
+        {
+            orxout() << "not enough credit: " << (this->stats_->getCredit()) << " available, " << TDDefaultTowerCost << " needed.";
+            return;
+        }
+
+        if (this->towerExists(x,y))
+        {
+            orxout() << "tower exists!!" << endl;
+            return;
+        }
+
+        /*
+        unsigned int width = this->center_->getWidth();
+        unsigned int height = this->center_->getHeight();
+        */
+
+        int tileScale = (int) this->center_->getTileScale();
+
+        if (x > 15 || y > 15 || x < 0 || y < 0)
+        {
+            //Hard coded: TODO: let this depend on the centerpoint's height, width and fieldsize (fieldsize doesn't exist yet)
+            orxout() << "Can not add Tower: x and y should be between 0 and 15" << endl;
+            return;
+        }
+
+        orxout() << "Will add tower at (" << (x-8) * tileScale << "," << (y-8) * tileScale << ")" << endl;
+
+        // Add tower to coordinatesStack
+        Coordinate newTowerCoordinates = {x, y};
+        addedTowersCoordinates_.push_back(newTowerCoordinates);
+
+        // Reduce credit
+        this->stats_->buyTower(towerCost);
+
+        // Create tower
+        Tower* newTower = new Tower(this->center_);
+        newTower->addTemplate(this->center_->getTowerTemplate());
+
+        newTower->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 75);
+        newTower->setGame(this);
+    }
+
+    bool TowerDefense::hasEnoughCreditForTower(TowerCost towerCost)
+    {
+        return ((this->stats_->getCredit()) >= towerCost);
+    }
+
+    bool TowerDefense::towerExists(int x, int y)
+    {
+        for(std::vector<Coordinate>::iterator it = addedTowersCoordinates_.begin(); it != addedTowersCoordinates_.end(); ++it)
+        {
+            Coordinate currentCoordinates = (Coordinate) (*it);
+            if (currentCoordinates.x == x && currentCoordinates.y == y)
+                return true;
+        }
+
+        return false;
+    }
+
+
+    void TowerDefense::tick(float dt)
+    {
+        SUPER(TowerDefense, tick, dt);
+    }
+
+    // Function to test if we can add waypoints using code only. Doesn't work yet
+
+    // THE PROBLEM: WaypointController's getControllableEntity() returns null, so it won't track. How do we get the controlableEntity to NOT BE NULL???
+    /*
+    void TowerDefense::addWaypointsAndFirstEnemy()
+    {
+        SpaceShip *newShip = new SpaceShip(this->center_);
+        newShip->addTemplate("spaceshipassff");
+
+        WaypointController *newController = new WaypointController(newShip);
+        newController->setAccuracy(3);
+
+        Model *wayPoint1 = new Model(newController);
+        wayPoint1->setMeshSource("crate.mesh");
+        wayPoint1->setPosition(7,-7,5);
+        wayPoint1->setScale(0.2);
+
+        Model *wayPoint2 = new Model(newController);
+        wayPoint2->setMeshSource("crate.mesh");
+        wayPoint2->setPosition(7,7,5);
+        wayPoint2->setScale(0.2);
+
+        newController->addWaypoint(wayPoint1);
+        newController->addWaypoint(wayPoint2);
+
+        // The following line causes the game to crash
+
+        newShip->setController(newController);
+//        newController -> getPlayer() -> startControl(newShip);
+        newShip->setPosition(-7,-7,5);
+        newShip->setScale(0.1);
+        //newShip->addSpeed(1);
+
+
+
+//      this->center_->attach(newShip);
+    }
+    */
+    /*
+    void TowerDefense::playerEntered(PlayerInfo* player)
+    {
+        Deathmatch::playerEntered(player);
+
+        const std::string& message = player->getName() + " entered the game";
+        ChatManager::message(message);
+    }
+
+    bool TowerDefense::playerLeft(PlayerInfo* player)
+    {
+        bool valid_player = Deathmatch::playerLeft(player);
+
+        if (valid_player)
+        {
+            const std::string& message = player->getName() + " left the game";
+            ChatManager::message(message);
+        }
+
+        return valid_player;
+    }
+
+
+    void TowerDefense::pawnKilled(Pawn* victim, Pawn* killer)
+    {
+        if (victim && victim->getPlayer())
+        {
+            std::string message;
+            if (killer)
+            {
+                if (killer->getPlayer())
+                    message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName();
+                else
+                    message = victim->getPlayer()->getName() + " was killed";
+            }
+            else
+                message = victim->getPlayer()->getName() + " died";
+
+            ChatManager::message(message);
+        }
+
+        Deathmatch::pawnKilled(victim, killer);
+    }
+
+    void TowerDefense::playerScored(PlayerInfo* player, int score)
+    {
+        Gametype::playerScored(player, score);
+    }*/
+}
Index: code/trunk/src/modules/towerdefense/TowerDefense.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefense.h	(revision 9348)
+++ code/trunk/src/modules/towerdefense/TowerDefense.h	(revision 9348)
@@ -0,0 +1,98 @@
+/*
+ *   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:
+ *
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+ /**
+    @brief
+        GameType class for TowerDefense. See TowerDefenseReadme.txt for Information.
+
+    @ingroup TowerDefense
+ */
+
+
+#ifndef _TowerDefense_H__
+#define _TowerDefense_H__
+
+#include "towerdefense/TowerDefensePrereqs.h"
+#include "gametypes/Deathmatch.h"
+
+ #include "TowerDefensePlayerStats.h"
+
+namespace orxonox
+{
+    class _TowerDefenseExport TowerDefense : public Deathmatch
+    {
+    public:
+        TowerDefense(BaseObject* creator);
+        virtual ~TowerDefense();
+
+        virtual void start(); //<! The function is called when the gametype starts
+        virtual void end();
+        virtual void tick(float dt);
+        //virtual void playerEntered(PlayerInfo* player);
+        //virtual bool playerLeft(PlayerInfo* player);
+
+        //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
+        //virtual void playerScored(PlayerInfo* player, int score);
+
+
+        /*  Called by TowerDefenseCenterpoint upon game start
+            The centerpoint is used to create towers
+        */
+        void setCenterpoint(TowerDefenseCenterpoint *centerpoint);
+
+        /* Adds a tower at x, y in the playfield */
+        void addTower(int x, int y);
+
+        /* Part of a temporary hack to allow the player to add towers */
+        ConsoleCommand* dedicatedAddTower_;
+
+        //TODO: void spawnNewWave()
+        //TODO: create a timer which regularly calls the spawnNewWave function  (time driven)
+        //      or spawn a new wave when the old wave has been killed           (event driven)
+
+
+    private:
+        TowerDefenseCenterpoint *center_;
+
+        /* handles stats */
+        TowerDefensePlayerStats *stats_;
+        bool hasEnoughCreditForTower(TowerCost towerCost);
+
+        bool towerExists(int x, int y);
+
+        typedef struct {
+            int x;
+            int y;
+        } Coordinate;
+
+        std::vector<Coordinate> addedTowersCoordinates_;
+        std::vector<Tower*> towers_;
+    };
+}
+
+#endif /* _TowerDefense_H__ */
Index: code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.cc	(revision 9348)
+++ code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.cc	(revision 9348)
@@ -0,0 +1,109 @@
+/*
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file TowerDefenseCenterpoint.cc
+    @brief Implementation of the TowerDefenseCenterpoint class.
+*/
+
+#include "TowerDefenseCenterpoint.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include "TowerDefense.h"
+
+namespace orxonox
+{
+    CreateFactory(TowerDefenseCenterpoint);
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object and checks whether the gametype is actually TowerDefense.
+    */
+    TowerDefenseCenterpoint::TowerDefenseCenterpoint(BaseObject* creator) : MobileEntity(creator)
+    {
+        RegisterObject(TowerDefenseCenterpoint);
+
+        this->width_ = 15;
+        this->height_ = 15;
+        this->towerTemplate_ = "";
+
+        //this->setCollisionType(Static);
+
+        this->checkGametype();
+
+    }
+
+    /**
+    @brief
+        Method to create a TowerDefenseCenterpoint through XML.
+    */
+    void TowerDefenseCenterpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(TowerDefenseCenterpoint, XMLPort, xmlelement, mode);
+
+        XMLPortParam(TowerDefenseCenterpoint, "width", setWidth, getWidth, xmlelement, mode);
+        XMLPortParam(TowerDefenseCenterpoint, "height", setHeight, getHeight, xmlelement, mode);
+        XMLPortParam(TowerDefenseCenterpoint, "tileScale", setTileScale, getTileScale, xmlelement, mode);
+        XMLPortParam(TowerDefenseCenterpoint, "towerTemplate", setTowerTemplate, getTowerTemplate, xmlelement, mode);
+
+        //TODO: add XMLPortObject(TowerDefenseCenterpoint, WorldEntity, "waypoints", addWaypoint, getWaypoint,  xmlelement, mode);
+        // This was copied and shightly modified from WaypointController.cc ; there are no getters and setters and no membervariable yet
+        // The centerpoint should have all waypoints for "attached" to it. By using this function you can seperately add waypoints
+        // When you spawn a new enemy you should let it be controlled by a WaypointController. And that controller should get the waypoints.
+
+        // Alternatively you can manage the waypoints directly in TowerDefense.cc
+    }
+
+    /**
+    @brief
+        Is called when the gametype has changed.
+    */
+    void TowerDefenseCenterpoint::changedGametype()
+    {
+        SUPER(TowerDefenseCenterpoint, changedGametype);
+
+        // Check, whether it's still TowerDefense.
+        this->checkGametype();
+    }
+
+    /**
+    @brief
+        Checks whether the gametype is TowerDefense and if it is, sets its centerpoint.
+    */
+    void TowerDefenseCenterpoint::checkGametype()
+    {
+        if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
+        {
+            // Sets the centerpoint of the gametype. The gametype uses this to later spawn in towers, he needs the tower template stored in the center point
+            TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype().get());
+            towerDefenseGametype->setCenterpoint(this);
+        }
+    }
+}
Index: code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.h	(revision 9348)
+++ code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.h	(revision 9348)
@@ -0,0 +1,102 @@
+/*
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @brief
+ See TowerDefenseReadme.txt for Information.
+ @ingroup TowerDefense
+ */
+
+
+#ifndef _TowerDefenseCenterpoint_H__
+#define _TowerDefenseCenterpoint_H__
+
+#include "towerdefense/TowerDefensePrereqs.h"
+
+#include <string>
+#include <util/Math.h>
+
+#include "worldentities/MobileEntity.h"
+
+namespace orxonox
+{
+    class _TowerDefenseExport TowerDefenseCenterpoint : public MobileEntity
+    {
+        public:
+            TowerDefenseCenterpoint(BaseObject* creator);
+            virtual ~TowerDefenseCenterpoint() {}
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedGametype();
+
+            /**
+            @brief The width and hight in number of tiles. Default is 15 for both.
+            */
+            void setWidth(unsigned int width)
+                { this->width_ = width; }
+
+            unsigned int getWidth(void) const
+                { return this->width_; }
+
+            void setHeight(unsigned int height)
+                { this->height_ = height; }
+
+            unsigned int getHeight(void) const
+                { return this->height_; }
+
+            /**
+                @brief How to convert to world coordinates, e.g. that 0,15 is not at -8,-8 but at -80,-80 (if scale would be 10)
+            */
+            void setTileScale(unsigned int tileScale)
+                { this->tileScale_ = tileScale; }
+
+            unsigned int getTileScale(void) const
+                { return this->tileScale_; }
+
+            /**
+            @brief Set the template for the towers.
+            @param template The template name to be applied to each tower.
+            */
+            void setTowerTemplate(const std::string& templateName)
+                { this->towerTemplate_ = templateName; }
+
+            const std::string& getTowerTemplate(void) const
+                { return this->towerTemplate_; }
+
+        private:
+            void checkGametype();
+
+            unsigned int width_;
+            unsigned int height_;
+            unsigned int tileScale_;
+
+            std::string towerTemplate_;
+    };
+}
+
+#endif /* _TowerDefenseCenterpoint_H__ */
Index: code/trunk/src/modules/towerdefense/TowerDefenseController.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseController.cc	(revision 9348)
+++ code/trunk/src/modules/towerdefense/TowerDefenseController.cc	(revision 9348)
@@ -0,0 +1,144 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "TowerDefenseController.h"
+
+#include "util/Math.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+    CreateFactory(TowerDefenseController);
+
+    TowerDefenseController::TowerDefenseController(BaseObject* creator) : WaypointController(creator)
+    {
+        RegisterObject(TowerDefenseController);
+
+        this->alertnessradius_ = 500;
+
+        this->patrolTimer_.setTimer(rnd(), true, createExecutor(createFunctor(&TowerDefenseController::searchEnemy, this)));
+    }
+
+    void TowerDefenseController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(TowerDefenseController, XMLPort, xmlelement, mode);
+
+        XMLPortParam(TowerDefenseController, "alertnessradius", setAlertnessRadius, getAlertnessRadius, xmlelement, mode).defaultValues(500.0f);
+    }
+
+    void TowerDefenseController::tick(float dt)
+    {
+        if (!this->isActive())
+            return;
+
+        if (this->target_)
+        {
+            this->aimAtTarget();
+
+            if (this->bHasTargetPosition_)
+                this->moveToTargetPosition();
+
+            if (this->getControllableEntity() && this->isCloseAtTarget(1000) && this->isLookingAtTarget(math::pi / 20.0f))
+                this->getControllableEntity()->fire(0);
+        }
+        else
+        {
+            SUPER(TowerDefenseController, tick, dt);
+        }
+    }
+
+
+    bool sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype)
+    {
+        if (entity1 == entity2)
+            return true;
+
+        int team1 = -1;
+        int team2 = -1;
+
+        Controller* controller = 0;
+        if (entity1->getController())
+            controller = entity1->getController();
+        else
+            controller = entity1->getXMLController();
+        if (controller)
+        {
+            FormationController* ac = orxonox_cast<FormationController*>(controller);
+            if (ac)
+                team1 = ac->getTeam();
+        }
+
+        if (entity2->getController())
+            controller = entity2->getController();
+        else
+            controller = entity2->getXMLController();
+        if (controller)
+        {
+            FormationController* ac = orxonox_cast<FormationController*>(controller);
+            if (ac)
+                team2 = ac->getTeam();
+        }
+
+
+
+        return (team1 == team2 && team1 != -1);
+    }
+
+
+
+
+
+    void TowerDefenseController::searchEnemy()
+    {
+        this->patrolTimer_.setInterval(rnd());
+
+        if (!this->getControllableEntity())
+            return;
+
+        Vector3 myposition = this->getControllableEntity()->getPosition();
+        float shortestsqdistance = (float)static_cast<unsigned int>(-1);
+
+        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
+        {
+            if (ArtificialController::sameTeam(this->getControllableEntity(), static_cast<ControllableEntity*>(*it), this->getGametype()))
+                continue;
+
+            float sqdistance = it->getPosition().squaredDistance(myposition);
+            if (sqdistance < shortestsqdistance)
+            {
+                shortestsqdistance = sqdistance;
+                this->target_ = (*it);
+            }
+        }
+
+        if (shortestsqdistance > (this->alertnessradius_ * this->alertnessradius_))
+            this->target_ = 0;
+    }
+}
Index: code/trunk/src/modules/towerdefense/TowerDefenseController.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseController.h	(revision 9348)
+++ code/trunk/src/modules/towerdefense/TowerDefenseController.h	(revision 9348)
@@ -0,0 +1,61 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _TowerDefenseController_H__
+#define _TowerDefenseController_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "tools/Timer.h"
+#include "WaypointController.h"
+
+namespace orxonox
+{
+    class _TowerDefenseExport TowerDefenseController : public WaypointController
+    {
+        public:
+            TowerDefenseController(BaseObject* creator);
+            virtual ~TowerDefenseController() {}
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void tick(float dt);
+
+            inline void setAlertnessRadius(float radius)
+                { this->alertnessradius_ = radius; }
+            inline float getAlertnessRadius() const
+                { return this->alertnessradius_; }
+
+        protected:
+            void searchEnemy();
+
+            float alertnessradius_;
+            Timer patrolTimer_;
+    };
+}
+
+#endif /* _TowerDefenseController_H__ */
Index: code/trunk/src/modules/towerdefense/TowerDefenseHUDController.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseHUDController.cc	(revision 9348)
+++ code/trunk/src/modules/towerdefense/TowerDefenseHUDController.cc	(revision 9348)
@@ -0,0 +1,70 @@
+/*
+ *   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:
+ *
+ *   Co-authors:
+ *      ...
+ */
+
+#include "TowerDefenseHUDController.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+
+
+namespace orxonox
+{
+    CreateFactory(TowerDefenseHUDController);
+
+    TowerDefenseHUDController::TowerDefenseHUDController(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(TowerDefenseHUDController);
+    }
+
+    TowerDefenseHUDController::~TowerDefenseHUDController()
+    {
+
+    }
+
+    void TowerDefenseHUDController::tick(float dt)
+    {
+        SUPER(TowerDefenseHUDController, tick, dt);
+    }
+
+    void TowerDefenseHUDController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(TowerDefenseHUDController, XMLPort, xmlelement, mode);
+    }
+
+    void TowerDefenseHUDController::changedOwner()
+    {
+        SUPER(TowerDefenseHUDController, changedOwner);
+        /*
+        if (this->getOwner() != NULL && this->getOwner()->getGametype())
+            this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype().get());
+        else
+            this->owner_ = 0;
+        */
+    }
+
+}
Index: code/trunk/src/modules/towerdefense/TowerDefenseHUDController.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseHUDController.h	(revision 9348)
+++ code/trunk/src/modules/towerdefense/TowerDefenseHUDController.h	(revision 9348)
@@ -0,0 +1,60 @@
+/*
+ *   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:
+ *
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+ /**
+    @brief
+        This subclass of OverlayText is used to display the stats of the player in the HUD
+
+    @ingroup TowerDefense
+ */
+
+
+#ifndef _TowerDefenseHUDController_H__
+#define _TowerDefenseHUDController_H__
+
+#include "towerdefense/TowerDefensePrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+
+namespace orxonox
+{
+    class _TowerDefenseExport TowerDefenseHUDController : public OverlayText, public Tickable
+    {
+    public:
+        TowerDefenseHUDController(BaseObject* creator);
+        virtual ~TowerDefenseHUDController();
+
+        virtual void tick(float dt);
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+        virtual void changedOwner();
+    };
+}
+
+#endif /* _TowerDefenseHUDController_H__ */
Index: code/trunk/src/modules/towerdefense/TowerDefensePlayerStats.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefensePlayerStats.cc	(revision 9348)
+++ code/trunk/src/modules/towerdefense/TowerDefensePlayerStats.cc	(revision 9348)
@@ -0,0 +1,44 @@
+/*
+ *   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:
+ *
+ *   Co-authors:
+ *      ...
+ */
+
+#include "TowerDefensePlayerStats.h"
+
+namespace orxonox
+{
+    const int kDefaultCredit = 200;
+
+    TowerDefensePlayerStats::TowerDefensePlayerStats()
+    {
+        this->credit_ = kDefaultCredit;
+        this->waveNumber_ = 0;
+    }
+    /*
+    TowerDefensePlayerStats::~TowerDefensePlayerStats()
+    {
+    }
+    */
+}
Index: code/trunk/src/modules/towerdefense/TowerDefensePlayerStats.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefensePlayerStats.h	(revision 9348)
+++ code/trunk/src/modules/towerdefense/TowerDefensePlayerStats.h	(revision 9348)
@@ -0,0 +1,76 @@
+/*
+ *   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:
+ *
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+ /**
+    @brief
+        This manages the stats of the player. It is used by 'TowerDefense', the gametype
+
+    @ingroup TowerDefense
+ */
+
+
+#ifndef _TowerDefensePlayerStats_H__
+#define _TowerDefensePlayerStats_H__
+
+#include "towerdefense/TowerDefensePrereqs.h"
+
+namespace orxonox
+{
+    typedef enum _TowerCosts {
+        // Set to 0 for debug...
+        TDDefaultTowerCost = 0
+    } TowerCost;
+
+    class _TowerDefenseExport TowerDefensePlayerStats
+    {
+    public:
+        TowerDefensePlayerStats();
+
+        inline int getCredit()
+            { return credit_; }
+
+        inline void setCredit(int credit)
+            { credit_ = credit; }
+
+        inline void buyTower(TowerCost cost)
+            { credit_ -= cost;}
+
+        inline int getWaveNumber()
+            { return waveNumber_; }
+
+        inline void didLoadNextWave()
+            { waveNumber_++; }
+
+    private:
+        int credit_;
+        int waveNumber_;
+        //int baseHealth_;
+    };
+}
+
+#endif /* _TowerDefensePlayerStats_H__ */
Index: code/trunk/src/modules/towerdefense/TowerDefensePrereqs.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefensePrereqs.h	(revision 9348)
+++ code/trunk/src/modules/towerdefense/TowerDefensePrereqs.h	(revision 9348)
@@ -0,0 +1,74 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the TowerDefense module
+*/
+
+#ifndef _TowerDefensePrereqs_H__
+#define _TowerDefensePrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(TOWERDEFENSE_STATIC_BUILD)
+#  ifdef TOWERDEFENSE_SHARED_BUILD
+#    define _TowerDefenseExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _TowerDefenseExport
+#    else
+#      define _TowerDefenseExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _TowerDefenseExport  __attribute__ ((visibility("default")))
+#else
+#  define _TowerDefenseExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class TowerDefense;
+    class Tower;
+    class TowerDefenseCenterpoint;
+    class TowerDefenseHUDController;
+    class TowerDefensePlayerStats;
+}
+
+#endif /* _TowerDefensePrereqs_H__ */
Index: code/trunk/src/modules/towerdefense/towerdefensereadme.txt
===================================================================
--- code/trunk/src/modules/towerdefense/towerdefensereadme.txt	(revision 9348)
+++ code/trunk/src/modules/towerdefense/towerdefensereadme.txt	(revision 9348)
@@ -0,0 +1,38 @@
+===============================================================================
+Classes
+===============================================================================
+
+TowerDefense:
+GameType class
+
+TowerDefenseCenterpoint
+Centerpoint class. Store tower template
+
+Tower
+Represents a Tower
+I'm not actually sure if you have to code C++ in order to have your result. I would suggest to simply create a new spaceship template or maybe better a
+new template for a pawn. (The tower don't need to be spaceships; pawn is just fine.)
+Example for a template: /data/levels/templates/assff.oxt && /data/levels/include/weaponSettingsAssff.oxi
+@ assff.oxt: you don't need an engine (or your towers could fly away :-) and probably no Cameras. (just try what happens if you leave them out.) 
+@ weaponSettingsAssff.oxi:
+<weaponslots>: location where you want to have your tower to be equiped with weapons
+<weaponsets> : if you press fire, you actually always fire a whole set of weapons. The amount of weaponsets is defined here. (I'm not 100% sure whether this explanation is right.)
+
+There are three <Weapon> tags - one for each weaponslot. Each weapon can contain several objects which you would probably
+refer to as "weapons":
+
+LightningGun: Shoots a slow, rotation, yellow "ball".
+HsW01: the default laser weapon
+SimpleRocketFire: a weak (self steering) rocket
+RocketFire: a strong rocket
+                         
+About your Tower's Template location - either keep it in the level or do it similarly to the Assff templates.
+(If your towers behave & look nicely, I'm quite sure others want to include them in other levels, too.)
+
+
+===============================================================================
+Other files
+===============================================================================
+
+/data/levels/towerdefense.oxw
+Loads the level. In <Level>, we first create a SpawnPoint. It spawns a cylinder using the 'centerpointmark' Template, which uses the 'centerpointmarkcamera' Template to create a static camera. Then, we create an instance of TowerDefenseCenterpoint and pass the 'towertemplate' Template, so that we can later create towers using this template. We also plase the playfield.mesh in a way that maps every field on the playfield.mesh to nice coordinates: the playfield spans as a square from -8,-8 to 8,8.
Index: code/trunk/src/modules/weapons/RocketController.cc
===================================================================
--- code/trunk/src/modules/weapons/RocketController.cc	(revision 9264)
+++ code/trunk/src/modules/weapons/RocketController.cc	(revision 9348)
@@ -53,5 +53,5 @@
         this->rocket_ = new SimpleRocket(this);
         this->rocket_->setController(this);
-        this->setControllableEntity(dynamic_cast<ControllableEntity*> (this->rocket_));
+        this->setControllableEntity(orxonox_cast<ControllableEntity*>(this->rocket_));
     }
 
