Index: code/branches/presentation2011/src/orxonox/controllers/AIController.cc
===================================================================
--- code/branches/presentation2011/src/orxonox/controllers/AIController.cc	(revision 8974)
+++ code/branches/presentation2011/src/orxonox/controllers/AIController.cc	(revision 8980)
@@ -74,57 +74,5 @@
             }
 
-            // search enemy
-            random = rnd(maxrand);
-            if (random < (15 + botlevel_* 20) && (!this->target_))
-                this->searchNewTarget();
-
-            // forget enemy
-            random = rnd(maxrand);
-            if (random < ((1-botlevel_)*6) && (this->target_))
-                this->forgetTarget();
-
-            // next enemy
-            random = rnd(maxrand);
-            if (random < (botlevel_*20) && (this->target_))
-                this->searchNewTarget();
-
-            // fly somewhere
-            random = rnd(maxrand);
-            if (random < 50 && (!this->bHasTargetPosition_ && !this->target_))
-                this->searchRandomTargetPosition();
-
-            // stop flying
-            random = rnd(maxrand);
-            if (random < 10 && (this->bHasTargetPosition_ && !this->target_))
-                this->bHasTargetPosition_ = false;
-
-            // fly somewhere else
-            random = rnd(maxrand);
-            if (random < 30 && (this->bHasTargetPosition_ && !this->target_))
-                this->searchRandomTargetPosition();
-
-            // shoot
-            random = rnd(maxrand);
-            if (!(this->passive_) && random < (75 + botlevel_*25) && (this->target_ && !this->bShooting_))
-                this->bShooting_ = true;
-
-            // stop shooting
-            random = rnd(maxrand);
-            if (random < ((1 - botlevel_)*25) && (this->bShooting_))
-                this->bShooting_ = false;
-
-            // boost
-            random = rnd(maxrand);
-            if (random < botlevel_*100 )
-                this->boostControl();
-
-            // update Checkpoints
-            /*random = rnd(maxrand);
-            if (this->defaultWaypoint_ && random > (maxrand-10))
-                this->manageWaypoints();
-            else //if(random > maxrand-10) //CHECK USABILITY!!*/
-            if (this->waypoints_.size() == 0 )
-                this->manageWaypoints();
-
+            this->defaultBehaviour(maxrand);
         }
 
@@ -136,6 +84,4 @@
         if (this->state_ == MASTER)
         {
-
-
             this->commandSlaves();
 
@@ -170,58 +116,7 @@
                     this->searchNewMaster();
 
-                // search enemy
-                random = rnd(maxrand);
-                if (random < (botlevel_)*25 && (!this->target_))
-                    this->searchNewTarget();
-
-                // forget enemy
-                random = rnd(maxrand);
-                if (random < (1-botlevel_)*6 && (this->target_))
-                    this->forgetTarget();
-
-                // next enemy
-                random = rnd(maxrand);
-                if (random < 10 && (this->target_))
-                    this->searchNewTarget();
-
-                // fly somewhere
-                random = rnd(maxrand);
-                if (random < 50 && (!this->bHasTargetPosition_ && !this->target_))
-                    this->searchRandomTargetPosition();
-
-
-                // fly somewhere else
-                random = rnd(maxrand);
-                if (random < 30 && (this->bHasTargetPosition_ && !this->target_))
-                    this->searchRandomTargetPosition();
-
-                // shoot
-                random = rnd(maxrand);
-                if (!(this->passive_) && random < 25*(botlevel_)+1 && (this->target_ && !this->bShooting_))
-                {
-                    this->bShooting_ = true;
-                    this->forceFreeSlaves();
-                }
-
-                // stop shooting
-                random = rnd(maxrand);
-                if (random < ( (1- botlevel_)*25 ) && (this->bShooting_))
-                    this->bShooting_ = false;
-
-                // boost
-                random = rnd(maxrand);
-                if (random < botlevel_*100 )
-                    this->boostControl();
-
-                // update Checkpoints
-                /*random = rnd(maxrand);
-                if (this->defaultWaypoint_ && random > (maxrand-10))
-                    this->manageWaypoints();
-                else //if(random > maxrand-10) //CHECK USABILITY!!*/
-                if (this->waypoints_.size() == 0 )
-                    this->manageWaypoints();
+                this->defaultBehaviour(maxrand);
             }
         }
-
     }
 
@@ -321,6 +216,7 @@
         {   //Vector-implementation: mode_.back() == ROCKET;
             if(controllable)
-            {
-                if(controllable->getRocket())//Check wether the bot is controlling the rocket and if the timeout is over.
+            {//Check wether the bot is controlling the rocket and if the timeout is over.
+                if(controllable->getIdentifier() == ClassByString("Rocket"))
+
                 {
                     this->follow();
@@ -342,3 +238,71 @@
     }
 
+    void AIController::defaultBehaviour(float maxrand)
+    {       float random;
+            // search enemy
+            random = rnd(maxrand);
+            if (random < (botlevel_* 100) && (!this->target_))
+                this->searchNewTarget();
+
+            // forget enemy
+            random = rnd(maxrand);
+            if (random < ((1-botlevel_)*20) && (this->target_))
+                this->forgetTarget();
+
+            // next enemy
+            random = rnd(maxrand);
+            if (random < (botlevel_*30) && (this->target_))
+                this->searchNewTarget();
+
+            // fly somewhere
+            random = rnd(maxrand);
+            if (random < 50 && (!this->bHasTargetPosition_ && !this->target_))
+                this->searchRandomTargetPosition();
+
+            // stop flying
+            random = rnd(maxrand);
+            if (random < 10 && (this->bHasTargetPosition_ && !this->target_))
+                this->bHasTargetPosition_ = false;
+
+            // fly somewhere else
+            random = rnd(maxrand);
+            if (random < 30 && (this->bHasTargetPosition_ && !this->target_))
+                this->searchRandomTargetPosition();
+
+            if (this->state_ == MASTER) // master: shoot
+            {
+                random = rnd(maxrand);
+                if (!(this->passive_) && random < (100*botlevel_) && (this->target_ && !this->bShooting_))
+                {
+                    this->bShooting_ = true;
+                    this->forceFreeSlaves();
+                }
+            }
+            else
+            {
+                // shoot
+                random = rnd(maxrand);
+                if (!(this->passive_) && random < (botlevel_*100) && (this->target_ && !this->bShooting_))
+                    this->bShooting_ = true;
+            }
+
+            // stop shooting
+            random = rnd(maxrand);
+            if (random < ((1 - botlevel_)*50) && (this->bShooting_))
+                this->bShooting_ = false;
+
+            // boost
+            random = rnd(maxrand);
+            if (random < botlevel_*50 )
+                this->boostControl();
+
+            // update Checkpoints
+            /*random = rnd(maxrand);
+            if (this->defaultWaypoint_ && random > (maxrand-10))
+                this->manageWaypoints();
+            else //if(random > maxrand-10) //CHECK USABILITY!!*/
+            if (this->waypoints_.size() == 0 )
+                this->manageWaypoints();
+    }
+
 }
Index: code/branches/presentation2011/src/orxonox/controllers/AIController.h
===================================================================
--- code/branches/presentation2011/src/orxonox/controllers/AIController.h	(revision 8974)
+++ code/branches/presentation2011/src/orxonox/controllers/AIController.h	(revision 8980)
@@ -44,13 +44,14 @@
             virtual ~AIController();
 
-            virtual void tick(float dt);
+            virtual void tick(float dt); //<! Carrying out the targets set in action().
 
         protected:
-            virtual void action();
+            virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour ~ setting targets.
+            void defaultBehaviour(float maxrand); //<! Helper function for code reusage. Some concrete commands for a bot.
 
         private:
             static const float ACTION_INTERVAL;
 
-            Timer actionTimer_;
+            Timer actionTimer_; //<! Regularly calls action(). 
     };
 }
Index: code/branches/presentation2011/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/branches/presentation2011/src/orxonox/controllers/ArtificialController.cc	(revision 8974)
+++ code/branches/presentation2011/src/orxonox/controllers/ArtificialController.cc	(revision 8980)
@@ -42,4 +42,5 @@
 #include "gametypes/TeamDeathmatch.h"
 #include "gametypes/Dynamicmatch.h"
+#include "gametypes/Mission.h"
 #include "controllers/WaypointPatrolController.h"
 #include "controllers/NewHumanController.h"
@@ -92,5 +93,5 @@
         this->target_.setCallback(createFunctor(&ArtificialController::targetDied, this));
         this->bSetupWorked = false;
-        this->botlevel_ = 0.2f;
+        this->botlevel_ = 0.5f;
         this->mode_ = DEFAULT;////Vector-implementation: mode_.push_back(DEFAULT);
         this->timeout_ = 0;
@@ -998,4 +999,14 @@
         }
 
+        Mission* miss = orxonox_cast<Mission*>(gametype);
+        if (miss)
+        {
+            if (entity1->getPlayer())
+                team1 = miss->getTeam(entity1->getPlayer());
+
+            if (entity2->getPlayer())
+                team2 = miss->getTeam(entity2->getPlayer());
+        }
+
         TeamBaseMatchBase* base = 0;
         base = orxonox_cast<TeamBaseMatchBase*>(entity1);
@@ -1110,5 +1121,5 @@
         {
             Pawn* pawn = orxonox_cast<Pawn*>(this->getControllableEntity());
-            if(pawn)
+            if(pawn && pawn->isA(Class(SpaceShip))) //fix for First Person Mode: check for SpaceShip
             {
                 this->weaponModes_.clear(); // reset previous weapon information
Index: code/branches/presentation2011/src/orxonox/controllers/ArtificialController.h
===================================================================
--- code/branches/presentation2011/src/orxonox/controllers/ArtificialController.h	(revision 8974)
+++ code/branches/presentation2011/src/orxonox/controllers/ArtificialController.h	(revision 8980)
@@ -51,5 +51,5 @@
             void abandonTarget(Pawn* target);
 
-            inline void setTeam(int team)
+            inline void setTeam(int team) //TODO: write through to controllable entity.
                 { this->team_ = team; }
             inline int getTeam() const
Index: code/branches/presentation2011/src/orxonox/controllers/HumanController.cc
===================================================================
--- code/branches/presentation2011/src/orxonox/controllers/HumanController.cc	(revision 8974)
+++ code/branches/presentation2011/src/orxonox/controllers/HumanController.cc	(revision 8980)
@@ -195,6 +195,6 @@
             this->boosting_ = true;
             this->boostingTimeout_.startTimer();
-            
-            this->controllableEntity_->boost(this->boosting_);
+            if(this->controllableEntity_)
+                this->controllableEntity_->boost(this->boosting_);
 //            orxout() << "Start boosting" << endl;
         }
@@ -209,6 +209,6 @@
         this->boosting_ = false;
         this->boostingTimeout_.stopTimer();
-
-        this->controllableEntity_->boost(this->boosting_);
+        if(this->controllableEntity_)
+            this->controllableEntity_->boost(this->boosting_);
 //        orxout() << "Stop boosting" << endl;
     }
Index: code/branches/presentation2011/src/orxonox/controllers/WaypointPatrolController.cc
===================================================================
--- code/branches/presentation2011/src/orxonox/controllers/WaypointPatrolController.cc	(revision 8974)
+++ code/branches/presentation2011/src/orxonox/controllers/WaypointPatrolController.cc	(revision 8980)
@@ -42,5 +42,4 @@
         RegisterObject(WaypointPatrolController);
 
-        //this->team_ = 0;
         this->alertnessradius_ = 500;
 
@@ -53,5 +52,4 @@
 
         XMLPortParam(WaypointPatrolController, "alertnessradius", setAlertnessRadius, getAlertnessRadius, xmlelement, mode).defaultValues(500.0f);
-//        XMLPortParam(WaypointPatrolController, "team", setTeam, getTeam, xmlelement, mode).defaultValues(0);
     }
 
Index: code/branches/presentation2011/src/orxonox/controllers/WaypointPatrolController.h
===================================================================
--- code/branches/presentation2011/src/orxonox/controllers/WaypointPatrolController.h	(revision 8974)
+++ code/branches/presentation2011/src/orxonox/controllers/WaypointPatrolController.h	(revision 8980)
@@ -46,9 +46,4 @@
             virtual void tick(float dt);
 
-           /* inline void setTeam(int team)
-                { this->team_ = team; }
-            inline int getTeam() const
-                { return this->team_; } */
-
             inline void setAlertnessRadius(float radius)
                 { this->alertnessradius_ = radius; }
@@ -59,5 +54,4 @@
             void searchEnemy();
 
-            //int team_;
             float alertnessradius_;
             Timer patrolTimer_;
