Index: trunk/src/util/hud.cc
===================================================================
--- trunk/src/util/hud.cc	(revision 6442)
+++ trunk/src/util/hud.cc	(revision 6443)
@@ -118,4 +118,27 @@
 }
 
+void Hud::updateWeaponManager()
+{
+  // hide all the Widgets
+  std::list<GLGuiWidget*>::iterator weaponWidget;
+  for (weaponWidget = this->weaponsWidgets.begin(); weaponWidget != this->weaponsWidgets.end(); weaponWidget++)
+  {
+    (*weaponWidget)->hide();
+  }
+  this->weaponsWidgets.clear();
+
+  // add all that we need again.
+  if (this->weaponManager != NULL)
+    for (unsigned int i = 0; i < this->weaponManager->getSlotCount(); i++)
+  {
+    Weapon* weapon = this->weaponManager->getWeapon(i);
+    if (weapon != NULL)
+    {
+      weapon->getEnergyWidget()->show();
+      this->weaponsWidgets.push_back(weapon->getEnergyWidget());
+    }
+  }
+  this->updateResolution();
+}
 
 void Hud::addWeaponWidget(GLGuiWidget* widget)
Index: trunk/src/util/hud.h
===================================================================
--- trunk/src/util/hud.h	(revision 6442)
+++ trunk/src/util/hud.h	(revision 6443)
@@ -34,4 +34,6 @@
   void removeWeaponWidget(GLGuiWidget* widget);
 
+  void updateWeaponManager();
+
   void tick(float dt);
   void draw() const;
Index: trunk/src/world_entities/playable.cc
===================================================================
--- trunk/src/world_entities/playable.cc	(revision 6442)
+++ trunk/src/world_entities/playable.cc	(revision 6443)
@@ -44,4 +44,21 @@
 
   }
+}
+
+
+void Playable::addWeapon(Weapon* weapon, int configID, int slotID)
+{
+  this->weaponMan->addWeapon(weapon, configID, slotID);
+
+  if (this->currentPlayer != NULL)
+      this->currentPlayer->weaponConfigChanged();
+}
+
+void Playable::removeWeapon(Weapon* weapon)
+{
+  this->weaponMan->removeWeapon(weapon);
+
+  if (this->currentPlayer != NULL)
+    this->currentPlayer->weaponConfigChanged();
 }
 
Index: trunk/src/world_entities/playable.h
===================================================================
--- trunk/src/world_entities/playable.h	(revision 6442)
+++ trunk/src/world_entities/playable.h	(revision 6443)
@@ -29,6 +29,7 @@
     virtual void leave()=0;
 
-    virtual void addWeapon(Weapon* weapon )  {}//= 0;
-    virtual void removeWeapon(Weapon* weapon) {}//= 0;
+    void addWeapon(Weapon* weapon, int configID = -1, int slotID = -1);
+    void removeWeapon(Weapon* weapon);
+
     inline WeaponManager* getWeaponManager() const { return this->weaponMan; };
 
Index: trunk/src/world_entities/player.cc
===================================================================
--- trunk/src/world_entities/player.cc	(revision 6442)
+++ trunk/src/world_entities/player.cc	(revision 6443)
@@ -81,4 +81,9 @@
  }
 
+ void Player::weaponConfigChanged()
+ {
+   this->hud.updateWeaponManager();
+ }
+
  void Player::process(const Event &event)
  {
Index: trunk/src/world_entities/player.h
===================================================================
--- trunk/src/world_entities/player.h	(revision 6442)
+++ trunk/src/world_entities/player.h	(revision 6443)
@@ -31,4 +31,5 @@
     inline Playable*  getControllable() { return this->controllable; };
 
+    void              weaponConfigChanged();
     bool              disconnectControllable();
 
Index: trunk/src/world_entities/space_ships/helicopter.cc
===================================================================
--- trunk/src/world_entities/space_ships/helicopter.cc	(revision 6442)
+++ trunk/src/world_entities/space_ships/helicopter.cc	(revision 6443)
@@ -89,9 +89,9 @@
   cannon->setName("BFG");
 
-  this->getWeaponManager()->addWeapon(wpLeft, 1, 0);
-  this->getWeaponManager()->addWeapon(wpRight,1 ,1);
-  this->getWeaponManager()->addWeapon(cannon, 0, 6);
-
-  //this->getWeaponManager()->addWeapon(turret, 3, 0);
+  this->addWeapon(wpLeft, 1, 0);
+  this->addWeapon(wpRight,1 ,1);
+  this->addWeapon(cannon, 0, 6);
+
+  //this->addWeapon(turret, 3, 0);
 
   this->getWeaponManager()->changeWeaponConfig(1);
@@ -176,5 +176,5 @@
 //   this->getWeaponManager()->setSlotPosition(9, Vector(-2.5, -0.3, 2.0));
 //   this->getWeaponManager()->setSlotDirection(9, Quaternion(+M_PI, Vector(1,0,0)));:
-     
+
   this->getWeaponManager()->getFixedTarget()->setParent(this);
   this->getWeaponManager()->getFixedTarget()->setRelCoor(100000,0,0);
@@ -211,23 +211,4 @@
 }
 
-
-/**
- * adds a weapon to the weapon list of the spaceship
- * @param weapon to add
-*/
-void Helicopter::addWeapon(Weapon* weapon)
-{
-  this->getWeaponManager()->addWeapon(weapon);
-}
-
-
-/**
- *  removes a weapon from the spaceship
- * @param weapon to remove
-*/
-void Helicopter::removeWeapon(Weapon* weapon)
-{
-  this->getWeaponManager()->removeWeapon(weapon);
-}
 
 /**
@@ -267,13 +248,13 @@
 */
 void Helicopter::tick (float time)
-{ 
+{
   tailrotorspeed += xMouse/20;
   if (tailrotorspeed >= 0.07) tailrotorspeed = 0.07;
   else if (tailrotorspeed <= -0.07) tailrotorspeed = -0.07;
-  
+
   if (tailrotorspeed > 0.0008) tailrotorspeed -= 0.001;
   else if (tailrotorspeed < -0.0008) tailrotorspeed += 0.001;
   if (tailrotorspeed <= 0.001 && tailrotorspeed >= -0.001) tailrotorspeed = 0;
-  
+
   // spaceship controlled movement
   this->calculateVelocity(time);
@@ -286,5 +267,5 @@
   //physics: Gravity
   this->shiftCoor(Vector(0,-1,0));
-  
+
   this->shiftCoor(getAbsDirY()*rotorspeed);
 
@@ -400,5 +381,5 @@
     if(rotorspeed >= 1.05) rotorspeed -= 0.05;
   }
-  
+
   if (this->bDescend )
   {
@@ -470,5 +451,5 @@
     this->xMouse = event.xRel*mouseSensitivity;
     this->yMouse = event.yRel*mouseSensitivity;
-    
+
     //this->shiftDir(Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0))*Quaternion(-M_PI/4*yMouse*mouseSensitivity, Vector(0,0,1)));
   }
@@ -486,5 +467,5 @@
     {
       turret = new Turret();
-      this->getWeaponManager()->addWeapon(turret, 2);
+      this->addWeapon(turret, 2);
       this->getWeaponManager()->changeWeaponConfig(2);
     }
@@ -495,5 +476,5 @@
     {
       turret = new AimingTurret();
-      this->getWeaponManager()->addWeapon(turret, 3);
+      this->addWeapon(turret, 3);
 
       this->getWeaponManager()->changeWeaponConfig(3);
Index: trunk/src/world_entities/space_ships/helicopter.h
===================================================================
--- trunk/src/world_entities/space_ships/helicopter.h	(revision 6442)
+++ trunk/src/world_entities/space_ships/helicopter.h	(revision 6443)
@@ -26,7 +26,4 @@
     virtual void enter();
     virtual void leave();
-
-    void addWeapon(Weapon* weapon );
-    void removeWeapon(Weapon* weapon);
 
     virtual void postSpawn();
Index: trunk/src/world_entities/space_ships/space_ship.cc
===================================================================
--- trunk/src/world_entities/space_ships/space_ship.cc	(revision 6442)
+++ trunk/src/world_entities/space_ships/space_ship.cc	(revision 6443)
@@ -103,9 +103,9 @@
   cannon->setName("BFG");
 
-  this->getWeaponManager()->addWeapon(wpLeft, 1, 0);
-  this->getWeaponManager()->addWeapon(wpRight,1 ,1);
-  this->getWeaponManager()->addWeapon(cannon, 0, 6);
-
-  //this->getWeaponManager()->addWeapon(turret, 3, 0);
+  this->addWeapon(wpLeft, 1, 0);
+  this->addWeapon(wpRight,1 ,1);
+  this->addWeapon(cannon, 0, 6);
+
+  //this->addWeapon(turret, 3, 0);
 
   this->getWeaponManager()->changeWeaponConfig(1);
@@ -221,22 +221,4 @@
 }
 
-/**
- * adds a weapon to the weapon list of the spaceship
- * @param weapon to add
-*/
-void SpaceShip::addWeapon(Weapon* weapon)
-{
-  this->getWeaponManager()->addWeapon(weapon);
-}
-
-
-/**
- *  removes a weapon from the spaceship
- * @param weapon to remove
-*/
-void SpaceShip::removeWeapon(Weapon* weapon)
-{
-  this->getWeaponManager()->removeWeapon(weapon);
-}
 
 /**
@@ -451,5 +433,7 @@
       this->bFire = event.bPressed;
   else if( event.type == KeyMapper::PEV_NEXT_WEAPON && event.bPressed)
+  {
     this->getWeaponManager()->nextWeaponConfig();//if( !event.bPressed) this->bWeaponChange = !this->bWeaponChange;
+  }
   else if ( event.type == KeyMapper::PEV_PREVIOUS_WEAPON && event.bPressed)
     this->getWeaponManager()->previousWeaponConfig();
@@ -503,5 +487,5 @@
     {
       turret = new Turret();
-      this->getWeaponManager()->addWeapon(turret, 2);
+      this->addWeapon(turret, 2);
       this->getWeaponManager()->changeWeaponConfig(2);
     }
@@ -513,5 +497,5 @@
       turret = dynamic_cast<Weapon*>(Factory::fabricate(CL_TARGETING_TURRET));
       if (turret != NULL)
-      this->getWeaponManager()->addWeapon(turret, 3);
+      this->addWeapon(turret, 3);
 
       this->getWeaponManager()->changeWeaponConfig(3);
Index: trunk/src/world_entities/space_ships/space_ship.h
===================================================================
--- trunk/src/world_entities/space_ships/space_ship.h	(revision 6442)
+++ trunk/src/world_entities/space_ships/space_ship.h	(revision 6443)
@@ -30,7 +30,4 @@
     virtual void enter();
     virtual void leave();
-
-    void addWeapon(Weapon* weapon );
-    void removeWeapon(Weapon* weapon);
 
     virtual void postSpawn();
