Index: /code/branches/AI_HS15/data/levels/AITest.oxw
===================================================================
--- /code/branches/AI_HS15/data/levels/AITest.oxw	(revision 10788)
+++ /code/branches/AI_HS15/data/levels/AITest.oxw	(revision 10789)
@@ -85,5 +85,5 @@
       </controller>
     </SpaceShip>
-    <SpaceShip position="<?1000 ?>,<?lua print(1500+i*1000) ?>, -1600 ?>" lookat="0,0,0">
+    <!-- <SpaceShip position="<?1000 ?>,<?lua print(1500+i*1000) ?>, -1600 ?>" lookat="0,0,0">
       <templates>
         <Template link=spaceshipassff />
@@ -111,5 +111,5 @@
         </SectionController>
       </controller>
-    </SpaceShip>
+    </SpaceShip> -->
     <?lua end ?>
    <!--  <SpaceShip position="4000, 1500, -1300 ?>" lookat="0,0,0">
Index: /code/branches/AI_HS15/src/orxonox/controllers/CommonController.cc
===================================================================
--- /code/branches/AI_HS15/src/orxonox/controllers/CommonController.cc	(revision 10788)
+++ /code/branches/AI_HS15/src/orxonox/controllers/CommonController.cc	(revision 10789)
@@ -45,6 +45,6 @@
 
     RegisterClass(CommonController);
-    float SPEED = 0.7f;
-    float ROTATEFACTOR = 0.3f;
+    float SPEED = 0.7f/0.02f;
+    float ROTATEFACTOR = 0.3f/0.02f;
 
     CommonController::CommonController(Context* context) : Controller(context)
@@ -52,7 +52,6 @@
         this->bSetupWorked = false;
 
-        this->targetMask_.exclude(ClassByString("BaseObject"));
-        this->targetMask_.include(ClassByString("WorldEntity"));
-        this->targetMask_.exclude(ClassByString("Projectile"));
+        this->executingManeuver_ = false;
+        this->executingMoveToPoint_ = false;
 
         RegisterObject(CommonController);
@@ -173,5 +172,5 @@
 
     //copy the Roll orientation of given Quaternion.
-    void CommonController::copyOrientation(const Quaternion& orient)
+    void CommonController::copyOrientation(const Quaternion& orient, float dt)
     {
         //roll angle difference in radian
@@ -179,22 +178,22 @@
         while(diff>math::twoPi) diff-=math::twoPi;
         while(diff<-math::twoPi) diff+=math::twoPi;
-        this->getControllableEntity()->rotateRoll(diff*ROTATEFACTOR);
-    }
-    void CommonController::copyTargetOrientation()
+        this->getControllableEntity()->rotateRoll(diff*ROTATEFACTOR * dt);
+    }
+    void CommonController::copyTargetOrientation(float dt)
     {
         if (bHasTargetOrientation_)
         {   
-            copyOrientation(targetOrientation_);
-        }
-    }
-
-
-
-
-    void CommonController::moveToTargetPosition()
-    {
-        this->moveToPosition(this->targetPosition_);
-    }
-    void CommonController::moveToPosition(const Vector3& target)
+            copyOrientation(targetOrientation_, dt);
+        }
+    }
+
+
+
+
+    void CommonController::moveToTargetPosition(float dt)
+    {
+        this->moveToPosition(this->targetPosition_, dt);
+    }
+    void CommonController::moveToPosition(const Vector3& target, float dt)
     {
         float factor = 1;
@@ -227,6 +226,6 @@
         {
             //Yaw and Pitch are enough to start facing the target
-            this->getControllableEntity()->rotateYaw(-2.0f * ROTATEFACTOR * rotateX);
-            this->getControllableEntity()->rotatePitch(2.0f * ROTATEFACTOR * rotateY);
+            this->getControllableEntity()->rotateYaw(-2.0f * ROTATEFACTOR * rotateX * dt);
+            this->getControllableEntity()->rotatePitch(2.0f * ROTATEFACTOR * rotateY * dt);
 
             //300 works, maybe less is better
@@ -239,9 +238,9 @@
                 if (bHasTargetOrientation_)
                 {
-                    copyTargetOrientation();
+                    copyTargetOrientation(dt);
                 }
             }
 
-            this->getControllableEntity()->moveFrontBack(1.2f*SPEED*factor);
+            this->getControllableEntity()->moveFrontBack(1.2f*SPEED*factor * dt);
         }
         else
@@ -253,17 +252,19 @@
     //to be called in action
     //PRE: relativeTargetPosition is desired position relative to the spaceship,
-    //angleRoll is the angle of Roll that should be applied by the end of the movement
-    //POST: targetPosition_ and angleRoll_ are set, so that it can be used by MoveAndRoll()
-    void MoveToPoint(const Vector3& relativeTargetPosition, float angleRoll)
+    //angleRoll is the angle in degrees of Roll that should be applied by the end of the movement
+    //POST: target orientation and position are set, so that it can be used by MoveAndRoll()
+    void CommonController::moveToPoint(const Vector3& relativeTargetPosition, float angleRoll)
     {
         ControllableEntity* entity = this->getControllableEntity();
         if (!entity)
-            return false;
+            return;
         Quaternion orient = entity->getWorldOrientation();
+        Quaternion rotation = Quaternion(Degree(angleRoll), Vector3::UNIT_Z);
 
         Vector3 target = orient * relativeTargetPosition + entity->getWorldPosition();
         setTargetPosition(target);
-        this->angleRoll_ = angleRoll;
-        this->angleRolled_ = 0;
+        orient = orient * rotation;
+        this->setTargetOrientation(orient);
+       
     }
     //to be called in tick
@@ -275,12 +276,19 @@
     //if position reached with a certain tolerance, and angleRolled_ = angleRoll_, returns false,
     //otherwise returns true
-    bool MoveAndRoll(float dt)
-    {
+    //dt is normally around 0.02f, which makes it 1/0.02 = 50 frames/sec
+    bool CommonController::moveAndRoll(float dt)
+    {
+        float factor = 1;
+        if (!this->getControllableEntity())
+            return false;
+        if (this->rank_ == Rank::DIVISIONLEADER)
+            factor = 0.8;
+        if (this->rank_ == Rank::SECTIONLEADER)
+            factor = 0.9;
         int tolerance = 60;
-        float rollDiff = angleRoll-angleRolled_;
-        float angleToRoll = 0;
+        
         ControllableEntity* entity = this->getControllableEntity();
         if (!entity)
-            return false;
+            return true;
         Vector2 coord = get2DViewCoordinates
             (entity->getPosition(), 
@@ -302,11 +310,12 @@
             this->getControllableEntity()->rotatePitch(2.0f * ROTATEFACTOR * rotateY * dt);
             
+            //Roll
+            if (bHasTargetOrientation_)
+            {
+                copyTargetOrientation(dt);
+            }
+          
             //Move
             this->getControllableEntity()->moveFrontBack(1.2f * SPEED * factor * dt);
-            
-            //Roll
-            angleToRoll = rollDiff * ROTATEFACTOR * dt;
-            this->getControllableEntity()->rotateRoll(angleToRoll);
-            angleRolled_ += angleToRoll;
             //if still moving, return false
             return false;
@@ -314,30 +323,18 @@
         else
         {     
-            if (rollDiff > 0)
-            {
-                //Roll
-                angleToRoll = rollDiff * ROTATEFACTOR * dt;
-                this->getControllableEntity()->rotateRoll(angleToRoll);
-                angleRolled_ += angleToRoll;                
-
-                //Move
-                this->getControllableEntity()->moveFrontBack(0.6f * SPEED * factor);
-                return false;
-            }
+            
             //if finished, return true;
-            retun true;
-        }
-    }
-
-    float squaredDistanceToTarget()
+            return true;
+        }
+    }
+
+    float CommonController::squaredDistanceToTarget() const
     {
         if ( !this->getControllableEntity() )
             return 0;
         if ( !this->target_ )
-            return ( this->getControllableEntity()->
-                getPosition().squaredDistance(this->targetPosition_) );
-        else
-            return ( this->getControllableEntity()->
-                getPosition().squaredDistance(this->target_->getPosition()) );
+            return ( this->getControllableEntity()->getPosition().squaredDistance(this->targetPosition_) );
+        else
+            return ( this->getControllableEntity()->getPosition().squaredDistance(this->target_->getPosition()) );
     }
     
Index: /code/branches/AI_HS15/src/orxonox/controllers/CommonController.h
===================================================================
--- /code/branches/AI_HS15/src/orxonox/controllers/CommonController.h	(revision 10788)
+++ /code/branches/AI_HS15/src/orxonox/controllers/CommonController.h	(revision 10789)
@@ -76,4 +76,5 @@
     }
 
+
     class _OrxonoxExport CommonController : public Controller
     {
@@ -121,11 +122,14 @@
         protected:
 
-            void moveToPosition(const Vector3& target);
-            void moveToTargetPosition();
+            void moveToPoint(const Vector3& relativeTargetPosition, float angleRoll);
+            bool moveAndRoll(float dt);
+
+            void moveToPosition(const Vector3& target, float dt);
+            void moveToTargetPosition(float dt);
             //enum Mode {ROCKET, ATTACK, MOVE, HOLD};//TODO; implement DEFENCE, MOVING modes
 
             //Mode mode_;
-            void copyOrientation(const Quaternion& orient);
-            void copyTargetOrientation();
+            void copyOrientation(const Quaternion& orient, float dt);
+            void copyTargetOrientation(float dt);
 
             float squaredDistanceToTarget() const;
@@ -160,6 +164,4 @@
             WeakPtr<ControllableEntity> objectiveTarget_;
 
-            float angleRolled_;
-            float angleRoll_;
 
 
@@ -169,6 +171,6 @@
             Maneuver::Value maneuver_;
 
-            ClassTreeMask               targetMask_;
-
+            bool executingManeuver_;
+            bool executingMoveToPoint_;
          
         private:
Index: /code/branches/AI_HS15/src/orxonox/controllers/DivisionController.cc
===================================================================
--- /code/branches/AI_HS15/src/orxonox/controllers/DivisionController.cc	(revision 10788)
+++ /code/branches/AI_HS15/src/orxonox/controllers/DivisionController.cc	(revision 10789)
@@ -63,8 +63,12 @@
             this->bShooting_ = true;
         }*/
-     
-        if (this->bHasTargetPosition_)
+        
+       /* if (this->bHasTargetPosition_)
         {
             this->moveToTargetPosition();
+        }*/
+        if (executingMoveToPoint_)
+        {
+            executingMoveToPoint_ = !this->moveAndRoll(dt);
         }
         if (this->bShooting_)
@@ -81,5 +85,10 @@
         setTargetPositionOfFollower();
         setTargetPositionOfWingman();
-
+        if (!executingMoveToPoint_)
+        {
+            Vector3* targetPosition = new Vector3 (0, 0, -2000);
+            moveToPoint(*targetPosition, 180);
+            executingMoveToPoint_ = true;
+        }
         
         if (this->myFollower_ && this->target_)
Index: /code/branches/AI_HS15/src/orxonox/controllers/FleetController.cc
===================================================================
--- /code/branches/AI_HS15/src/orxonox/controllers/FleetController.cc	(revision 10788)
+++ /code/branches/AI_HS15/src/orxonox/controllers/FleetController.cc	(revision 10789)
@@ -69,5 +69,5 @@
             (*it2)->setTargetPosition(this->getControllableEntity()->getWorldPosition());   
         }*/ 
-        for (ObjectList<Controller>::iterator it = ObjectList<Controller>::begin(); it; ++it)
+        /*for (ObjectList<Controller>::iterator it = ObjectList<Controller>::begin(); it; ++it)
         {
             if ((this->getControllableEntity()->getTeam() != (it)->getControllableEntity()->getTeam()) && (it)->getControllableEntity()->getTeam() == 0)
@@ -79,5 +79,5 @@
                 break;
             } 
-        }
+        }*/
 
     }
Index: /code/branches/AI_HS15/src/orxonox/controllers/SectionController.cc
===================================================================
--- /code/branches/AI_HS15/src/orxonox/controllers/SectionController.cc	(revision 10788)
+++ /code/branches/AI_HS15/src/orxonox/controllers/SectionController.cc	(revision 10789)
@@ -61,5 +61,5 @@
         if (this->bHasTargetPosition_)
         {
-            this->moveToTargetPosition();
+            this->moveToTargetPosition(dt);
         }
         if (this->bShooting_)
Index: /code/branches/AI_HS15/src/orxonox/controllers/WingmanController.cc
===================================================================
--- /code/branches/AI_HS15/src/orxonox/controllers/WingmanController.cc	(revision 10788)
+++ /code/branches/AI_HS15/src/orxonox/controllers/WingmanController.cc	(revision 10789)
@@ -125,5 +125,5 @@
         if (this->bHasTargetPosition_)
         {
-            this->moveToTargetPosition();
+            this->moveToTargetPosition(dt);
         } 
         
