Index: code/branches/spaceboundaries2/src/orxonox/worldentities/SpaceBoundaries.cc
===================================================================
--- code/branches/spaceboundaries2/src/orxonox/worldentities/SpaceBoundaries.cc	(revision 8506)
+++ code/branches/spaceboundaries2/src/orxonox/worldentities/SpaceBoundaries.cc	(revision 8513)
@@ -84,4 +84,10 @@
                 float distance = this->computeDistance(currentPawn);
                 if(distance <= this->maxDistance_)
+                {
+                    pawnsIn_.push_back(currentPawn);
+                }
+            } else if (this->reaction_ == 2) {
+                float distance = this->computeDistance(currentPawn);
+                if(distance >= this->maxDistance_)
                 {
                     pawnsIn_.push_back(currentPawn);
@@ -122,5 +128,5 @@
         if(billy != NULL)
         {
-            billy->setMaterial("Shield");
+            billy->setMaterial("Grid");
             billy->setVisible(true);
         }
@@ -216,5 +222,5 @@
                     }
                 }
-                if( humanItem && (this->maxDistance_ - distance) < this->showDistance_ )
+                if(/* humanItem &&*/ abs(this->maxDistance_ - distance) < this->showDistance_ )
                 {
                     this->displayBoundaries(currentPawn); // Zeige Grenze an!
@@ -233,4 +239,8 @@
                     this->conditionalBounceBack(currentPawn, distance, dt);
                 }
+                if( this->reaction_ == 2 && (distance - 100 < this->maxDistance_) )
+                {
+                    this->conditionalBounceBack(currentPawn, distance, dt);
+                }
             }
         }
@@ -273,18 +283,27 @@
         /* Checke, ob das Pawn innerhalb des nächsten Ticks, das erlaubte Gebiet verlassen würde.
            Falls ja: Spicke es zurück. */
-        if( currentDistance + normalSpeed * dt > this->maxDistance_ - 20 ) // -20: "security measure"
-        {
-            float dampingFactor = 0.5;
-            velocity = velocity.reflect(normal);
-            Vector3 acceleration = item->getAcceleration();
-            acceleration = acceleration.reflect(normal);
-            
-            item->lookAt( velocity + this->getPosition() );
-            
-            item->setAcceleration(acceleration * dampingFactor);
-            item->setVelocity(velocity * dampingFactor);
-            
-            item->setPosition( item->getPosition() - normal * 10 );
-        }
+        if( this->reaction_ == 0 && currentDistance + normalSpeed * dt > this->maxDistance_ - 10 ) // -10: "security measure"
+        {
+            bounceBack(item, &normal, &velocity);
+        } else if (this->reaction_ == 2 && currentDistance - normalSpeed * dt < this->maxDistance_ + 10 ) // 10: "security measure"
+        {
+            normal = normal * (-1);
+            bounceBack(item, &normal, &velocity);
+        }
+    }
+    
+    void SpaceBoundaries::bounceBack(Pawn *item, Vector3 *normal, Vector3 *velocity)
+    {
+        float dampingFactor = 0.5;
+        *velocity = velocity->reflect(*normal);
+        Vector3 acceleration = item->getAcceleration();
+        acceleration = acceleration.reflect(*normal);
+        
+        item->lookAt( *velocity + this->getPosition() );
+        
+        item->setAcceleration(acceleration * dampingFactor);
+        item->setVelocity(*velocity * dampingFactor);
+        
+        item->setPosition( item->getPosition() - *normal * 10 ); // Setze das SpaceShip noch etwas von der Grenze weg.
     }
     
Index: code/branches/spaceboundaries2/src/orxonox/worldentities/SpaceBoundaries.h
===================================================================
--- code/branches/spaceboundaries2/src/orxonox/worldentities/SpaceBoundaries.h	(revision 8506)
+++ code/branches/spaceboundaries2/src/orxonox/worldentities/SpaceBoundaries.h	(revision 8513)
@@ -27,5 +27,7 @@
  */
  
- /* TODO:   - Textmessages und Billboards sollen teils nur bei einem humanPlayer angezeigt werden, nicht bei allen (vgl. Netzwerk-Spiel mit mehreren humanPlayers)
+ /* TODO:   - Bei Reaction_ == 2 ist die Reflexion noch nicht ganz so top!! Vielleicht auch so belassen, ist ja nicht unbedingt schlecht.
+ 
+            - Textmessages und Billboards sollen teils nur bei einem humanPlayer angezeigt werden, nicht bei allen (vgl. Netzwerk-Spiel mit mehreren humanPlayers)
                 beachte hierzu folgende statische Funktion: 'static unsigned int  Host::getPlayerID()'
                 (file:///home/kmaurus/orxonox/spaceBoundaries/build/doc/api/html/classorxonox_1_1_host.html#9c1e3b39e3b42e467dfbf42902911ce2)
@@ -67,4 +69,5 @@
                             0: Reflect the space ship (default).
                             1: Decrease Health of the space ship after having left the allowed area.
+                            2: Inverted Version of 0. Prohibit to fly INTO a defined area.
        - 'healthDecrease' : a measure to define how fast the health of a pawn should decrease after leaving the allowed area (unnecessary if 'reactionMode' == 0).
                             Recommended values: 0.1 (slow health decrease) to 5 (very fast health decrease)
@@ -88,10 +91,4 @@
             SpaceBoundaries(BaseObject* creator);
             ~SpaceBoundaries();
-            
-            void checkWhoIsIn(); //!< Update the list 'pawnsIn_'.
-            
-            void positionBillboard(const Vector3 position); //!< Display a Billboard at the position 'position'.
-            void setBillboardOptions(Billboard *billy);
-            void removeAllBillboards(); //!< Hide all elements of '*billboard_' and set their attribute 'usedYet' to 0.
             
             void setMaxDistance(float r);
@@ -117,9 +114,13 @@
             struct billboardAdministration{ bool usedYet; Billboard* billy; };
             
+            // Variabeln::
             std::list<WeakPtr<Pawn> > pawnsIn_; //!< List of the pawns that this instance of SpaceBoundaries has to handle.
             
             std::vector<billboardAdministration> billboards_;
         
-            int reaction_; //!< Werte: 0, 1. 0: Reflektion an Boundaries (Standard). 1: Health-Abzug-Modus.
+            int reaction_; //!< Werte: 0, 1, 2. 
+                           //!< 0: Reflektion an Boundaries (Standard).
+                           //!< 1: Health-Abzug-Modus.
+                           //!< 2: Invertierte Version von 0. Verbiete es, in ein Gebiet hinein zu fliegen.
             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.
@@ -129,11 +130,21 @@
                                    //!< Empfohlene Werte: 0.1 (langsame Health-Verminderung) bis 5 (sehr schnelle Health-Verminderung)
             
+            
             RadarViewable* centerRadar_; //!< Repraesentation von SpaceBoundaries auf dem Radar.
         
+        
+            // Funktionen::
             float computeDistance(WorldEntity *item); //!< Auf den Mittelpunkt 'this->getPosition()' bezogen.
             void displayWarning(const std::string warnText);
             void displayBoundaries(Pawn *item);
             void conditionalBounceBack(Pawn *item, float currentDistance, float dt);
+            void bounceBack(Pawn *item, Vector3 *normal, Vector3 *velocity);
             bool isHumanPlayer(Pawn *item);
+            
+            void checkWhoIsIn(); //!< Update the list 'pawnsIn_'.
+            
+            void positionBillboard(const Vector3 position); //!< Display a Billboard at the position 'position'.
+            void setBillboardOptions(Billboard *billy);
+            void removeAllBillboards(); //!< Hide all elements of '*billboard_' and set their attribute 'usedYet' to 0.
             
     };
