Index: code/branches/objecthierarchy2/src/orxonox/objects/Radar.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/Radar.cc	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/objects/Radar.cc	(revision 2256)
@@ -112,8 +112,6 @@
             for (ObjectList<RadarViewable>::iterator itElement = ObjectList<RadarViewable>::begin(); itElement; ++itElement)
             {
-/*
-                if ((*itElement) != SpaceShip::getLocalShip() && (*itListener)->getRadarSensitivity() > (*itElement)->getRadarObjectCamouflage())
+                if ((*itListener)->getRadarSensitivity() > (*itElement)->getRadarObjectCamouflage())
                     (*itListener)->displayObject(*itElement, *itElement == this->focus_);
-*/
             }
         }
@@ -128,7 +126,8 @@
             this->focus_ = 0;
         }
-        else
-        {
-            Vector3 localPosition;// = SpaceShip::getLocalShip()->getPosition();
+/*
+        else if (this->owner_)
+        {
+            Vector3 localPosition = this->owner_->getPosition();
             Vector3 targetPosition = localPosition;
             if (*(this->itFocus_))
@@ -143,8 +142,7 @@
             for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it)
             {
-/*
-                if (*it == SpaceShip::getLocalShip())
+                if (*it == (RadarViewable*)this->owner_)
                     continue;
-*/
+
                 float targetDistance = localPosition.squaredDistance((*it)->getWorldPosition());
                 if (targetDistance > currentDistance && targetDistance < nextDistance)
@@ -171,4 +169,5 @@
             }
         }
+*/
     }
 
Index: code/branches/objecthierarchy2/src/orxonox/objects/RadarViewable.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/RadarViewable.cc	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/objects/RadarViewable.cc	(revision 2256)
@@ -29,8 +29,10 @@
 #include "OrxonoxStableHeaders.h"
 #include "RadarViewable.h"
+
 #include "util/Debug.h"
+#include "util/Exception.h"
 #include "core/CoreIncludes.h"
-//#include "objects/WorldEntity.h"
-#include "Radar.h"
+#include "objects/worldentities/WorldEntity.h"
+#include "objects/Radar.h"
 
 namespace orxonox
@@ -40,7 +42,6 @@
     */
     RadarViewable::RadarViewable()
-        : radarObject_(0)
-        , radarObjectCamouflage_(0.0f)
-        , radarObjectType_(Dot)
+        : radarObjectCamouflage_(0.0f)
+        , radarObjectShape_(Dot)
         , radarObjectDescription_("staticObject")
     {
@@ -52,5 +53,5 @@
         Radar* radar = Radar::getInstancePtr();
         if (radar)
-            this->radarObjectType_ = radar->addObjectDescription(str);
+            this->radarObjectShape_ = radar->addObjectDescription(str);
         else
         {
@@ -62,12 +63,14 @@
     const Vector3& RadarViewable::getWorldPosition() const
     {
-        validate();
-        return Vector3::ZERO;//this->radarObject_->getWorldPosition();
+        const WorldEntity* object = this->getWorldEntity();
+        validate(object);
+        return object->getWorldPosition();
     }
 
     Vector3 RadarViewable::getOrientedVelocity() const
     {
-        validate();
-        return Vector3::ZERO;//this->radarObject_->getOrientation() * this->radarObject_->getVelocity();
+        const WorldEntity* object = this->getWorldEntity();
+        validate(object);
+        return object->getWorldOrientation() * object->getVelocity();
     }
 }
Index: code/branches/objecthierarchy2/src/orxonox/objects/RadarViewable.h
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/RadarViewable.h	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/objects/RadarViewable.h	(revision 2256)
@@ -44,6 +44,4 @@
     class _OrxonoxExport RadarViewable : virtual public OrxonoxClass
     {
-    class WorldEntity;
-
     public:
         enum Shape
@@ -58,28 +56,40 @@
         virtual ~RadarViewable() { }
 
-        float getRadarObjectCamouflage() const { return this->radarObjectCamouflage_; }
-        void setRadarObjectCamouflage(float camouflage) { this->radarObjectCamouflage_ = camouflage; }
+        inline void setRadarObjectCamouflage(float camouflage)
+            { this->radarObjectCamouflage_ = camouflage; }
+        inline float getRadarObjectCamouflage() const
+            { return this->radarObjectCamouflage_; }
 
-        const ColourValue& getRadarObjectColour() const { return this->radarObjectColour_; }
-        void setRadarObjectColour(const ColourValue& colour) { this->radarObjectColour_ = colour; }
+        inline void setRadarObjectColour(const ColourValue& colour)
+            { this->radarObjectColour_ = colour; }
+        inline const ColourValue& getRadarObjectColour() const
+            { return this->radarObjectColour_; }
 
-        const std::string& getRadarObjectDescription() const { return this->radarObjectDescription_; }
         void setRadarObjectDescription(const std::string& str);
+        inline const std::string& getRadarObjectDescription() const
+            { return this->radarObjectDescription_; }
 
-        const WorldEntity* getWorldEntity() const { return this->radarObject_; }
+        virtual const WorldEntity* getWorldEntity() const = 0;
+
         const Vector3& getWorldPosition() const;
         Vector3 getOrientedVelocity() const;
 
-        Shape getRadarObjectType() const { return this->radarObjectType_; }
-
-    protected:
-        WorldEntity* radarObject_;
+        inline void setRadarObjectShape(Shape shape)
+            { this->radarObjectShape_ = shape; }
+        inline Shape getRadarObjectShape() const
+            { return this->radarObjectShape_; }
 
     private:
-        void validate() const { if (!this->radarObject_)
-        { COUT(1) << "Assertation: Every RadarViewable has to be assigned a WorldEntity pointer!" << std::endl; assert(0); } }
+        void validate(const WorldEntity* object) const
+        {
+            if (!object)
+            {
+                COUT(1) << "Assertation: Every RadarViewable has to be assigned a WorldEntity pointer!" << std::endl;
+                assert(0);
+            }
+        }
 
         float radarObjectCamouflage_;
-        Shape radarObjectType_;
+        Shape radarObjectShape_;
         std::string radarObjectDescription_;
         ColourValue radarObjectColour_;
Index: code/branches/objecthierarchy2/src/orxonox/objects/items/Engine.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/items/Engine.cc	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/objects/items/Engine.cc	(revision 2256)
@@ -64,4 +64,6 @@
     Engine::~Engine()
     {
+        if (this->isInitialized() && this->ship_)
+            this->ship_->setEngine(0);
     }
 
@@ -111,5 +113,5 @@
             Synchronisable* object = Synchronisable::getSynchronisable(this->shipID_);
             if (object)
-                this->ship_ = dynamic_cast<SpaceShip*>(object);
+                this->addToSpaceShip(dynamic_cast<SpaceShip*>(object));
         }
     }
@@ -182,5 +184,9 @@
         this->ship_ = ship;
         if (ship)
+        {
             this->shipID_ = ship->getObjectID();
+            if (ship->getEngine() != this)
+                ship->setEngine(this);
+        }
     }
 
Index: code/branches/objecthierarchy2/src/orxonox/objects/items/Engine.h
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/items/Engine.h	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/objects/items/Engine.h	(revision 2256)
@@ -72,4 +72,13 @@
                 { this->maxSpeedUpDown_ = speed; }
 
+            inline float getMaxSpeedFront() const
+                { return this->maxSpeedFront_; }
+            inline float getMaxSpeedBack() const
+                { return this->maxSpeedBack_; }
+            inline float getMaxSpeedLeftRight() const
+                { return this->maxSpeedLeftRight_; }
+            inline float getMaxSpeedUpDown() const
+                { return this->maxSpeedUpDown_; }
+
             inline void setAccelerationFront(float acceleration)
                 { this->accelerationFront_ = acceleration; }
@@ -82,4 +91,15 @@
             inline void setAccelerationUpDown(float acceleration)
                 { this->accelerationUpDown_ = acceleration; }
+
+            inline float getAccelerationFront() const
+                { return this->accelerationFront_; }
+            inline float getAccelerationBrake() const
+                { return this->accelerationBrake_; }
+            inline float getAccelerationBack() const
+                { return this->accelerationBack_; }
+            inline float getAccelerationLeftRight() const
+                { return this->accelerationLeftRight_; }
+            inline float getAccelerationUpDown() const
+                { return this->accelerationUpDown_; }
 
             virtual const Vector3& getDirection() const;
Index: code/branches/objecthierarchy2/src/orxonox/objects/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 2256)
@@ -168,5 +168,4 @@
             {
                 this->client_overwrite_ = this->server_overwrite_;
-COUT(0) << "CE: bidirectional synchronization" << std::endl;
                 this->setObjectMode(direction::bidirectional);
             }
@@ -202,5 +201,4 @@
     void ControllableEntity::startLocalHumanControl()
     {
-//        std::cout << this->getObjectID() << " ###### start local control" << std::endl;
         this->camera_ = new Camera(this);
         this->camera_->requestFocus();
@@ -216,4 +214,5 @@
             this->hud_ = new OverlayGroup(this);
             this->hud_->addTemplate(this->hudtemplate_);
+            this->hud_->setOwner(this);
         }
     }
@@ -221,5 +220,4 @@
     void ControllableEntity::stopLocalHumanControl()
     {
-//        std::cout << "###### stop local control" << std::endl;
         this->camera_->detachFromParent();
         delete this->camera_;
@@ -244,5 +242,4 @@
             else if (this->bHasLocalController_)
             {
-//                COUT(2) << "setting client position" << endl;
                 this->client_velocity_ = this->velocity_;
                 this->client_position_ = this->node_->getPosition();
@@ -254,4 +251,5 @@
     {
         REGISTERSTRING(this->cameraPositionTemplate_, direction::toclient);
+        REGISTERSTRING(this->hudtemplate_, direction::toclient);
 
         REGISTERDATA(this->client_overwrite_,   direction::toserver);
@@ -304,10 +302,7 @@
         if (this->server_overwrite_ == this->client_overwrite_)
         {
-//            COUT(2) << "callback: setting client position" << endl;
             this->node_->setPosition(this->client_position_);
             this->server_position_ = this->client_position_;
         }
-//        else
-//          COUT(2) << "callback: not setting client position" << endl;
     }
 
Index: code/branches/objecthierarchy2/src/orxonox/objects/worldentities/WorldEntity.h
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/worldentities/WorldEntity.h	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/objects/worldentities/WorldEntity.h	(revision 2256)
@@ -72,4 +72,7 @@
             inline void translate(float x, float y, float z, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
                 { this->translate(Vector3(x, y, z), relativeTo); }
+
+            virtual inline const Vector3& getVelocity() const
+                { return Vector3::ZERO; }
 
             virtual void setOrientation(const Quaternion& orientation) = 0;
Index: code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2256)
@@ -61,4 +61,7 @@
         this->weaponSystem_->getWeaponSetPointer(0)->getWeaponSlotPointer(0)->setAmmoType(true);
         */
+
+        this->setRadarObjectColour(ColourValue::Red);
+        this->setRadarObjectShape(RadarViewable::Dot);
 
         this->registerVariables();
Index: code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 2256)
@@ -33,8 +33,9 @@
 
 #include "objects/worldentities/ControllableEntity.h"
+#include "objects/RadarViewable.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport Pawn : public ControllableEntity
+    class _OrxonoxExport Pawn : public ControllableEntity, public RadarViewable
     {
         public:
@@ -78,4 +79,7 @@
             virtual void postSpawn();
 
+            inline const WorldEntity* getWorldEntity() const
+                { return (WorldEntity*)this; }
+
         protected:
             virtual void spawn();
Index: code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 2256)
@@ -229,3 +229,10 @@
         }
     }
+
+    void SpaceShip::setEngine(Engine* engine)
+    {
+        this->engine_ = engine;
+        if (engine && engine->getShip() != this)
+            engine->addToSpaceShip(this);
+    }
 }
Index: code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/SpaceShip.h
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/SpaceShip.h	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/SpaceShip.h	(revision 2256)
@@ -58,4 +58,8 @@
             virtual void boost();
 
+            void setEngine(Engine* engine);
+            inline Engine* getEngine() const
+                { return this->engine_; }
+
             void setMaxRotation(const Degree& value)
                 { this->maxRotation_ = value; }
Index: code/branches/objecthierarchy2/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 2256)
@@ -60,4 +60,6 @@
     {
         RegisterObject(OrxonoxOverlay);
+
+        this->owner_ = 0;
 
         if (!Core::showsGraphics())
Index: code/branches/objecthierarchy2/src/orxonox/overlays/OrxonoxOverlay.h
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/overlays/OrxonoxOverlay.h	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/overlays/OrxonoxOverlay.h	(revision 2256)
@@ -154,4 +154,16 @@
         virtual void changedVisibility();
 
+        inline void setOwner(ControllableEntity* owner)
+        {
+            if (this->owner_ != owner)
+            {
+                this->owner_ = owner;
+                this->changedOwner();
+            }
+        }
+        inline ControllableEntity* getOwner() const
+            { return this->owner_; }
+        virtual void changedOwner() {}
+
     protected:
         virtual void angleChanged();
@@ -182,5 +194,8 @@
             We could also use the ObjectList, but that doesn't guarantee XMLPort(.) was called and is slower. */
         static std::map<std::string, OrxonoxOverlay*> overlays_s;
+        ControllableEntity* owner_;
   };
+
+  SUPER_FUNCTION(7, OrxonoxOverlay, changedOwner, false);
 }
 
Index: code/branches/objecthierarchy2/src/orxonox/overlays/OverlayGroup.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/overlays/OverlayGroup.cc	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/overlays/OverlayGroup.cc	(revision 2256)
@@ -55,4 +55,6 @@
         RegisterObject(OverlayGroup);
 
+        this->owner_ = 0;
+
         setScale(Vector2(1.0, 1.0));
         setScroll(Vector2(0.0, 0.0));
@@ -113,4 +115,6 @@
             hudElements_[element->getName()] = element;
             element->setVisible(this->isVisible());
+            if (this->owner_)
+                element->setOwner(this->owner_);
         }
     }
@@ -137,4 +141,11 @@
     }
 
+    void OverlayGroup::setOwner(ControllableEntity* owner)
+    {
+        this->owner_ = owner;
+
+        for (std::map<std::string, OrxonoxOverlay*>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
+            (*it).second->setOwner(owner);
+    }
 
     //########### Console commands ############
Index: code/branches/objecthierarchy2/src/orxonox/overlays/OverlayGroup.h
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/overlays/OverlayGroup.h	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/overlays/OverlayGroup.h	(revision 2256)
@@ -69,4 +69,8 @@
         void changedVisibility();
 
+        void setOwner(ControllableEntity* owner);
+        inline ControllableEntity* getOwner() const
+            { return this->owner_; }
+
     private:
         //! Scales each OrxonoxOverlay individually by scale.
@@ -88,4 +92,5 @@
         Vector2 scale_;                                         //!< Current scale (independant of the elements).
         Vector2 scroll_;                                        //!< Current scrolling offset.
+        ControllableEntity* owner_;                             //!< The owner of this OverlayGroup
     };
 }
Index: code/branches/objecthierarchy2/src/orxonox/overlays/hud/HUDRadar.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/overlays/hud/HUDRadar.cc	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/overlays/hud/HUDRadar.cc	(revision 2256)
@@ -40,4 +40,6 @@
 #include "core/XMLPort.h"
 #include "objects/Radar.h"
+#include "objects/worldentities/WorldEntity.h"
+#include "objects/worldentities/pawns/Pawn.h"
 #include "tools/TextureGenerator.h"
 
@@ -51,17 +53,19 @@
         RegisterObject(HUDRadar);
 
-        marker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
+        this->marker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
             .createOverlayElement("Panel", "HUDRadar_marker_" + getUniqueNumberString()));
-        marker_->setMaterialName("Orxonox/RadarMarker");
-        overlay_->add2D(marker_);
-        marker_->hide();
+        this->marker_->setMaterialName("Orxonox/RadarMarker");
+        this->overlay_->add2D(this->marker_);
+        this->marker_->hide();
 
-        setRadarSensitivity(1.0f);
-        setHalfDotSizeDistance(3000.0f);
-        setMaximumDotSize(0.1f);
+        this->setRadarSensitivity(1.0f);
+        this->setHalfDotSizeDistance(3000.0f);
+        this->setMaximumDotSize(0.1f);
 
-        shapeMaterials_[RadarViewable::Dot]      = "RadarSquare.tga";
-        shapeMaterials_[RadarViewable::Triangle] = "RadarSquare.tga";
-        shapeMaterials_[RadarViewable::Square]   = "RadarSquare.tga";
+        this->shapeMaterials_[RadarViewable::Dot]      = "RadarDot.tga";
+        this->shapeMaterials_[RadarViewable::Triangle] = "RadarSquare.tga";
+        this->shapeMaterials_[RadarViewable::Square]   = "RadarSquare.tga";
+
+        this->owner_ = 0;
     }
 
@@ -90,15 +94,20 @@
     void HUDRadar::displayObject(RadarViewable* object, bool bIsMarked)
     {
-/*
+        if (object == (RadarViewable*)this->owner_)
+            return;
+
         const WorldEntity* wePointer = object->getWorldEntity();
 
         // Just to be sure that we actually have a WorldEntity.
         // We could do a dynamic_cast, but that would be a lot slower.
-        if (!wePointer)
+        if (!wePointer || !this->owner_)
         {
-            CCOUT(4) << "Cannot display a non-WorldEntitiy on the radar" << std::endl;
+            if (!wePointer)
+                CCOUT(2) << "Cannot display a non-WorldEntitiy on the radar" << std::endl;
+            if (!this->owner_)
+                CCOUT(2) << "No owner defined" << std::endl;
             return;
         }
-*/
+
         // try to find a panel already created
         Ogre::PanelOverlayElement* panel;
@@ -112,5 +121,5 @@
             // get right material
             panel->setMaterialName(TextureGenerator::getMaterialName(
-                shapeMaterials_[object->getRadarObjectType()], object->getRadarObjectColour()));
+                shapeMaterials_[object->getRadarObjectShape()], object->getRadarObjectColour()));
             this->overlay_->add2D(panel);
             this->itRadarDots_ = this->radarDots_.end();
@@ -121,12 +130,12 @@
             ++itRadarDots_;
             std::string materialName = TextureGenerator::getMaterialName(
-                shapeMaterials_[object->getRadarObjectType()], object->getRadarObjectColour());
+                shapeMaterials_[object->getRadarObjectShape()], object->getRadarObjectColour());
             if (materialName != panel->getMaterialName())
                 panel->setMaterialName(materialName);
         }
         panel->show();
-/*
+
         // set size to fit distance...
-        float distance = (wePointer->getWorldPosition() - SpaceShip::getLocalShip()->getPosition()).length();
+        float distance = (wePointer->getWorldPosition() - this->owner_->getPosition()).length();
         // calculate the size with 1/distance dependency for simplicity (instead of exp(-distance * lambda)
         float size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance);
@@ -134,5 +143,5 @@
 
         // calc position on radar...
-        Vector2 coord = get2DViewcoordinates(SpaceShip::getLocalShip()->getPosition(), SpaceShip::getLocalShip()->getDir(), SpaceShip::getLocalShip()->getOrth(), wePointer->getWorldPosition());
+        Vector2 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
         coord *= Ogre::Math::PI / 3.5; // small adjustment to make it fit the texture
         panel->setPosition((1.0 + coord.x - size) * 0.5, (1.0 - coord.y - size) * 0.5);
@@ -144,5 +153,4 @@
             this->marker_->setPosition((1.0 + coord.x - size * 1.5) * 0.5, (1.0 - coord.y - size * 1.5) * 0.5);
         }
-*/
     }
 
@@ -154,3 +162,10 @@
         this->marker_->hide();
     }
+
+    void HUDRadar::changedOwner()
+    {
+        SUPER(HUDRadar, changedOwner);
+
+        this->owner_ = dynamic_cast<Pawn*>(this->getOwner());
+    }
 }
Index: code/branches/objecthierarchy2/src/orxonox/overlays/hud/HUDRadar.h
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/overlays/hud/HUDRadar.h	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/overlays/hud/HUDRadar.h	(revision 2256)
@@ -49,4 +49,5 @@
 
         virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+        virtual void changedOwner();
 
     private:
@@ -76,4 +77,6 @@
 
         float sensitivity_;
+
+        Pawn* owner_;
     };
 }
Index: code/branches/objecthierarchy2/src/orxonox/overlays/hud/HUDSpeedBar.cc
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/overlays/hud/HUDSpeedBar.cc	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/overlays/hud/HUDSpeedBar.cc	(revision 2256)
@@ -31,4 +31,6 @@
 #include "HUDSpeedBar.h"
 #include "core/CoreIncludes.h"
+#include "objects/worldentities/pawns/SpaceShip.h"
+#include "objects/items/Engine.h"
 
 namespace orxonox
@@ -41,4 +43,5 @@
         RegisterObject(HUDSpeedBar);
 
+        this->owner_ = 0;
     }
 
@@ -49,14 +52,18 @@
     void HUDSpeedBar::tick(float dt)
     {
-/*
-        SpaceShip* ship = SpaceShip::getLocalShip();
-        if (ship)
+        if (this->owner_ && this->owner_->getEngine())
         {
-            float v = ship->getVelocity().length();
-            float value = v / ship->getMaxSpeed();
+            float v = this->owner_->getVelocity().length();
+            float value = v / (this->owner_->getEngine()->getMaxSpeedFront() * this->owner_->getEngine()->getSpeedFactor() * this->owner_->getEngine()->getBoostFactor());
             if (value != this->getValue())
                 this->setValue(value);
         }
-*/
+    }
+
+    void HUDSpeedBar::changedOwner()
+    {
+        SUPER(HUDSpeedBar, changedOwner);
+
+        this->owner_ = dynamic_cast<SpaceShip*>(this->getOwner());
     }
 }
Index: code/branches/objecthierarchy2/src/orxonox/overlays/hud/HUDSpeedBar.h
===================================================================
--- code/branches/objecthierarchy2/src/orxonox/overlays/hud/HUDSpeedBar.h	(revision 2255)
+++ code/branches/objecthierarchy2/src/orxonox/overlays/hud/HUDSpeedBar.h	(revision 2256)
@@ -45,4 +45,8 @@
 
         virtual void tick(float dt);
+        virtual void changedOwner();
+
+    private:
+        SpaceShip* owner_;
     };
 }
