Index: code/branches/AI_HS15/src/orxonox/controllers/CommonController.cc
===================================================================
--- code/branches/AI_HS15/src/orxonox/controllers/CommonController.cc	(revision 10789)
+++ code/branches/AI_HS15/src/orxonox/controllers/CommonController.cc	(revision 10793)
@@ -55,4 +55,5 @@
         this->executingMoveToPoint_ = false;
 
+        this->maneuverType_ = ManeuverType::NONE;
         RegisterObject(CommonController);
     }
@@ -116,5 +117,94 @@
         }
     }
-
+    void CommonController::chooseManeuverType()
+    {
+
+        if (this->target_ && this->bHasPositionOfTarget_ && this->getControllableEntity())
+        {
+            Vector3 diffVector = this->positionOfTarget_ - this->getControllableEntity()->getWorldPosition();
+            Vector3 myForwardVector = this->getControllableEntity()->getOrientation() * WorldEntity::FRONT;
+            float myDotProduct = diffVector.dotProduct(myForwardVector);
+
+            Vector3 opponentForwardVector = this->target_->getOrientation() * WorldEntity::FRONT;
+            float opponentDotProduct = diffVector.dotProduct(opponentForwardVector);            
+
+
+            switch ((myDotProduct > 0) - (myDotProduct < 0))
+            {
+                case 1:
+                {
+                    switch ((opponentDotProduct > 0) - (opponentDotProduct < 0))
+                    {
+                        case 1:
+                        {
+                            this->maneuverType_ = ManeuverType::OFFENSIVE;
+                            break;
+                        }
+                        case 0:
+                        {
+                            this->maneuverType_ = ManeuverType::OFFENSIVE;
+                            break;
+                        }
+                        case -1:
+                        {
+                            this->maneuverType_ = ManeuverType::NEUTRAL;
+                            break;
+                        }
+                    }
+                    break;
+                }
+                case 0:
+                {
+                    switch ((opponentDotProduct > 0) - (opponentDotProduct < 0))
+                    {
+                        case 1:
+                        {
+                            this->maneuverType_ = ManeuverType::OFFENSIVE;
+                            break;
+                        }
+                        case 0:
+                        {
+                            this->maneuverType_ = ManeuverType::NEUTRAL;
+                            break;
+                        }
+                        case -1:
+                        {
+                            this->maneuverType_ = ManeuverType::DEFENCIVE;
+                            break;
+                        }
+                    }
+
+                    break;
+                }
+                case -1:
+                {
+                    switch ((opponentDotProduct > 0) - (opponentDotProduct < 0))
+                    {
+                        case 1:
+                        {
+                            this->maneuverType_ = ManeuverType::NEUTRAL;
+                            break;
+                        }
+                        case 0:
+                        {
+                            this->maneuverType_ = ManeuverType::DEFENCIVE;
+                            break;
+                        }
+                        case -1:
+                        {
+                            this->maneuverType_ = ManeuverType::DEFENCIVE;
+                            break;
+                        }
+                    }
+                    break;
+                }
+            }
+        }
+        if (this->getControllableEntity() && !this->target_)
+        {
+            this->maneuverType_ = ManeuverType::NONE;
+        }
+        orxout (internal_error) << "ManeuverType = " << this->maneuverType_ << endl;
+    }
     bool CommonController::setWingman (CommonController* wingman)
     {
@@ -130,9 +220,27 @@
         this->target_ = target;
         orxout (internal_error) << " TARGET SET " << endl;
-        if (target)
-            this->targetPosition_ = target->getPosition();
-    }
-
-
+        
+        if (this->target_ )
+        {
+            this->setPositionOfTarget(target_->getWorldPosition());
+
+        }
+    }
+    bool CommonController::hasTarget()
+    {
+        if (this->target_)
+            return true;
+        return false;
+    }
+    void CommonController::setPositionOfTarget(const Vector3& target)
+    {
+        this->positionOfTarget_ = target;
+        this->bHasPositionOfTarget_ = true;
+    }
+    void CommonController::setOrientationOfTarget(const Quaternion& orient)
+    {
+        this->orientationOfTarget_=orient;
+        this->bHasOrientationOfTarget_=true;
+    }
 
     void CommonController::setTargetPosition(const Vector3& target)
@@ -370,6 +478,8 @@
 
         Pawn* pawn = orxonox_cast<Pawn*>(this->getControllableEntity());
+
         if (pawn)
-            pawn->setAimPosition(this->getControllableEntity()->getWorldPosition() + 4000*(this->getControllableEntity()->getOrientation() * WorldEntity::FRONT));
+            //pawn->setAimPosition(this->getControllableEntity()->getWorldPosition() + 4000*(this->getControllableEntity()->getOrientation() * WorldEntity::FRONT));
+            pawn->setAimPosition(this->targetPosition_);
     
         this->getControllableEntity()->fire(0);
Index: code/branches/AI_HS15/src/orxonox/controllers/CommonController.h
===================================================================
--- code/branches/AI_HS15/src/orxonox/controllers/CommonController.h	(revision 10789)
+++ code/branches/AI_HS15/src/orxonox/controllers/CommonController.h	(revision 10793)
@@ -111,5 +111,5 @@
 
             void setTarget(ControllableEntity* target);
-            
+            bool hasTarget();
             void setTargetOrientation(const Quaternion& orient);
             void setTargetOrientation(ControllableEntity* target);
@@ -153,5 +153,6 @@
             Quaternion targetOrientation_;
 
-
+            void setPositionOfTarget(const Vector3& target);
+            void setOrientationOfTarget(const Quaternion& orient);
             bool bHasPositionOfTarget_;
             Vector3 positionOfTarget_;
@@ -165,4 +166,5 @@
 
 
+            void chooseManeuverType();
 
             FormationMode::Value formationMode_;
Index: code/branches/AI_HS15/src/orxonox/controllers/DivisionController.cc
===================================================================
--- code/branches/AI_HS15/src/orxonox/controllers/DivisionController.cc	(revision 10789)
+++ code/branches/AI_HS15/src/orxonox/controllers/DivisionController.cc	(revision 10793)
@@ -57,4 +57,9 @@
     void DivisionController::tick(float dt)
     {
+        if (this->target_ )
+        {
+            this->setPositionOfTarget(target_->getWorldPosition());
+
+        }
         /*if (this->target_)
         {
@@ -82,7 +87,40 @@
         Vector3* pos = new Vector3(4000,1000,2000);
         this->setTargetPosition(*pos);*/
-
-        setTargetPositionOfFollower();
-        setTargetPositionOfWingman();
+       
+/*        if (!this->target_)
+        {
+
+            for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
+            {
+                if (this->getControllableEntity()->getTeam() == static_cast<ControllableEntity*>(*it)->getTeam())
+                    continue;
+
+               
+
+                if (static_cast<ControllableEntity*>(*it) != this->getControllableEntity())
+                {
+                    this->setTarget(*it);
+                }
+            }
+        }*/
+        this->chooseManeuverType();
+        switch (this->maneuverType_)
+        {
+            case ManeuverType::NONE:
+            {
+                setTargetPositionOfFollower();
+                setTargetPositionOfWingman();
+                break;
+            }
+            case ManeuverType::DEFENSIVE:
+            {
+                this->gunsD();
+            }
+            case ManeuverType::OFFENSIVE:
+            {
+                this->attack();
+            }
+        }
+       
         if (!executingMoveToPoint_)
         {
Index: code/branches/AI_HS15/src/orxonox/controllers/FleetController.cc
===================================================================
--- code/branches/AI_HS15/src/orxonox/controllers/FleetController.cc	(revision 10789)
+++ code/branches/AI_HS15/src/orxonox/controllers/FleetController.cc	(revision 10793)
@@ -80,4 +80,19 @@
             } 
         }*/
+        for (ObjectList<Pawn>::iterator itP = ObjectList<Pawn>::begin(); itP; ++itP)
+        {
+            if (this->getControllableEntity()->getTeam() == static_cast<ControllableEntity*>(*itP)->getTeam())
+                continue;           
+
+            for(std::vector<WeakPtr<DivisionController> >::iterator it = divisions_.begin(); it != divisions_.end(); ++it) 
+            {
+                if (static_cast<ControllableEntity*>(*itP) != (*it)->getControllableEntity() && !(*it)->hasTarget())
+                {
+                    (*it)->setTarget(*itP);
+                }
+                
+            }   
+           
+        }
 
     }
