Index: trunk/src/util/hud.cc
===================================================================
--- trunk/src/util/hud.cc	(revision 6439)
+++ trunk/src/util/hud.cc	(revision 6440)
@@ -29,4 +29,8 @@
   this->setClassID(CL_HUD, "Hud");
 
+
+  this->energyWidget = NULL;
+  this->shieldWidget = NULL;
+  this->armorWidget = NULL;
 }
 
@@ -53,4 +57,18 @@
 void Hud::setEnergyWidget(GLGuiWidget* widget)
 {
+  // decopple old widget
+  if (this->energyWidget != NULL)
+  {
+    this->energyWidget->hide();
+  }
+
+  this->energyWidget = widget;
+  if (this->energyWidget != NULL)
+  {
+    this->energyWidget->show();
+    this->energyWidget->setAbsCoor2D(10,80);
+    this->energyWidget->setSize2D(20,300);
+  }
+
 
 }
Index: trunk/src/world_entities/player.cc
===================================================================
--- trunk/src/world_entities/player.cc	(revision 6439)
+++ trunk/src/world_entities/player.cc	(revision 6440)
@@ -32,5 +32,11 @@
 Player::Player()
 {
-  this->init();
+//  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
+  this->setClassID(CL_PLAYER, "Player");
+
+  PRINTF(4)("PLAYER INIT\n");
+
+  this->controllable = NULL;
+  this->hud = new Hud();
 
   EventHandler::getInstance()->subscribe(this, ES_GAME, SDLK_l);
@@ -43,19 +49,6 @@
 Player::~Player ()
 {
-}
+  delete this->hud;
 
-
-/**
- * initializes a Player
- */
-void Player::init()
-{
-//  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
-  this->setClassID(CL_PLAYER, "Player");
-
-  PRINTF(4)("PLAYER INIT\n");
-
-  this->controllable = NULL;
-  this->hud = new Hud();
 }
 
@@ -66,4 +59,5 @@
   {
       this->controllable = controllable;
+      this->hud->setEnergyWidget(this->controllable->getEnergyWidget());
       return true;
   }
@@ -79,4 +73,5 @@
    {
      this->controllable = NULL;
+     this->hud->setEnergyWidget(NULL);
      return true;
    }
Index: trunk/src/world_entities/player.h
===================================================================
--- trunk/src/world_entities/player.h	(revision 6439)
+++ trunk/src/world_entities/player.h	(revision 6440)
@@ -35,8 +35,4 @@
 
   private:
-    void              init();
-
-
-  private:
     Playable*         controllable;                  //!< The one we controll or NULL if none
     Hud*              hud;                           //!< The HUD to be displayed.
Index: trunk/src/world_entities/space_ships/space_ship.cc
===================================================================
--- trunk/src/world_entities/space_ships/space_ship.cc	(revision 6439)
+++ trunk/src/world_entities/space_ships/space_ship.cc	(revision 6440)
@@ -213,7 +213,4 @@
   dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true);
   this->attachCamera();
-
-  this->setEnergyWidgetVisibilit(true);
-
 }
 
@@ -222,7 +219,4 @@
   dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false);
   this->detachCamera();
-
-  this->setEnergyWidgetVisibilit(false);
-
 }
 
Index: trunk/src/world_entities/world_entity.cc
===================================================================
--- trunk/src/world_entities/world_entity.cc	(revision 6439)
+++ trunk/src/world_entities/world_entity.cc	(revision 6440)
@@ -410,4 +410,10 @@
 }
 
+GLGuiWidget* WorldEntity::getEnergyWidget()
+{
+  this->createEnergyWidget();
+  return this->energyWidget;
+}
+
 /**
  * @param visibility shows or hides the energy-bar
Index: trunk/src/world_entities/world_entity.h
===================================================================
--- trunk/src/world_entities/world_entity.h	(revision 6439)
+++ trunk/src/world_entities/world_entity.h	(revision 6440)
@@ -20,4 +20,6 @@
 class BVTree;
 class Model;
+
+class GLGuiWidget;
 class GLGuiBar;
 
@@ -36,5 +38,5 @@
   void loadModel(const char* fileName, float scaling = 1.0f, unsigned int modelNumber = 0);
   void setModel(Model* model, unsigned int modelNumber = 0);
-Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
+  Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
 
   inline void loadMD2Texture(const char* fileName) { this->md2TextureFileName = fileName; }
@@ -91,5 +93,5 @@
   float removeEnergy(float energy);
   void setMaxEnergy(float maxEnergy);
-
+  GLGuiWidget* getEnergyWidget();
 
 protected:
