Index: code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt
===================================================================
--- code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt	(revision 7059)
+++ code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt	(revision 7060)
@@ -429,5 +429,5 @@
 
 <Template name=droneTemplate>
-    <Drone name="meineDrohne"  mass= "50" linearDamping = "0.7" angularDamping = "0.99999" maxDistanceToOwner_=150 minDistanceToOwner_=50 primaryThrust_=250 auxilaryThrust_=250 rotationThrust_=50>
+    <Drone name="meineDrohne"  mass= "50" linearDamping = "0.7" angularDamping = "0.99999" maxDistanceToOwner_=150 minDistanceToOwner_=75 maxShootingRange_=1000 primaryThrust_=250 auxilaryThrust_=250 rotationThrust_=50>
         <attached>
             <Model scale="1" mesh="drone.mesh"/>
Index: code/branches/presentation3/src/orxonox/controllers/DroneController.cc
===================================================================
--- code/branches/presentation3/src/orxonox/controllers/DroneController.cc	(revision 7059)
+++ code/branches/presentation3/src/orxonox/controllers/DroneController.cc	(revision 7060)
@@ -75,15 +75,16 @@
         float random;
         float maxrand = 100.0f / ACTION_INTERVAL;
+        float distanceToTargetSquared;
 
-        // const Vector3& ownerPosition = getOwner()->getWorldPosition();
-        // const Vector3& dronePosition = getDrone()->getWorldPosition();
-
-        // const Vector3& locOwnerDir = getDrone()->getOrientation().UnitInverse()*(ownerPosition-dronePosition); //Vector from Drone To Owner out of drones local coordinate system
-
+        if (target_) {
+        const Vector3& locTargetDir = getDrone()->getOrientation().UnitInverse()*((getDrone()->getWorldPosition())-(target_->getWorldPosition())); //Vector from Drone To target out of drones local coordinate system
+            distanceToTargetSquared = locTargetDir.squaredLength();
+        }
+         
         random = rnd(maxrand);
-        if ( random < 30 && (!this->target_))
+        if ( random < 30 || (!this->target_) || distanceToTargetSquared > (this->getDrone()->getMaxShootingRange()*this->getDrone()->getMaxShootingRange()))
             this->searchNewTarget();
 
-        if (random < 50 && this->target_)
+        if (random < 50 && this->target_ && distanceToTargetSquared < (this->getDrone()->getMaxShootingRange()*this->getDrone()->getMaxShootingRange()))
         {
             this->isShooting_ = true;
@@ -105,12 +106,11 @@
     void DroneController::tick(float dt)
     {
-        // Drone *myDrone = static_cast<Drone*>(this->getControllableEntity());
         float maxDistanceSquared = this->getDrone()->getMaxDistanceToOwner()*this->getDrone()->getMaxDistanceToOwner();
         float minDistanceSquared = this->getDrone()->getMinDistanceToOwner()*this->getDrone()->getMinDistanceToOwner();
         if ((this->getDrone()->getWorldPosition() - this->getOwner()->getWorldPosition()).squaredLength()  > maxDistanceSquared) { 
-            this->moveToPosition(this->getOwner()->getWorldPosition());
+            this->moveToPosition(this->getOwner()->getWorldPosition()); //fly towards owner
         }
         else if((this->getDrone()->getWorldPosition() - this->getOwner()->getWorldPosition()).squaredLength() < minDistanceSquared) {
-            this->moveToPosition(-this->getOwner()->getWorldPosition());
+            this->moveToPosition(-this->getOwner()->getWorldPosition()); //fly away from owner
         }
         else if(!isShooting_) {
@@ -131,4 +131,8 @@
     void DroneController::ownerDied()
     {
+//         if (this->target_) {            //Drone has some kind of Stockholm-Syndrom --> gets attached to Owners Killer
+//             this->setOwner(target_);
+//             this->searchNewTarget();
+//         }
         if (this->drone_)
             this->drone_->destroy();
Index: code/branches/presentation3/src/orxonox/worldentities/Drone.cc
===================================================================
--- code/branches/presentation3/src/orxonox/worldentities/Drone.cc	(revision 7059)
+++ code/branches/presentation3/src/orxonox/worldentities/Drone.cc	(revision 7060)
@@ -79,4 +79,5 @@
         XMLPortParam(Drone, "maxDistanceToOwner_", setMaxDistanceToOwner, getMaxDistanceToOwner, xmlelement, mode);
         XMLPortParam(Drone, "minDistanceToOwner_", setMinDistanceToOwner, getMinDistanceToOwner, xmlelement, mode);
+        XMLPortParam(Drone, "maxShootingRange_", setMaxShootingRange, getMaxShootingRange, xmlelement, mode);
     }
 
Index: code/branches/presentation3/src/orxonox/worldentities/Drone.h
===================================================================
--- code/branches/presentation3/src/orxonox/worldentities/Drone.h	(revision 7059)
+++ code/branches/presentation3/src/orxonox/worldentities/Drone.h	(revision 7060)
@@ -114,4 +114,6 @@
             inline void setMinDistanceToOwner( float distance)
                 { this->minDistanceToOwner_=distance; }
+            inline void setMaxShootingRange( float distance)
+                { this->maxShootingRange_=distance; }
 
             
@@ -130,4 +132,6 @@
             inline float getMinDistanceToOwner()
                 { return this->minDistanceToOwner_; }
+            inline float getMaxShootingRange()
+                { return this->maxShootingRange_; }
             
         private:
@@ -141,4 +145,5 @@
             float maxDistanceToOwner_; //Maximum Distance to owner
             float minDistanceToOwner_; //Minimum Distance to owner
+            float maxShootingRange_;
     };
 
