Index: branches/powerups/src/Makefile.am
===================================================================
--- branches/powerups/src/Makefile.am	(revision 5964)
+++ branches/powerups/src/Makefile.am	(revision 5965)
@@ -79,4 +79,5 @@
                   world_entities/power_ups/turret_power_up.cc \
                   world_entities/power_ups/laser_power_up.cc \
+                  world_entities/power_ups/weapon_power_up.cc \
                   world_entities/space_ships/space_ship.cc \
                   subprojects/benchmark.cc
Index: branches/powerups/src/defs/class_id.h
===================================================================
--- branches/powerups/src/defs/class_id.h	(revision 5964)
+++ branches/powerups/src/defs/class_id.h	(revision 5965)
@@ -88,5 +88,5 @@
   CL_WEAPON                     =    0x00210000,
   CL_POWER_UP                   =    0x00220000,
-  CL_EXTENDABLE                 =    0x00140000,
+  CL_EXTENDABLE                 =    0x00240000,
   // SUPER-Modeling
   CL_TEXTURE                    =    0x00c01000,
@@ -149,4 +149,6 @@
   CL_TURRET_POWER_UP            =    0x00000211,
   CL_LASER_POWER_UP             =    0x00000212,
+  CL_WEAPON_POWER_UP            =    0x00000213,
+  CL_SHIELD_POWER_UP            =    0x00000214,
 
   CL_TEST_GUN                   =    0x00000230,
Index: branches/powerups/src/lib/sound/sound_engine.cc
===================================================================
--- branches/powerups/src/lib/sound/sound_engine.cc	(revision 5964)
+++ branches/powerups/src/lib/sound/sound_engine.cc	(revision 5965)
@@ -289,9 +289,5 @@
 
   // INITIALIZING THE DEVICE:
-#ifndef AL_VERSION_1_1
-  ALubyte deviceName[] =
-#else
   ALCchar deviceName[] =
-#endif
 #ifdef __WIN32__
       "Direct3D";
Index: branches/powerups/src/world_entities/extendable.h
===================================================================
--- branches/powerups/src/world_entities/extendable.h	(revision 5964)
+++ branches/powerups/src/world_entities/extendable.h	(revision 5965)
@@ -7,10 +7,12 @@
 #define _EXTENDABLE_H
 
+#include "base_object.h"
+
 // FORWARD DECLARATION
-
+class PowerUp;
 
 
 //! A class for ...
-class Extendable : public BaseObject {
+class Extendable : virtual public BaseObject {
 
  public:
Index: branches/powerups/src/world_entities/power_ups/weapon_power_up.cc
===================================================================
--- branches/powerups/src/world_entities/power_ups/weapon_power_up.cc	(revision 5965)
+++ branches/powerups/src/world_entities/power_ups/weapon_power_up.cc	(revision 5965)
@@ -0,0 +1,70 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+
+#include "weapon_power_up.h"
+#include "factory.h"
+#include "state.h"
+#include "list.h"
+
+#include "primitive_model.h"
+
+using namespace std;
+
+CREATE_FACTORY(WeaponPowerUp, CL_WEAPON_POWER_UP);
+
+WeaponPowerUp::WeaponPowerUp ()
+{
+  this->init();
+}
+
+WeaponPowerUp::WeaponPowerUp(const TiXmlElement* root)
+{
+  this->init();
+  this->loadParams(root);
+}
+
+
+WeaponPowerUp::~WeaponPowerUp ()
+{
+}
+
+
+void WeaponPowerUp::init()
+{
+}
+
+
+void WeaponPowerUp::loadParams(const TiXmlElement* root)
+{
+  static_cast<PowerUp*>(this)->loadParams(root);
+
+}
+
+Weapon* WeaponPowerUp::getWeapon()
+{
+  return dynamic_cast<Weapon*>(Factory::getFirst()->fabricate(this->getWeaponID()));
+}
+
+ClassID WeaponPowerUp::getWeaponID()
+{
+  return this->weaponID;
+}
+
+long WeaponPowerUp::getCapsNeeded()
+{
+  return this->capsNeeded;
+}
Index: branches/powerups/src/world_entities/power_ups/weapon_power_up.h
===================================================================
--- branches/powerups/src/world_entities/power_ups/weapon_power_up.h	(revision 5965)
+++ branches/powerups/src/world_entities/power_ups/weapon_power_up.h	(revision 5965)
@@ -0,0 +1,34 @@
+/*!
+ * @file weapon_power_up.h
+ * @brief A class representing a PowerUp containing a weapon.
+*/
+
+#ifndef _WEAPON_POWER_UP_H
+#define _WEAPON_POWER_UP_H
+
+#include "power_up.h"
+#include "weapons/weapon.h"
+
+/* FORWARD DEFINITION */
+
+class WeaponPowerUp : public PowerUp {
+
+public:
+  WeaponPowerUp();
+  WeaponPowerUp(const TiXmlElement* root);
+  virtual ~WeaponPowerUp ();
+
+  Weapon* getWeapon();
+  ClassID getWeaponID();
+  long getCapsNeeded();
+
+private:
+  void init();
+  void loadParams(const TiXmlElement* root);
+
+private:
+  ClassID weaponID;
+  long capsNeeded;
+};
+
+#endif /* _WEAPON_POWER_UP_H */
Index: branches/powerups/src/world_entities/space_ships/space_ship.cc
===================================================================
--- branches/powerups/src/world_entities/space_ships/space_ship.cc	(revision 5964)
+++ branches/powerups/src/world_entities/space_ships/space_ship.cc	(revision 5965)
@@ -17,6 +17,7 @@
 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
 
+#include "space_ship.h"
+
 #include "executor/executor.h"
-#include "space_ship.h"
 
 #include "objModel.h"
@@ -30,4 +31,6 @@
 #include "factory.h"
 #include "key_mapper.h"
+
+#include "power_ups/weapon_power_up.h"
 
 using namespace std;
@@ -368,4 +371,24 @@
 }
 
+/**
+ *
+ */
+bool SpaceShip::pickup(PowerUp* powerUp)
+{
+  if(powerUp->isA(CL_WEAPON_POWER_UP)) {
+    WeaponPowerUp* wpu = dynamic_cast<WeaponPowerUp*>(powerUp);
+    WeaponManager* manager = this->getWeaponManager();
+    int slot = manager->getNextFreeSlot(0, wpu->getCapsNeeded());
+    if(slot >= 0) {
+      manager->addWeapon(wpu->getWeapon(), 0, slot);
+      return true;
+    }
+  }
+  else if(powerUp->isA(CL_SHIELD_POWER_UP)) {
+
+  }
+  return false;
+}
+
 #include "weapons/aiming_turret.h"
 // FIXME THIS MIGHT BE CONSIDERED EITHER A FEATURE, OR A BUG
Index: branches/powerups/src/world_entities/space_ships/space_ship.h
===================================================================
--- branches/powerups/src/world_entities/space_ships/space_ship.h	(revision 5964)
+++ branches/powerups/src/world_entities/space_ships/space_ship.h	(revision 5965)
@@ -8,4 +8,5 @@
 
 #include "playable.h"
+#include "extendable.h"
 
 template<class T> class tList;
@@ -13,5 +14,5 @@
 class Event;
 
-class SpaceShip : public Playable
+class SpaceShip : public Playable, public Extendable
 {
 
@@ -37,4 +38,6 @@
 
     virtual void process(const Event &event);
+
+    bool pickup(PowerUp* powerUp);
 
 
Index: branches/powerups/src/world_entities/weapons/weapon_manager.cc
===================================================================
--- branches/powerups/src/world_entities/weapons/weapon_manager.cc	(revision 5964)
+++ branches/powerups/src/world_entities/weapons/weapon_manager.cc	(revision 5965)
@@ -408,16 +408,25 @@
 
 /**
- * private gets the next free slot in a certain weaponconfig
+ * gets the next free slot in a certain weaponconfig
  * @param the selected weaponconfig
  */
 int WeaponManager::getNextFreeSlot(int configID, long capability)
 {
-  for( int i = 0; i < this->slotCount; ++i)
-  {
-    if( this->configs[configID][i] == NULL &&
-        (this->currentSlotConfig[i].capability & capability & WTYPE_ALLKINDS) &&
-        (this->currentSlotConfig[i].capability & capability & WTYPE_ALLDIRS))
-      return i;
-  }
+  /*if(configID == -1) {
+    for(int i = 0; i < WM_MAX_CONFIGS; ++i)
+    {
+      int slot = this->getNextFreeSlot(i, capability);
+      if(slot >= 0) return slot;
+    }
+  }
+  else {*/
+    for( int i = 0; i < this->slotCount; ++i)
+    {
+      if( this->configs[configID][i] == NULL &&
+          (this->currentSlotConfig[i].capability & capability & WTYPE_ALLKINDS) &&
+          (this->currentSlotConfig[i].capability & capability & WTYPE_ALLDIRS))
+        return i;
+    }
+  //}
   return -1;
 }
