Index: code/branches/spaceboundaries/data/levels/myTestLevel.oxw
===================================================================
--- code/branches/spaceboundaries/data/levels/myTestLevel.oxw	(revision 8201)
+++ code/branches/spaceboundaries/data/levels/myTestLevel.oxw	(revision 8201)
@@ -0,0 +1,38 @@
+<LevelInfo
+ name = "MyTestLevel"
+ description = "A level to test the Class SpaceBoundaries."
+ tags = "test"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipPirate.oxt")
+?>
+
+<Level
+ name         = "Sample"
+ description  = "Just a few tests"
+>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+    <SpawnPoint team=0 position="0,0,0" lookat="200,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+    
+    <SpaceBoundaries warnDistance="-1" maxDistance="200" healthDecrease="0.1" position="200,0,0"/>
+    
+  </Scene>
+</Level>
+
Index: code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.cc
===================================================================
--- code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.cc	(revision 8167)
+++ code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.cc	(revision 8201)
@@ -29,16 +29,12 @@
 #include "SpaceBoundaries.h"
 
-/* Folgender Block ist Copy-Paste und somit teilweise wohl unnoetig */
-#include "core/Template.h"
-#include "core/XMLPort.h"
-#include "gametypes/Gametype.h"
-#include "worldentities/pawns/Pawn.h"
-
-/* Eigene, spezifische include-Statements*/
 #include "worldentities/MobileEntity.h"
 #include "worldentities/ControllableEntity.h"
 #include "core/ObjectListIterator.h"
-#include <worldentities/pawns/Pawn.h>
-#include <infos/PlayerInfo.h>
+#include "core/XMLPort.h"
+#include "worldentities/pawns/Pawn.h"
+#include "infos/PlayerInfo.h"
+#include "interfaces/RadarViewable.h"
+
 
 //#include <OgreTextAreaOverlayElement.h>
@@ -52,21 +48,23 @@
     SpaceBoundaries::SpaceBoundaries(BaseObject* creator) : StaticEntity(creator)
     {
+        /* Standardwerte, die zum Tragen kommen,
+         * falls im XML-File keine Werte spezifiziert wurden. */
+        this->setMaxDistance(3000);
+        this->setWarnDistance(2000);
+        this->setHealthDecrease(1);
+        
         RegisterObject(SpaceBoundaries);
-        COUT(0) << "Test ob Konstruktor aufgerufen wird." << std::endl; //!< message for debugging
+        
         // Show Boundaries on the radar.
+        this->centerRadar_ = new RadarViewable(this, this);
+        this->centerRadar_->setRadarObjectShape(RadarViewable::Dot);
+        this->centerRadar_->setRadarVisibility(false);
+        
 //         m_pColoredTextAreaOverlayElementFactory = new ColoredTextAreaOverlayElementFactory();
     }
     SpaceBoundaries::~SpaceBoundaries()
     {
+        delete this->centerRadar_;
 //        delete pColoredTextAreaOverlayElementFactory;
-    }
-    
-    void SpaceBoundaries::setCenter(Vector3 r)
-    {
-        this->center_ = r;
-    }
-    Vector3 SpaceBoundaries::getCenter()
-    {
-        return this->center_;
     }
     
@@ -88,4 +86,13 @@
         return this->warnDistance_;
     }
+    
+    void SpaceBoundaries::setHealthDecrease(float amount)
+    {
+        this->healthDecrease_ = amount/1000;
+    }
+    float SpaceBoundaries::getHealthDecrease()
+    {
+        return this->healthDecrease_;
+    }
 
     void SpaceBoundaries::XMLPort(Element& xmlelement, XMLPort::Mode mode)
@@ -93,7 +100,7 @@
         SUPER(SpaceBoundaries, XMLPort, xmlelement, mode);
 
-        XMLPortParam(SpaceBoundaries, "center", setCenter, getCenter, xmlelement, mode);
         XMLPortParam(SpaceBoundaries, "maxDistance", setMaxDistance, getMaxDistance, xmlelement, mode);
         XMLPortParam(SpaceBoundaries, "warnDistance", setWarnDistance, getWarnDistance, xmlelement, mode);
+        XMLPortParam(SpaceBoundaries, "healthDecrease", setHealthDecrease, getHealthDecrease, xmlelement, mode);
     }
     
@@ -104,12 +111,10 @@
             MobileEntity* myMobileEntity = *item;
             Pawn* myItem = dynamic_cast<Pawn*>(myMobileEntity);
-            //COUT(0) << "Die for-Schleife wird erreicht!!!" << std::endl; //!< message for debugging
             if(myItem != NULL)
             {
                 float distance = computeDistance((WorldEntity*) myItem);
                 bool humanItem = this->isHumanPlayer(myItem);
-                COUT(0) << "Pawn wird erkannt!!!" << std::endl; //!< message for debugging
                 COUT(0) << "Distanz:" << distance << std::endl; //!< message for debugging
-                if(distance > this->warnDistance_ /*&& distance < this->maxDistance*/)
+                if(distance > this->warnDistance_ && distance < this->maxDistance_)
                 {
                     COUT(0) << "You are leaving the area" << std::endl; //!< message for debugging
@@ -119,14 +124,16 @@
                         this->displayWarning("Attention! You are leaving the area!");
                     } else {
-                    
+                        
                     }
-                } else if(distance > maxDistance_)
+                }
+                if(distance > maxDistance_)
                 {
-                    // Decrease Health
                     if(humanItem)
                     {
+                        COUT(0) << "Health should be decreasing!" << std::endl;
+                        this->displayWarning("You are out of the area now!");
+                        myItem->removeHealth( (distance - maxDistance_) * this->healthDecrease_);
+                    } else {
                         
-                    } else {
-                    
                     }
                 }
@@ -138,5 +145,5 @@
     {
         Vector3 itemPosition = item->getPosition();
-        return (itemPosition.distance(this->center_));
+        return (itemPosition.distance(this->getPosition()));
     }
     
@@ -172,31 +179,11 @@
         if(item != NULL)
         {
-            return item->getPlayer()->isHumanPlayer();
-        } else {
-            return false;
+            if(item->getPlayer())
+            {
+                return item->getPlayer()->isHumanPlayer();
+            }
         }
+        return false;
     }
     
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
 }
Index: code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h
===================================================================
--- code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h	(revision 8167)
+++ code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h	(revision 8201)
@@ -26,15 +26,17 @@
  *
  */
+ 
+ /* TODO: - Markiere SpaceBoundaries-Position mit einem schoenen Objekt 
+          - Kugel-Model mal hinzufuegen, das nur sichtbar ist, wenn man genuegend nah an maxDistance dran ist
+          - Reflexion an obiger Kugel beim Versuch durchzudringen
+ */
 
 #ifndef _SpaceBoundaries_H__
 #define _SpaceBoundaries_H__
 
-/* Folgender Block ist Copy-Paste und somit teilweise wohl unnoetig */
-#include "OrxonoxPrereqs.h"
-#include "core/SubclassIdentifier.h"
-
 /* Einige, spezifische include-Statements */
 #include "core/CoreIncludes.h"
 #include "tools/interfaces/Tickable.h"
+#include "interfaces/RadarViewable.h"
 #include "worldentities/StaticEntity.h"
 #include "worldentities/WorldEntity.h"
@@ -44,4 +46,10 @@
 #include <string>
 
+/**
+@brief SpaceBoundaries gives level creators the possibility to bar Pawns from leaving a defined area.
+
+       Four attributes can/should be defined in the XML-File:
+       'position', 'warnDistance', 'maxDistance', 'healthDecrease'.
+*/
 
 namespace orxonox
@@ -53,7 +61,4 @@
             ~SpaceBoundaries();
             
-            void setCenter(Vector3 r);
-            Vector3 getCenter();
-            
             void setMaxDistance(float r);
             float getMaxDistance();
@@ -61,4 +66,7 @@
             void setWarnDistance(float r);
             float getWarnDistance();
+            
+            void setHealthDecrease(float amount);
+            float getHealthDecrease();
 
             void XMLPort(Element& xmlelement, XMLPort::Mode mode);
@@ -67,11 +75,16 @@
 
         private:
-            Vector3 center_;
-            float maxDistance_;
-            float warnDistance_;
+            float maxDistance_; //!< maximal zulaessige Entfernung von 'this->getPosition()'.
+            float warnDistance_; //!< Entfernung von 'this->getPosition()', ab der eine Warnung angezeigt wird, dass man bald das zulaessige Areal verlaesst.
+            
+            float healthDecrease_; //!< Mass fuer die Anzahl Health-Points, die nach ueberschreiten der Entfernung 'maxDistance_' von 'this->getPosition()' abgezogen werden.
+                                   //!< Empfohlene Werte: 0.1 (langsame Health-Verminderung) bis 5 (sehr schnelle Health-Verminderung)
+            
+            RadarViewable* centerRadar_; //!< Repraesentation von 'this->getPosition()' auf dem Radar.
         
-            float computeDistance(WorldEntity *item); //!< Auf den Mittelpunkt 'center' bezogen.
+            float computeDistance(WorldEntity *item); //!< Auf den Mittelpunkt 'this->getPosition()' bezogen.
             void displayWarning(const std::string warnText);
             bool isHumanPlayer(Pawn *item);
+            
  //           ColoredTextAreaOverlayElementFactory* pColoredTextAreaOverlayElementFactory;
     };
