Index: code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.cc
===================================================================
--- code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.cc	(revision 8280)
+++ code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.cc	(revision 8281)
@@ -74,5 +74,21 @@
         }
         
+        this->pawnsIn_.clear();
+        
 //        delete pColoredTextAreaOverlayElementFactory;
+    }
+    
+    void SpaceBoundaries::checkWhoIsIn()
+    {
+        pawnsIn_.clear();
+        for(ObjectListIterator<Pawn> current = ObjectList<Pawn>::begin(); current != ObjectList<Pawn>::end(); ++current)
+        {
+            Pawn* currentPawn = *current;
+            float distance = this->computeDistance(currentPawn);
+            if(distance <= this->maxDistance_)
+            {
+                pawnsIn_.push_back(currentPawn);
+            }
+        }
     }
     
@@ -124,44 +140,45 @@
     void SpaceBoundaries::tick(float dt)
     {
-        for(ObjectListIterator<MobileEntity> item = ObjectList<MobileEntity>::begin(); item != ObjectList<MobileEntity>::end(); ++item)
-        {
-            MobileEntity* myMobileEntity = *item;
-            Pawn* currentPawn = dynamic_cast<Pawn*>(myMobileEntity);
-            if(currentPawn != NULL)
-            {
-                float distance = this->computeDistance(currentPawn);
-                bool humanItem = this->isHumanPlayer(currentPawn);
-                COUT(0) << "Distanz:" << distance << std::endl; //!< message for debugging
-                if(distance > this->warnDistance_ && distance < this->maxDistance_) // Zeige Warnung an!
+        
+        COUT(0) << "Groesse der Liste: " << (int) pawnsIn_.size() << std::endl;
+        
+        //for(ObjectListIterator<Pawn> current = ObjectList<Pawn>::begin(); current != ObjectList<Pawn>::end(); ++current)
+        for( std::list<Pawn*>::iterator current = pawnsIn_.begin(); current != pawnsIn_.end(); current++ )
+        {
+            Pawn* currentPawn = *current;
+            float distance = this->computeDistance(currentPawn);
+            bool humanItem = this->isHumanPlayer(currentPawn);
+            COUT(0) << "Distanz:" << distance << std::endl; //!< message for debugging
+            if(distance > this->warnDistance_ && distance < this->maxDistance_) // Zeige Warnung an!
+            {
+                COUT(0) << "You are leaving the area" << std::endl; //!< message for debugging
+                if(humanItem)
                 {
-                    COUT(0) << "You are leaving the area" << std::endl; //!< message for debugging
-                    if(humanItem)
-                    {
-                        COUT(0) << "humanItem ist true" << std::endl;
-                        this->displayWarning("Attention! You are leaving the area!");
-                    } else {
-                        
-                    }
+                    COUT(0) << "humanItem ist true" << std::endl;
+                    this->displayWarning("Attention! You are leaving the area!");
+                } else {
+                    
                 }
-                if( (this->maxDistance_ - distance) < this->showDistance_)
+            }
+            if( (this->maxDistance_ - distance) < this->showDistance_)
+            {
+                // Zeige Grenze an!
+                this->displayBoundaries(currentPawn);
+            }
+            if(distance > this->maxDistance_)
+            {
+                if(humanItem)
                 {
-                    // Zeige Grenze an!
-                    this->displayBoundaries(currentPawn);
+                    COUT(0) << "Health should be decreasing!" << std::endl;
+                    this->displayWarning("You are out of the area now!");
+                    currentPawn->removeHealth( (distance - maxDistance_) * this->healthDecrease_);
+                } else {
+                    
                 }
-                if(distance > this->maxDistance_)
-                {
-                    if(humanItem)
-                    {
-                        COUT(0) << "Health should be decreasing!" << std::endl;
-                        this->displayWarning("You are out of the area now!");
-                        currentPawn->removeHealth( (distance - maxDistance_) * this->healthDecrease_);
-                    } else {
-                        
-                    }
-                    
-                    this->bounceBack(currentPawn);
-                }
-            }
-        }
+                
+                this->bounceBack(currentPawn);
+            }
+        }
+        this->checkWhoIsIn();
     }
     
@@ -242,5 +259,5 @@
             
             item->lookAt( velocity + this->getPosition() );
-
+            
             item->setAcceleration(acceleration * dampingFactor);
             item->setVelocity(velocity * dampingFactor);
Index: code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h
===================================================================
--- code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h	(revision 8280)
+++ code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h	(revision 8281)
@@ -27,6 +27,17 @@
  */
  
- /* TODO: - Markiere SpaceBoundaries-Position mit einem schoenen Objekt
-          - Reflexion an Grenze mit Quaternionen machen (--> vgl. Funktion bounceBack() )
+ /* TODO:   - Mehrere SpaceBoundaries-Instanzen pro Level ermoeglichen
+            - Pro Pawn ein Billboard verwenden
+ */
+ 
+ 
+ /* REALISIERUNGSIDEEN:
+   
+    Mehrere Instanzen:
+        Im Konstruktor schauen, wer innerhalb der eigenen Grenzen ist und diese in eine Liste geben, die in jeder tick-Funktion
+        durchgearbeitet wird.
+        Moeglichkeit bereitstellen, ein Pawn durch ein Portal einer anderen Instanz von SpaceBoundaries zuzuweisen.
+        Schauen, wie es zu handhaben ist, wenn ein neuer Spieler oder Bot nachtraeglich ins Spiel kommt.
+ 
  */
 
@@ -44,4 +55,5 @@
 
 #include <string>
+#include <list>
 
 /**
@@ -66,4 +78,6 @@
             ~SpaceBoundaries();
             
+            void checkWhoIsIn();
+            
             void setMaxDistance(float r);
             float getMaxDistance();
@@ -83,4 +97,6 @@
 
         private:
+            std::list<Pawn*> pawnsIn_;
+        
             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.
