Index: code/branches/ai/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/branches/ai/src/orxonox/controllers/ArtificialController.cc	(revision 6978)
+++ code/branches/ai/src/orxonox/controllers/ArtificialController.cc	(revision 6986)
@@ -47,7 +47,8 @@
     SetConsoleCommand(ArtificialController, masteraction, true);
     SetConsoleCommand(ArtificialController, followme, true);
-    SetConsoleCommand(ArtificialController, passivbehaviour, true);
-
-    static const unsigned int MAX_FORMATION_SIZE = 7;
+    SetConsoleCommand(ArtificialController, passivebehaviour, true);
+    SetConsoleCommand(ArtificialController, formationsize, true);
+
+    static const unsigned int STANDARD_MAX_FORMATION_SIZE = 7;
     static const int FORMATION_LENGTH =  10;
     static const int FORMATION_WIDTH =  110;
@@ -57,5 +58,5 @@
     static const float SPEED_FREE = 0.8f;
     static const float ROTATEFACTOR_FREE = 0.8f;
-    static const int SECONDS_TO_FOLLOW_HUMAN = 10;
+    static const int SECONDS_TO_FOLLOW_HUMAN = 100;
 
     ArtificialController::ArtificialController(BaseObject* creator) : Controller(creator)
@@ -66,4 +67,5 @@
         this->formationFlight_ = true;
         this->passive_ = false;
+        this->maxFormationSize_ = STANDARD_MAX_FORMATION_SIZE;
         this->myMaster_ = 0;
         this->freedomCount_ = 0;
@@ -105,5 +107,5 @@
                 continue;
 
-            ArtificialController *aiController = static_cast<ArtificialController*>(it->getController());
+            ArtificialController *aiController = orxonox_cast<ArtificialController*>(it->getController());
 
             if(aiController)
@@ -115,5 +117,5 @@
 
     /**
-        @brief Get all masters to do a specific action 
+        @brief Get all masters to do a "specific master action" 
         @param action which action to perform (integer, so it can be called with a console command (tmp solution))
     */
@@ -125,15 +127,18 @@
                 continue;
 
-            ArtificialController *aiController = static_cast<ArtificialController*>(it->getController());
+            ArtificialController *aiController = orxonox_cast<ArtificialController*>(it->getController());
 
             if(aiController || aiController->state_ == MASTER)
             {
-                aiController->specificMasterAction_ = TURN180;
-            }
-        }
-    }
-
-    /**
-        @brief A human player gets followed by its nearest master. Initiated by console command, only for demonstration puproses. Does not work at the moment.
+                if (action == 1)
+                    aiController->specificMasterAction_ = TURN180;
+                if (action == 2)
+                    aiController->specificMasterAction_ = SPIN;
+            }
+        }
+    }
+
+    /**
+        @brief A human player gets followed by its nearest master. Initiated by console command, intended for demonstration puproses. Does not work at the moment.
     */
     void ArtificialController::followme()
@@ -149,9 +154,9 @@
                 continue;
 
-            currentHumanController = static_cast<NewHumanController*>(it->getController());
+            currentHumanController = orxonox_cast<NewHumanController*>(it->getController());
 
             if(currentHumanController) humanPawn = *it;
 
-            ArtificialController *aiController = static_cast<ArtificialController*>(it->getController());
+            ArtificialController *aiController = orxonox_cast<ArtificialController*>(it->getController());
 
             if(aiController || aiController->state_ == MASTER)
@@ -159,10 +164,10 @@
 
         }
-        /*if((humanPawn != NULL) && (allMasters.size != 0))
-        {
-
+
+        if((humanPawn != NULL) && (allMasters.size() != 0))
+        {
                 float posHuman = humanPawn->getPosition().length();
                 float distance = 0.0f;
-                float minDistance = posHuman - allMasters.back()->getControllableEntity()->getPosition().length();
+                float minDistance = FLT_MAX;
                 int index = 0;
                 int i = 0;
@@ -173,17 +178,49 @@
                         if(distance < minDistance) index = i;
                     }
-                allMasters[index].humanToFollow_ = humanPawn;
-                allMasters[index].followHuman(humanPawn, false);
-            }*/
-
-    }
-
-    /**
-        @brief Sets shootingbehaviour of pawns.
-        @param passive if true, pawns won't shoot.
+                allMasters[index]->humanToFollow_ = humanPawn;
+                allMasters[index]->followHuman(humanPawn, false);
+            }
+
+    }
+
+    /**
+        @brief Sets shooting behaviour of pawns.
+        @param passive if true, bots won't shoot.
     */
     void ArtificialController::passivebehaviour(bool passive)
     {
-        this->passive_ = passive;
+        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
+        {
+            if (!it->getController())
+                continue;
+
+            ArtificialController *aiController = orxonox_cast<ArtificialController*>(it->getController());
+
+            if(aiController)
+            {
+                aiController->passive_ = passive;
+            }
+        }
+    }
+
+
+    /**
+        @brief Sets maximal formation size
+        @param size maximal formation size.
+    */
+    void ArtificialController::formationsize(int size)
+    {
+        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
+        {
+            if (!it->getController())
+                continue;
+
+            ArtificialController *aiController = orxonox_cast<ArtificialController*>(it->getController());
+
+            if(aiController)
+            {
+                aiController->maxFormationSize_ = size;
+            }
+        }
     }
 
@@ -317,10 +354,10 @@
 
             //is pawn oneself?
-            if (static_cast<ControllableEntity*>(*it) == this->getControllableEntity())
+            if (orxonox_cast<ControllableEntity*>(*it) == this->getControllableEntity())
                 continue;
 
             teamSize++;
 
-            ArtificialController *newMaster = static_cast<ArtificialController*>(it->getController());
+            ArtificialController *newMaster = orxonox_cast<ArtificialController*>(it->getController());
 
             //is it a master?
@@ -333,5 +370,5 @@
             if (distance < 5000)
             {
-                if(newMaster->slaves_.size() > MAX_FORMATION_SIZE) continue;
+                if(newMaster->slaves_.size() > this->maxFormationSize_) continue;
 
                 for(std::vector<ArtificialController*>::iterator itSlave = this->slaves_.begin(); itSlave != this->slaves_.end(); itSlave++)
@@ -451,5 +488,5 @@
             (*it)->targetPosition_ = this->targetPosition_;
             (*it)->bShooting_ = true;
-            (*it)->getControllableEntity()->fire(0);// fire once for fun
+//             (*it)->getControllableEntity()->fire(0);// fire once for fun
         }
     }
@@ -512,5 +549,5 @@
 
     /**
-        @brief Master spins around looking directions axis. Is a "specific master action".
+        @brief Master spins around its looking direction axis. Is a "specific master action". Not yet implemented.
     */
     void ArtificialController::spin()
@@ -524,5 +561,5 @@
         @brief Master begins to follow a human player. Is a "specific master action".
         @param humanController human to follow.
-        @param alaways follows human forever if true - yet only inplemented for false.
+        @param alaways follows human forever if true - only inplemented for false yet.
     */
     void ArtificialController::followHuman(Pawn* human, bool always)
@@ -607,5 +644,5 @@
         this->bHasTargetPosition_ = (this->targetPosition_ != Vector3::ZERO);
 
-        Pawn* pawn = dynamic_cast<Pawn*>(this->getControllableEntity());
+        Pawn* pawn = orxonox_cast<Pawn*>(this->getControllableEntity());
         if (pawn)
             pawn->setAimPosition(this->targetPosition_);
Index: code/branches/ai/src/orxonox/controllers/ArtificialController.h
===================================================================
--- code/branches/ai/src/orxonox/controllers/ArtificialController.h	(revision 6978)
+++ code/branches/ai/src/orxonox/controllers/ArtificialController.h	(revision 6986)
@@ -63,4 +63,6 @@
             static void masteraction(int action);
             static void followme();
+            static void passivebehaviour(bool passive);
+            static void formationsize(int size);
 
         protected:
@@ -68,4 +70,6 @@
             int team_;
             bool formationFlight_;
+            bool passive_;
+            int maxFormationSize_;
             int freedomCount_;
             enum State {SLAVE, MASTER, FREE};
Index: code/branches/ai/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/branches/ai/src/orxonox/controllers/NewHumanController.cc	(revision 6978)
+++ code/branches/ai/src/orxonox/controllers/NewHumanController.cc	(revision 6986)
@@ -298,5 +298,5 @@
             //y is down positive
             relativeHit.normalise();
-
+COUT(0) << (int)this->showDamageOverlay_ << " / " << this->damageOverlayLeft_ << " / " << this->damageOverlayRight_ << std::endl;
             float threshold = 0.3f;
             if (relativeHit.x > threshold) // Left
