Index: code/trunk/src/orxonox/overlays/hud/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/overlays/hud/CMakeLists.txt	(revision 3101)
+++ code/trunk/src/orxonox/overlays/hud/CMakeLists.txt	(revision 3104)
@@ -12,3 +12,5 @@
   DeathMessage.cc
   PongScore.cc
+  UnderAttackHealthBar.cc
+  TeamBaseMatchScore.cc
 )
Index: code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.cc	(revision 3104)
+++ code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.cc	(revision 3104)
@@ -0,0 +1,127 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "TeamBaseMatchScore.h"
+
+#include <OgreTextAreaOverlayElement.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "objects/gametypes/TeamBaseMatch.h"
+#include "objects/infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateFactory(TeamBaseMatchScore);
+
+    TeamBaseMatchScore::TeamBaseMatchScore(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(TeamBaseMatchScore);
+
+        this->owner_ = 0;
+
+        this->bShowBases_ = false;
+        this->bShowScore_ = false;
+        this->bShowLeftTeam_ = false;
+        this->bShowRightTeam_ = false;
+    }
+
+    TeamBaseMatchScore::~TeamBaseMatchScore()
+    {
+    }
+
+    void TeamBaseMatchScore::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(TeamBaseMatchScore, XMLPort, xmlelement, mode);
+
+        XMLPortParam(TeamBaseMatchScore, "showbases",     setShowBases,     getShowBases,     xmlelement, mode).defaultValues(false);
+        XMLPortParam(TeamBaseMatchScore, "showscore",     setShowScore,     getShowScore,     xmlelement, mode).defaultValues(false);
+        XMLPortParam(TeamBaseMatchScore, "showleftteam",  setShowLeftTeam,  getShowLeftTeam,  xmlelement, mode).defaultValues(false);
+        XMLPortParam(TeamBaseMatchScore, "showrightteam", setShowRightTeam, getShowRightTeam, xmlelement, mode).defaultValues(false);
+    }
+
+    void TeamBaseMatchScore::tick(float dt)
+    {
+        SUPER(TeamBaseMatchScore, tick, dt);
+
+        if (this->owner_)
+        {
+            std::string bases1 = "(" + convertToString(this->owner_->getTeamBases(0)) + ")";
+            std::string bases2 = "(" + convertToString(this->owner_->getTeamBases(1)) + ")";
+
+            std::string score1 = convertToString(this->owner_->getTeamPoints(0));
+            std::string score2 = convertToString(this->owner_->getTeamPoints(1));
+
+            std::string output1;
+            if (this->bShowLeftTeam_)
+            {
+                if (this->bShowBases_ && this->bShowScore_)
+                    output1 = bases1 + " - " + score1;
+                else if (this->bShowScore_)
+                    output1 = score1;
+                else if (this->bShowBases_)
+                    output1 = bases1;
+            }
+
+            std::string output2;
+            if (this->bShowRightTeam_)
+            {
+                if (this->bShowBases_ && this->bShowScore_)
+                    output2 = score2 + " - " + bases2;
+                else if (this->bShowScore_)
+                    output2 = score2;
+                else if (this->bShowBases_)
+                    output2 = bases2;
+            }
+
+            std::string output = "";
+            if (this->bShowBases_ || this->bShowScore_)
+            {
+                if (this->bShowLeftTeam_ && this->bShowRightTeam_)
+                    output = output1 + ":" + output2;
+                else if (this->bShowLeftTeam_ || this->bShowRightTeam_)
+                    output = output1 + output2;
+            }
+
+            this->setCaption(output);
+        }
+    }
+
+
+    void TeamBaseMatchScore::changedOwner()
+    {
+        SUPER(TeamBaseMatchScore, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+            this->owner_ = dynamic_cast<TeamBaseMatch*>(this->getOwner()->getGametype());
+        else
+            this->owner_ = 0;
+    }
+}
Index: code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.h	(revision 3104)
+++ code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.h	(revision 3104)
@@ -0,0 +1,77 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _TeamBaseMatchScore_H__
+#define _TeamBaseMatchScore_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "overlays/OverlayText.h"
+#include "objects/Tickable.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport TeamBaseMatchScore : public OverlayText, public Tickable
+    {
+        public:
+            TeamBaseMatchScore(BaseObject* creator);
+            ~TeamBaseMatchScore();
+
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedOwner();
+
+            inline void setShowBases(bool value)
+                { this->bShowBases_ = value; }
+            inline bool getShowBases() const
+                { return this->bShowBases_; }
+
+            inline void setShowScore(bool value)
+                { this->bShowScore_ = value; }
+            inline bool getShowScore() const
+                { return this->bShowScore_; }
+
+            inline void setShowLeftTeam(bool value)
+                { this->bShowLeftTeam_ = value; }
+            inline bool getShowLeftTeam() const
+                { return this->bShowLeftTeam_; }
+
+            inline void setShowRightTeam(bool value)
+                { this->bShowRightTeam_ = value; }
+            inline bool getShowRightTeam() const
+                { return this->bShowRightTeam_; }
+
+        private:
+            TeamBaseMatch* owner_;
+            bool bShowBases_;
+            bool bShowScore_;
+            bool bShowLeftTeam_;
+            bool bShowRightTeam_;
+    };
+}
+#endif /* _TeamBaseMatchScore_H__ */
Index: code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.cc	(revision 3104)
+++ code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.cc	(revision 3104)
@@ -0,0 +1,98 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "UnderAttackHealthBar.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "objects/infos/PlayerInfo.h"
+#include "objects/gametypes/UnderAttack.h"
+#include "objects/worldentities/pawns/Destroyer.h"
+
+namespace orxonox
+{
+    CreateFactory(UnderAttackHealthBar);
+
+    UnderAttackHealthBar::UnderAttackHealthBar(BaseObject* creator) : HUDHealthBar(creator)
+    {
+        RegisterObject(UnderAttackHealthBar);
+
+        this->owner_ = 0;
+
+        this->text_ = new OverlayText(this);
+        this->text_->setFont("Monofur");
+        this->text_->setTextSize(0.04);
+        this->text_->setAlignmentString("center");
+        this->text_->setColour(ColourValue::White);
+        this->text_->setPickPoint(Vector2(0.5, 0));
+
+        this->inittimer_.setTimer(0.0f, false, this, createExecutor(createFunctor(&UnderAttackHealthBar::init)));
+    }
+
+    UnderAttackHealthBar::~UnderAttackHealthBar()
+    {
+        if (this->isInitialized())
+            delete this->text_;
+    }
+
+    void UnderAttackHealthBar::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(UnderAttackHealthBar, XMLPort, xmlelement, mode);
+
+        XMLPortParam(UnderAttackHealthBar, "descriptionpickpoint", setDescriptionPickPoint, getDescriptionPickPoint, xmlelement, mode);
+        XMLPortParam(UnderAttackHealthBar, "descriptionoffset", setDescriptionOffset, getDescriptionOffset, xmlelement, mode);
+    }
+
+    void UnderAttackHealthBar::changedOwner()
+    {
+        SUPER(UnderAttackHealthBar, changedOwner);
+
+        PlayerInfo* player = dynamic_cast<PlayerInfo*>(this->getOwner());
+        if (player)
+        {
+            this->owner_ = player;
+
+            UnderAttack* ua = dynamic_cast<UnderAttack*>(player->getGametype());
+            if (ua)
+            {
+                this->setOwner(ua->getDestroyer());
+
+                if (ua->getTeam(player) == 0)
+                    this->text_->setCaption("Attack the Transporter!");
+                else
+                    this->text_->setCaption("Defend the Transporter!");
+            }
+        }
+    }
+
+    void UnderAttackHealthBar::init()
+    {
+        this->setOwner(this->owner_);
+    }
+}
Index: code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.h	(revision 3104)
+++ code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.h	(revision 3104)
@@ -0,0 +1,66 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _UnderAttackHealthBar_H__
+#define _UnderAttackHealthBar_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "HUDHealthBar.h"
+#include "tools/Timer.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport UnderAttackHealthBar : public HUDHealthBar
+    {
+        public:
+            UnderAttackHealthBar(BaseObject* creator);
+            ~UnderAttackHealthBar();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedOwner();
+
+            inline void setDescriptionPickPoint(const Vector2& pickpoint)
+                { this->text_->setPickPoint(pickpoint); }
+            inline Vector2 getDescriptionPickPoint() const
+                { return this->text_->getPickPoint(); }
+
+            inline void setDescriptionOffset(const Vector2& position)
+                { this->text_->setPosition(this->getPosition() + (position - this->getPickPoint()) * this->getSize()); }
+            inline Vector2 getDescriptionOffset() const
+                { return (this->text_->getPosition() - this->getPosition()) / this->getSize() + this->getPickPoint(); }
+
+        private:
+            void init();
+
+            PlayerInfo* owner_;
+            OverlayText* text_;
+            Timer<UnderAttackHealthBar> inittimer_;
+    };
+}
+#endif /* _UnderAttackHealthBar_H__ */
