Index: /code/branches/AI_HS15/src/orxonox/controllers/LeaderController.cc
===================================================================
--- /code/branches/AI_HS15/src/orxonox/controllers/LeaderController.cc	(revision 10681)
+++ /code/branches/AI_HS15/src/orxonox/controllers/LeaderController.cc	(revision 10682)
@@ -51,9 +51,51 @@
         
     }
+    /*
+    Wingmen and Leaders attack target_, which is a member variable of their classes.
+    Wingmen's target_ is set to sectionTarget_, which is a member variable of SectionController class, unless
+    Wingman covers Leader's rear.
+    Leader's target_ must always equal sectionTarget_.
+    if section has a target, its Leader shoots at it, but doesn't follow.
+    Every section is a part of division. Division consisting of one Section is still a division.
+    Division's leader's target_ must always equal divisionTarget_, which is a member variable of DivisionController.
+    Division leader ONLY can follow target_ while in formation flight.
+    If Division doesn't have a target, Division Leader stays in place, unless it has a waypoint.
+    Division Leader's sectionTarget_ must equal divisionTarget_,
+    but the other section, that is not a leading section, can attack any target that is near divisonTarget_
 
+    */
     void LeaderController::tick(float dt)
     {
+        if (!this->isActive())
+            return;
+        
+        //--------------------------Stay in division--------------------------
+        this->keepDivisionTick();
+        /*keepDivisionTick(){
+            if (this->divisionLeader_ && this->divisionLeader_->getControllableEntity() && desiredRelativePosition_){
+                Vector3 desiredAbsolutePosition = ((this->divisionLeader_->getControllableEntity()->getWorldPosition()) + 
+                    (this->divisionLeader_->getControllableEntity()->getWorldOrientation()* (*desiredRelativePosition_)));
+                this->moveToPosition (desiredAbsolutePosition);
+            }
+        }
+        */
+        //If ordered to attack -> follow target and shoot
+        if (this->bAttackOrder_)
+        {
 
-      
+        } 
+        //If ordered to move -> move to a target Point
+        else if (this->bMoveOrder_)
+        {
+
+        } 
+        else
+        //No orders -> Don't move, but shoot at whatever is close, unless Boss is shooting at it. 
+        //(Section shoots same target, Boss's section shoots another target) 
+        {
+
+        }
+
+
         SUPER(LeaderController, tick, dt);
     }
Index: /code/branches/AI_HS15/src/orxonox/controllers/LeaderController.h
===================================================================
--- /code/branches/AI_HS15/src/orxonox/controllers/LeaderController.h	(revision 10681)
+++ /code/branches/AI_HS15/src/orxonox/controllers/LeaderController.h	(revision 10682)
@@ -46,12 +46,10 @@
         protected:
            
-            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.
-
-
-            
-                
             enum Mode {KEEPFORMATION, ROCKET, KILLENEMY};
             Mode mode_;
+
+            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.    
+            
 
             //WEAPONSYSTEM DATA
Index: /code/branches/AI_HS15/src/orxonox/controllers/WingmanController.cc
===================================================================
--- /code/branches/AI_HS15/src/orxonox/controllers/WingmanController.cc	(revision 10681)
+++ /code/branches/AI_HS15/src/orxonox/controllers/WingmanController.cc	(revision 10682)
@@ -55,11 +55,67 @@
     void WingmanController::action()
     {
-        
+        //--------------------------Cover Leader's rear--------------------------
+        //check for enemies in Leader's rear that can attack him and if they are visible, meaning there are no other Leader's between Leader and enemies.
+        //if there are enemies, set target_ to the nearest one and set bFollowLeader_ to false, 
+        //otherwise set bFollowLeader_ to true and target_ to sectionTarget_
+        this->coverAllyRear(this->sectionLeader_);
     }
 
     void WingmanController::tick(float dt)
     {
+        if (!this->isActive())
+            return;
+        //--------------------------Stay in formation--------------------------
+        if (bFollowLeader_)
+        {
+            this->keepSectionTick();
+            /*keepSectionTick(){
+                if (this->sectionLeader_ && this->sectionLeader_->getControllableEntity() && desiredRelativePosition_){
+                    Vector3 desiredAbsolutePosition = ((this->sectionLeader_->getControllableEntity()->getWorldPosition()) + 
+                        (this->sectionLeader_->getControllableEntity()->getWorldOrientation()* (*desiredRelativePosition_)));
+                    this->moveToPosition (desiredAbsolutePosition);
+                }
+            }
+            */
+            
+            //--------------------------Attack same target as the Leader--------------------------
+           
+            if (this->target_)
+            {
+                this->aimAtTarget();
+                this->doFire();
+            }
+        }
+        //--------------------------Protect Leader by killing target_--------------------------
 
-      
+        else
+        {
+            if (this->target_)
+            {
+                //--------------------------Don't attack if not visible--------------------------                
+                if (!this->target_->getRadarVisibility()) /* So AI won't shoot invisible Spaceships */
+                {
+                    this->forgetTarget();
+                    //this->bFollowLeader_ = true;
+                }
+                //--------------------------Otherwise destroy it--------------------------
+                else
+                {
+                    this->aimAtTarget();
+                    this->follow();  //If a bot is shooting a player, it shouldn't let him go away easily.
+                }
+                if (this->bHasTargetPosition_)
+                {
+                    this->moveToTargetPosition();
+                }
+                this->doFire();
+            }
+            //--------------------------no target? do nothing until next action() -> either new target appears or bFollowLeader_ set to true--------------------------
+            else
+            {
+
+            }            
+
+        }
         SUPER(WingmanController, tick, dt);
     }
