Index: code/trunk/src/modules/pickup/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/pickup/CMakeLists.txt	(revision 11701)
+++ code/trunk/src/modules/pickup/CMakeLists.txt	(revision 11704)
@@ -19,5 +19,4 @@
     PickupPrecompiledHeaders.h
   LINK_LIBRARIES
-    overlays
     orxonox
   SOURCE_FILES ${PICKUP_SRC_FILES}
Index: code/trunk/src/modules/pickup/PickupManager.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupManager.cc	(revision 11701)
+++ code/trunk/src/modules/pickup/PickupManager.cc	(revision 11704)
@@ -41,7 +41,4 @@
 #include "network/Host.h"
 #include "network/NetworkFunctionIncludes.h"
-#include "core/input/KeyBinderManager.h"    //for keybinding
-#include "core/input/KeyBinder.h"           //for keybinding
-#include "core/command/ConsoleCommandIncludes.h"
 
 #include "infos/PlayerInfo.h"
@@ -51,5 +48,4 @@
 #include "CollectiblePickup.h"
 #include "PickupRepresentation.h"
-#include "overlays/hud/HUDPickupSystem.h"
 
 namespace orxonox
@@ -67,6 +63,4 @@
 
     RegisterAbstractClass(PickupManager).inheritsFrom<PickupListener>();
-
-    SetConsoleCommand("useUnusePickup", &PickupManager::useUnusePickup).addShortcut().setActive(true);
 
     /**
@@ -265,7 +259,4 @@
         assert(pickup);
 
-        for (HUDPickupSystem* hud : ObjectList<HUDPickupSystem>())
-            pickupSystem = hud;
-        
         if(!GameMode::isMaster()) // If this is neither standalone nor the server.
             return;
@@ -295,10 +286,4 @@
             this->indexes_[pickup] = index;
             this->pickups_[index] = pickup;
-
-            this->picks.push_back(pickup);
-
-            if(pickupSystem)
-                pickupSystem->sync(picks, indexes_);
-            
         }
         else // If it was dropped, it is removed from the required lists.
@@ -308,12 +293,7 @@
             index = it->second;
 
-            this->indexes_.erase(pickup);
-            this->pickups_.erase(index); //set to null, so that can be identified as free slot by getPickupIndex()
-
-
-            this->picks.erase(std::remove(this->picks.begin(), this->picks.end(), pickup), this->picks.end()); //remove pickup from vector
-
-            if(pickupSystem)
-                pickupSystem->sync(picks, indexes_);
+            // Remove the Pickupable from the indexes_ and pickups_ list.
+            this->indexes_.erase(it);
+            this->pickups_.erase(index);
         }
 
@@ -342,31 +322,4 @@
 
     }
-
-    //This function is called by the command line or by the key binding
-    //it uses or unuses the pickup, depending on its current state
-    //or drops it (depends what you comment/uncomment)
-    void PickupManager::useUnusePickup(uint32_t index) 
-    {
-        PickupManager& manager = PickupManager::getInstance();
-
-        if(!manager.pickups_.count(index)) return; //if pickup is no longer here, dont do anything
-
-        Pickupable* pickup=manager.pickups_.find(index)->second;
-        if(pickup==nullptr)
-        {
-            return;                       //pickup does not exist
-        }
-
-        //if the pickup should be dropped upon key press
-        manager.dropPickup(index);
-
-        //if the pickup should be used/unused upon key press
-
-        // if(pickup->isUsed())
-        //     manager.usePickup(index, false);
-        // else
-        //     manager.usePickup(index, true);
-    }
-
 
     /**
@@ -448,8 +401,5 @@
             Pickupable* pickupable = this->pickups_.find(pickup)->second;
             if(pickupable != nullptr)
-            {
                 pickupable->drop();
-
-            }
         }
         // If we're neither server nor standalone we drop the pickup by calling dropPickupNetworked() of the PickupManager on the server.
@@ -544,6 +494,6 @@
     /**
     @brief
-        Get a new index between 0 and 9 for a Pickupable.
-        If all slots are occupied, the Pickupable in the first slot will be dropped.
+        Get a new index for a Pickupable.
+        This will work as long as the number of Pickupables that are picked up is sufficiently small and as long as they don't exist forever.
     @return
         Returns the new index.
@@ -551,14 +501,7 @@
     uint32_t PickupManager::getPickupIndex(void)
     {
-        //check if there are free slots available
-
-        for(uint32_t i=0; i<10; i++)
-        {
-            if(!pickups_.count(i)) return i;
-        }
-        //all slots are full and we have to drop sth
-        orxout(internal_info, context::pickups) << "everything was full and we have now dropped the first element" << endl;
-        this->dropPickup(0);
-        return 0;
+        if(this->pickupHighestIndex_ == uint32_t(~0x0)-1) // If we've reached the highest possible number, we wrap around.
+            this->pickupHighestIndex_ = 0;
+        return this->pickupHighestIndex_++;
     }
 
Index: code/trunk/src/modules/pickup/PickupManager.h
===================================================================
--- code/trunk/src/modules/pickup/PickupManager.h	(revision 11701)
+++ code/trunk/src/modules/pickup/PickupManager.h	(revision 11704)
@@ -42,8 +42,7 @@
 
 #include "PickupRepresentation.h"
-#include "interfaces/Pickupable.h"
+
 #include "util/Singleton.h"
 #include "interfaces/PickupListener.h"
-#include "overlays/hud/HUDPickupSystem.h"
 
 namespace orxonox // tolua_export
@@ -136,5 +135,4 @@
 
             void dropPickup(uint32_t pickup); //!< Drop the input Pickupable.
-            static void useUnusePickup(uint32_t index); //tolua_export
             void usePickup(uint32_t pickup, bool use); //!< Use (or unuse) the input Pickupable.
              /**
@@ -149,10 +147,6 @@
             static void dropPickupNetworked(uint32_t pickup); //!< Helper method to drop the input pickup on the server.
             static void usePickupNetworked(uint32_t pickup, bool use); //!< Helper method to use (or unuse) the input Pickupable on the server.
-            void setPickupSystem(HUDPickupSystem* system);
 
         private:
-            HUDPickupSystem* pickupSystem;
-            std::vector<Pickupable*> picks;
-
             static PickupManager* singletonPtr_s;
             static const std::string guiName_s; //!< The name of the PickupInventory
@@ -172,5 +166,5 @@
             void updateGUI(void); //!< Updates the PickupInventory GUI.
             uint32_t getPickupIndex(void); //!< Get a new index for a Pickupable.
-            
+
     }; // tolua_export
 
