Index: code/trunk/src/orxonox/hud/HUD.cc
===================================================================
--- code/trunk/src/orxonox/hud/HUD.cc	(revision 1561)
+++ code/trunk/src/orxonox/hud/HUD.cc	(revision 1562)
@@ -124,11 +124,11 @@
         SceneNode* node;
         node = sm->getRootSceneNode()->createChildSceneNode("tomato1", Vector3(2000.0, 0.0, 0.0));
+        addRadarObject(node, ColourValue(0.5, 0, 0, 1));
+        node = sm->getRootSceneNode()->createChildSceneNode("tomato2", Vector3(0.0, 2000.0, 0.0));
+        addRadarObject(node, ColourValue(0.5, 0, 0, 1));
+        node = sm->getRootSceneNode()->createChildSceneNode("tomato3", Vector3(0.0, 0.0, 2000.0));
+        addRadarObject(node, ColourValue(0.5, 0, 0, 1));
+	node = sm->getRootSceneNode()->createChildSceneNode("station", Vector3(10000.0,16000.0,0.0));
         addRadarObject(node);
-        node = sm->getRootSceneNode()->createChildSceneNode("tomato2", Vector3(0.0, 2000.0, 0.0));
-        addRadarObject(node);
-        node = sm->getRootSceneNode()->createChildSceneNode("tomato3", Vector3(0.0, 0.0, 2000.0));
-        addRadarObject(node);
-	node = sm->getRootSceneNode()->createChildSceneNode("station", Vector3(10000.0,16000.0,0.0));
-        addRadarObject(node, 3);
     }
 
@@ -178,5 +178,5 @@
     }
 
-    void HUD::addRadarObject(SceneNode* node, int colour){
+    void HUD::addRadarObject(SceneNode* node, const ColourValue& colour){
         RadarObject* obj = new RadarObject(container, node, colour);
         roSet.insert(obj);
@@ -193,9 +193,16 @@
 
     void HUD::removeRadarObject(Ogre::SceneNode* node){
-      COUT(3) << "blabla" << std::endl;
-        for(std::set<RadarObject*>::iterator it=roSet.begin(); it!=roSet.end(); it++){
-            if((*it)->getNode() == node) {
+        for(std::set<RadarObject*>::iterator it=roSet.begin(); it!=roSet.end(); ++it){
+            if ((*it)->getNode() == node)
+            {
+                if (this->nav->focus_ == (*it))
+                {
+                    this->nav->cycleFocus();
+                    if (this->nav->focus_ == (*it))
+                        this->nav->focus_ = 0;
+                }
                 delete (*it);
                 roSet.erase(it);
+                return;
             }
         }
Index: code/trunk/src/orxonox/hud/HUD.h
===================================================================
--- code/trunk/src/orxonox/hud/HUD.h	(revision 1561)
+++ code/trunk/src/orxonox/hud/HUD.h	(revision 1562)
@@ -63,5 +63,5 @@
       public:
         virtual void tick(float);
-        void addRadarObject(Ogre::SceneNode* node, int colour = 0);
+        void addRadarObject(Ogre::SceneNode* node, const ColourValue& colour = ColourValue(0.5, 0.5, 0.5, 1));
         void removeRadarObject(Ogre::SceneNode* node);
         void setRenderTimeRatio(float ratio);
Index: code/trunk/src/orxonox/hud/Navigation.cc
===================================================================
--- code/trunk/src/orxonox/hud/Navigation.cc	(revision 1561)
+++ code/trunk/src/orxonox/hud/Navigation.cc	(revision 1562)
@@ -210,5 +210,5 @@
         }
         else{
-            focus_->resetColour();
+            focus_->resetMaterial();
             if(it_ != HUD::getSingleton().roSet.end()){
                 focus_ = *it_;
@@ -224,5 +224,5 @@
             navMarker_->show();
             navText_->show();
-            focus_->setColour(RadarObject::WHITE);
+            focus_->setColour(ColourValue::White);
         }
     }
Index: code/trunk/src/orxonox/hud/RadarObject.cc
===================================================================
--- code/trunk/src/orxonox/hud/RadarObject.cc	(revision 1561)
+++ code/trunk/src/orxonox/hud/RadarObject.cc	(revision 1562)
@@ -31,53 +31,94 @@
 
 #include <OgreOverlayManager.h>
-#include <OgreStringConverter.h>
+#include <OgreMaterialManager.h>
+#include <OgreTechnique.h>
+
 #include "GraphicsEngine.h"
+#include "util/Convert.h"
+
+namespace std
+{
+    template <>
+    class less<orxonox::ColourValue>
+    {
+        public:
+            bool operator()(const orxonox::ColourValue& __x, const orxonox::ColourValue& __y)
+            {
+                if (__x.r == __y.r)
+                {
+                    if (__x.g == __y.g)
+                    {
+                        if (__x.b == __y.b)
+                        {
+                            return __x.a < __y.a;
+                        }
+                        return __x.b < __y.b;
+                    }
+                    return __x.g < __y.g;
+                }
+                return __x.r < __y.r;
+            }
+    };
+}
 
 namespace orxonox
 {
-    using namespace Ogre;
+    unsigned int RadarObject::count_s = 0;
+    std::map<std::string, std::map<ColourValue, std::string> > RadarObject::materials_s;
 
-    int RadarObject::count = 0;		// initialize static variable
+    RadarObject::RadarObject(Ogre::OverlayContainer* container, Ogre::SceneNode* node, const ColourValue& colour, const std::string& texturename)
+    {
+        this->colour_ = colour;
+        this->texturename_ = texturename;
 
-    RadarObject::RadarObject(OverlayContainer* container, SceneNode* node, int colour){
-        container_ = container;
-        node_ = node;
-        colour_ = colour;
-        om = &OverlayManager::getSingleton();
-        panel_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel",
-            "Object"+StringConverter::toString(count)));
-        setColour(colour_);
-        panel_->setDimensions(3,3);
-        panel_->setMetricsMode(Ogre::GMM_PIXELS);
-        panel_->show();
-        index_ = count;
-        count++;
-        container_->addChild(panel_);
+        this->container_ = container;
+        this->node_ = node;
+
+        this->panel_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "RadarObject" + getConvertedValue<unsigned int, std::string>(RadarObject::count_s)));
+        this->setMaterial(colour, texturename);
+
+        this->panel_->setDimensions(3,3);
+        this->panel_->setMetricsMode(Ogre::GMM_PIXELS);
+        this->panel_->show();
+
+        this->index_ = count_s++;
+        this->container_->addChild(panel_);
     }
 
-    RadarObject::~RadarObject(){
+    RadarObject::~RadarObject()
+    {
         delete panel_;
     }
 
-    void RadarObject::setColour(int colour){
-        switch(colour){
-        case RED: panel_->setMaterialName("Orxonox/RedDot"); break;
-        case YELLOW: panel_->setMaterialName("Orxonox/YellowDot"); break;
-        case GREEN: panel_->setMaterialName("Orxonox/GreenDot"); break;
-        case BLUE: panel_->setMaterialName("Orxonox/BlueDot"); break;
-        case WHITE: panel_->setMaterialName("Orxonox/WhiteDot"); break;
-        default: panel_->setMaterialName("Orxonox/RedDot"); break;
+    void RadarObject::setMaterial(const ColourValue& colour, const std::string& texturename)
+    {
+        std::map<ColourValue, std::string>& colourmap = this->materials_s[texturename];
+        std::map<ColourValue, std::string>::const_iterator it = colourmap.find(colour);
+        std::string materialname;
+
+        if (it == colourmap.end())
+        {
+            materialname = "radarmaterial" + getConvertedValue<unsigned int, std::string>(RadarObject::count_s);
+            Ogre::MaterialPtr material = (Ogre::MaterialPtr)Ogre::MaterialManager::getSingleton().create(materialname, "General");
+            Ogre::TextureUnitState* textureunitstate = material->getTechnique(0)->getPass(0)->createTextureUnitState();
+            textureunitstate->setTextureName(texturename);
+            textureunitstate->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, colour);
+            colourmap[colour] = materialname;
         }
+        else
+        {
+            materialname = (*it).second;
+        }
+
+        this->panel_->setMaterialName(materialname);
     }
 
-    void RadarObject::resetColour(){
-        setColour(colour_);
-    }
-
-    Vector3 RadarObject::getPosition(){
+    Vector3 RadarObject::getPosition()
+    {
         return node_->getPosition();
     }
 
-    SceneNode* RadarObject::getNode(){
+    Ogre::SceneNode* RadarObject::getNode()
+    {
         return node_;
     }
Index: code/trunk/src/orxonox/hud/RadarObject.h
===================================================================
--- code/trunk/src/orxonox/hud/RadarObject.h	(revision 1561)
+++ code/trunk/src/orxonox/hud/RadarObject.h	(revision 1562)
@@ -30,4 +30,6 @@
 #define _RadarObject_H__
 
+#include <map>
+
 #include <OgrePrerequisites.h>
 #include <OgreSceneNode.h>
@@ -40,14 +42,16 @@
     class _OrxonoxExport RadarObject
     {
-      private:
-        Ogre::OverlayManager* om;				// our one and only overlay manager
-        Ogre::SceneNode* node_;					// node of object
-        int colour_;
+      public:
+        RadarObject(Ogre::OverlayContainer* container, Ogre::SceneNode* node, const ColourValue& colour = ColourValue(0.5, 0.5, 0.5, 1), const std::string& texturename = "white.tga");
+        ~RadarObject();
 
-      public:
-        RadarObject(Ogre::OverlayContainer* container, Ogre::SceneNode* node, int colour = 0);
-        ~RadarObject();
-        void setColour(int colour);
-        void resetColour();
+        void setMaterial(const ColourValue& colour, const std::string& texturename);
+        inline void setColour(const ColourValue& colour)
+            { this->setMaterial(colour, this->texturename_); }
+        inline void setTexture(const std::string& texturename)
+            { this->setMaterial(this->colour_, texturename); }
+        inline void resetMaterial()
+            { this->setMaterial(this->colour_, this->texturename_); }
+
         Vector3 getPosition();
         Ogre::SceneNode* getNode();
@@ -58,10 +62,10 @@
         Ogre::PanelOverlayElement* panel_;		// the panel used to show the dot
 
-        static int count;
-        static const int RED = 0;
-        static const int YELLOW = 1;
-        static const int GREEN = 2;
-        static const int BLUE = 3;
-        static const int WHITE = 99;            // used if object got nav focus
+      private:
+        static std::map<std::string, std::map<ColourValue, std::string> > materials_s;
+        unsigned static int count_s;
+        Ogre::SceneNode* node_;					// node of object
+        ColourValue colour_;
+        std::string texturename_;
   };
 }
Index: code/trunk/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/objects/SpaceShip.cc	(revision 1561)
+++ code/trunk/src/orxonox/objects/SpaceShip.cc	(revision 1562)
@@ -151,6 +151,6 @@
                 delete this->cam_;
 
-            if (!myShip_ && &HUD::getSingleton()!=NULL)
-              HUD::getSingleton().removeRadarObject(this->getNode());
+            if (!this->myShip_)
+                HUD::getSingleton().removeRadarObject(this->getNode());
         }
     }
@@ -161,5 +161,5 @@
           myShip_=true;
         else
-          HUD::getSingleton().addRadarObject(this->getNode(), 3);
+          HUD::getSingleton().addRadarObject(this->getNode(), this->getProjectileColour());
       }
       if(Model::create())
@@ -282,4 +282,5 @@
     void SpaceShip::setCamera(const std::string& camera)
     {
+      myShip_=true; // TODO: this is only a hack
       camName_=camera;
       // change camera attributes here, if you want to ;)
@@ -353,5 +354,4 @@
         XMLPortParamLoadOnly(SpaceShip, "transDamp", setTransDamp, xmlelement, mode);
         XMLPortParamLoadOnly(SpaceShip, "rotDamp", setRotDamp, xmlelement, mode);
-        myShip_=true; // TODO: this is only a hack
 
         SpaceShip::create();
Index: code/trunk/src/orxonox/objects/SpaceShipAI.cc
===================================================================
--- code/trunk/src/orxonox/objects/SpaceShipAI.cc	(revision 1561)
+++ code/trunk/src/orxonox/objects/SpaceShipAI.cc	(revision 1562)
@@ -80,5 +80,4 @@
         SpaceShip::XMLPort(xmlelement, mode);
 
-        this->myShip_=true;
         this->actionTimer_.setTimer(ACTION_INTERVAL, true, this, createExecutor(createFunctor(&SpaceShipAI::action)));
     }
