Index: /orxonox/trunk/src/world_entities/player.cc
===================================================================
--- /orxonox/trunk/src/world_entities/player.cc	(revision 4952)
+++ /orxonox/trunk/src/world_entities/player.cc	(revision 4953)
@@ -46,6 +46,6 @@
 
   //weapons:
-  Weapon* wpRight = new TestGun(this, Vector(-2.6, 0.1, 3.0), Quaternion(), 0);
-  Weapon* wpLeft = new TestGun(this, Vector(-2.6, 0.1, -3.0), Quaternion(), 1);
+  Weapon* wpRight = new TestGun(0);
+  Weapon* wpLeft = new TestGun(1);
 
   this->weaponMan->addWeapon(wpRight);
@@ -80,13 +80,14 @@
 
   //weapons:
-  Weapon* wpRight = new TestGun(this, Vector(-2.6, 0.1, 3.0), Quaternion(), 0);
-  Weapon* wpLeft = new TestGun(this, Vector(-2.6, 0.1, -3.0), Quaternion(), 1);
-
-  this->weaponMan->addWeapon(wpRight, 0,0);
-  this->weaponMan->addWeapon(wpLeft, 0, 1);
-  this->weaponMan->addWeapon(wpLeft, 1, 1);
-  this->weaponMan->addWeapon(wpRight, 2, 0);
-/*  this->weaponMan->addWeapon(wpRight, WM_CONFIG2);
-  this->weaponMan->addWeapon(wpLeft, WM_CONFIG2);*/
+  Weapon* wpRight = new TestGun(0);
+  wpRight->setName("testGun Right");
+  Weapon* wpLeft = new TestGun(1);
+  wpLeft->setName("testGun Left");
+
+  this->weaponMan->addWeapon(wpLeft, 1, 0);
+  this->weaponMan->addWeapon(wpRight,1 ,1);
+  this->weaponMan->addWeapon(wpLeft, 3, 1);
+
+  this->weaponMan->changeWeaponConfig(0);
 }
 
@@ -107,5 +108,8 @@
 
 
-  this->weaponMan = new WeaponManager(2);
+  this->weaponMan = new WeaponManager(this);
+  this->weaponMan->setSlotPosition(0, Vector(-2.6, .1, -3.0));
+  this->weaponMan->setSlotPosition(1, Vector(-2.6, .1, 3.0));
+
 }
 
Index: /orxonox/trunk/src/world_entities/weapons/test_gun.cc
===================================================================
--- /orxonox/trunk/src/world_entities/weapons/test_gun.cc	(revision 4952)
+++ /orxonox/trunk/src/world_entities/weapons/test_gun.cc	(revision 4953)
@@ -44,7 +44,5 @@
    creates a new weapon
 */
-TestGun::TestGun (PNode* parent, const Vector& coordinate,
-                  const Quaternion& direction, int leftRight)
-  :  Weapon (parent, coordinate, direction)
+TestGun::TestGun (int leftRight)
 {
   this->setClassID(CL_TEST_GUN, "TestGun");
@@ -71,9 +69,9 @@
       animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.0, ANIM_LINEAR, ANIM_CONSTANT);
 
-      animation2->addKeyFrame(Vector(-2.6, 0.1, 2.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
-      animation2->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
-
-      animation3->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
-      animation3->addKeyFrame(Vector(-2.6, 0.1, 2.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
+      animation2->addKeyFrame(Vector(0.0, 0.0, -1.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
+      animation2->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
+
+      animation3->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
+      animation3->addKeyFrame(Vector(0.0, 0.0, -1.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
     }
   else if( this->leftRight == W_RIGHT)
@@ -86,9 +84,9 @@
       animation1->addKeyFrame(Vector(0, 0, .5), Quaternion(), 0.0, ANIM_LINEAR, ANIM_CONSTANT);
 
-      animation2->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
-      animation2->addKeyFrame(Vector(-2.6, 0.1, -3.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
-
-      animation3->addKeyFrame(Vector(-2.6, 0.1, -3.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
-      animation3->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
+      animation2->addKeyFrame(Vector(.0, .0, 1.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
+      animation2->addKeyFrame(Vector(.0, .0, .0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
+
+      animation3->addKeyFrame(Vector(.0, .0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
+      animation3->addKeyFrame(Vector(.0, .0, 1.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
     }
 /*
Index: /orxonox/trunk/src/world_entities/weapons/test_gun.h
===================================================================
--- /orxonox/trunk/src/world_entities/weapons/test_gun.h	(revision 4952)
+++ /orxonox/trunk/src/world_entities/weapons/test_gun.h	(revision 4953)
@@ -29,5 +29,5 @@
   {
   public:
-    TestGun (PNode* parent, const Vector& coordinate, const Quaternion& direction, int leftRight);
+    TestGun (int leftRight);
     virtual ~TestGun ();
 
Index: /orxonox/trunk/src/world_entities/weapons/weapon.cc
===================================================================
--- /orxonox/trunk/src/world_entities/weapons/weapon.cc	(revision 4952)
+++ /orxonox/trunk/src/world_entities/weapons/weapon.cc	(revision 4953)
@@ -39,10 +39,7 @@
  * creates a new weapon
 */
-Weapon::Weapon (PNode* parent, const Vector& coordinate, const Quaternion& direction)
+Weapon::Weapon ()
 {
   this->init();
-  parent->addChild(this, PNODE_ALL);
-  this->setRelCoor(coordinate);
-  this->setRelDir(direction);
 }
 
Index: /orxonox/trunk/src/world_entities/weapons/weapon.h
===================================================================
--- /orxonox/trunk/src/world_entities/weapons/weapon.h	(revision 4952)
+++ /orxonox/trunk/src/world_entities/weapons/weapon.h	(revision 4953)
@@ -72,5 +72,5 @@
   public:
     // INITIALISATION //
-    Weapon (PNode* parent, const Vector& coordinate, const Quaternion& direction);
+    Weapon ();
     Weapon(const TiXmlElement* root);
     virtual ~Weapon ();
Index: /orxonox/trunk/src/world_entities/weapons/weapon_manager.cc
===================================================================
--- /orxonox/trunk/src/world_entities/weapons/weapon_manager.cc	(revision 4952)
+++ /orxonox/trunk/src/world_entities/weapons/weapon_manager.cc	(revision 4953)
@@ -28,4 +28,5 @@
 #include "list.h"
 #include "t_animation.h"
+#include "null_parent.h"
 
 using namespace std;
@@ -36,8 +37,8 @@
  * @param number of weapon slots of the model/ship <= 8 (limitied)
  */
-WeaponManager::WeaponManager(unsigned int slotCount)
+WeaponManager::WeaponManager(PNode* parent)
 {
   this->init();
-  this->setSlotCount(slotCount);
+  this->setParent(parent);
 }
 
@@ -130,4 +131,16 @@
 }
 
+void WeaponManager::setParent(PNode* parent)
+{
+  if (parent == NULL)
+    parent = NullParent::getInstance();
+  this->parent = parent;
+  if (this->parent != NULL)
+  {
+    for (int i = 0; i < WM_MAX_SLOTS; i++)
+      this->parent->addChild(&this->currentSlotConfig[i].position);
+  }
+
+}
 
 /**
@@ -141,4 +154,10 @@
   else
     this->slotCount = WM_MAX_SLOTS;
+}
+
+void WeaponManager::setSlotPosition(int slot, const Vector& position)
+{
+  if (slot < this->slotCount)
+    this->currentSlotConfig[slot].position.setRelCoor(position);
 }
 
@@ -174,5 +193,10 @@
     }
   }
+
+  //! @todo check if the weapon is already assigned to another config in another slot
+
   this->configs[configID][slotID] = weapon;
+  if (this->parent != NULL)
+    weapon->setParent(parent);
   PRINTF(3)("Added a new Weapon to the WeaponManager: config %i/ slot %i\n", configID, slotID);
 }
@@ -189,7 +213,4 @@
 /**
  * changes to the next weapon configuration
- *
- * if there are multiple weapon configurations defined by the manager, use this to switch between them
- * this function will deactivate the weapons first, change the config and reactivate them later
  */
 void WeaponManager::nextWeaponConf()
@@ -199,7 +220,9 @@
     this->currentConfigID = 0;
   this->changeWeaponConfig(this->currentConfigID);
-  this->debug();
-}
-
+}
+
+/**
+ * changes to the previous configuration
+ */
 void WeaponManager::previousWeaponConfig()
 {
@@ -208,9 +231,10 @@
     this->currentConfigID = WM_MAX_CONFIGS -1;
   this->changeWeaponConfig(this->currentConfigID);
-  this->debug();
-
-
-}
-
+}
+
+/**
+ * change to a desired configuration
+ * @param weaponConfig the configuration to jump to.
+ */
 void WeaponManager::changeWeaponConfig(int weaponConfig)
 {
@@ -220,6 +244,11 @@
   {
     this->currentSlotConfig[i].nextWeapon = this->configs[currentConfigID][i];
-    if (this->currentSlotConfig[i].currentWeapon != NULL && this->currentSlotConfig[i].currentWeapon != this->currentSlotConfig[i].nextWeapon)
-      (this->currentSlotConfig[i].currentWeapon->requestAction(WA_DEACTIVATE));
+    if (this->currentSlotConfig[i].currentWeapon != this->currentSlotConfig[i].nextWeapon)
+    {
+      if (this->currentSlotConfig[i].currentWeapon != NULL)
+        (this->currentSlotConfig[i].currentWeapon->requestAction(WA_DEACTIVATE));
+      if (this->currentSlotConfig[i].nextWeapon != NULL && this->currentSlotConfig[i].nextWeapon->isActive())
+        this->currentSlotConfig[i].nextWeapon = NULL;
+    }
   }
 }
@@ -265,5 +294,8 @@
         tickWeapon = this->currentSlotConfig[i].currentWeapon = this->currentSlotConfig[i].nextWeapon;
         if (tickWeapon != NULL)
+        {
           tickWeapon->requestAction(WA_ACTIVATE);
+          tickWeapon->setParent(&this->currentSlotConfig[i].position);
+        }
       }
     }
@@ -308,4 +340,7 @@
 
 
+/**
+ * outputs some nice debug information about the WeaponManager
+ */
 void WeaponManager::debug() const
 {
Index: /orxonox/trunk/src/world_entities/weapons/weapon_manager.h
===================================================================
--- /orxonox/trunk/src/world_entities/weapons/weapon_manager.h	(revision 4952)
+++ /orxonox/trunk/src/world_entities/weapons/weapon_manager.h	(revision 4953)
@@ -29,5 +29,5 @@
 #include "base_object.h"
 
-#include "vector.h"
+#include "p_node.h"
 
 // FORWARD DECLARATION
@@ -61,5 +61,5 @@
 typedef struct
 {
-  Vector        position;               //!< the relative Position to the position of the carrying entity. (const PNode* parent; of WeaponManager)
+  PNode         position;               //!< the relative Position to the position of the carrying entity. (const PNode* parent; of WeaponManager)
   long          capability;             //!< the capabilities of the Slot @see WM_SlotCapability.
 
@@ -68,7 +68,17 @@
 } WM_Slot;
 
+//! This is a special class, that can handle many different Weapons of a ship/man/whatever.
+/**
+ * this class is designed to interactively changeing multiple weapons (or just one),
+ * and to allow the Weapon itself to enable/disable itself.
+ *
+ * How to configure
+ * 1. set the default values.
+ * 2. define weapons. connect them to the WeaponManager's configurations
+ * 3. go on and run :)....
+ */
 class WeaponManager : public BaseObject {
   public:
-    WeaponManager(unsigned int slotCount);
+    WeaponManager(PNode* parent);
     WeaponManager(const TiXmlElement* root);
     ~WeaponManager();
@@ -81,4 +91,5 @@
     void setSlotPosition(int slot, const Vector& position);
     void setSlotCapability(long slotCapability);
+    void setParent(PNode* parent);
 
     void addWeapon(Weapon* weapon, int configID = -1, int slotID = -1);
