Index: /code/branches/ai/data/levels/pickup.oxw
===================================================================
--- /code/branches/ai/data/levels/pickup.oxw	(revision 6890)
+++ /code/branches/ai/data/levels/pickup.oxw	(revision 6891)
@@ -24,10 +24,10 @@
 
     <Template name=droneTemplate>
-        <Drone name="meineDrohne" primarythrust="80" auxilarythrust="10" rotationthrust="10" mass= "50" linearDamping = "0.9" angularDamping = "0.7">
+        <Drone name="meineDrohne"  mass= "50" linearDamping = "0.9" angularDamping = "0.7">
         <attached>
-            <Model scale="10" mesh="drone.mesh"/>
+            <Model scale="1" mesh="drone.mesh"/>
         </attached>
         <collisionShapes>
-            <BoxCollisionShape position="0,0,0"      halfExtents="10, 10, 10" />
+            <BoxCollisionShape position="0,0,0"      halfExtents="1, 1, 1" />
         </collisionShapes>
     
Index: /code/branches/ai/src/modules/pickup/items/DronePickup.cc
===================================================================
--- /code/branches/ai/src/modules/pickup/items/DronePickup.cc	(revision 6890)
+++ /code/branches/ai/src/modules/pickup/items/DronePickup.cc	(revision 6891)
@@ -134,7 +134,7 @@
                 
                 //Attach to pawn
-                Drone* drone = new Drone(this);
+                Drone* drone = new Drone(pawn->getCreator()); // this is neccessary because the projectiles fired need a valid creator for the particlespawner (when colliding against something)
                 drone->addTemplate(this->getDroneTemplate());
-                pawn->attach(drone);
+
                 Controller* controller = drone->getController();
                 DroneController* droneController = dynamic_cast<DroneController*>(controller);
@@ -143,5 +143,8 @@
                     droneController->setOwner(pawn);
                 }
-
+                
+                Vector3 spawnPosition = pawn->getWorldPosition() + Vector3(30,0,-30);
+                drone->setPosition(spawnPosition);
+                
                 //! The pickup has been used up.
                 this->setUsed(false);
Index: /code/branches/ai/src/orxonox/controllers/AIController.cc
===================================================================
--- /code/branches/ai/src/orxonox/controllers/AIController.cc	(revision 6890)
+++ /code/branches/ai/src/orxonox/controllers/AIController.cc	(revision 6891)
@@ -102,5 +102,5 @@
                 this->searchRandomTargetPosition();
 
-
+/*
             random = rnd(maxrand);
             if (random < 75 && (this->target_ && !this->bShooting_))
@@ -110,5 +110,5 @@
             random = rnd(maxrand);
             if (random < 25 && (this->bShooting_))
-                this->bShooting_ = false;
+                this->bShooting_ = false; */
 
         }
Index: /code/branches/ai/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- /code/branches/ai/src/orxonox/controllers/ArtificialController.cc	(revision 6890)
+++ /code/branches/ai/src/orxonox/controllers/ArtificialController.cc	(revision 6891)
@@ -501,4 +501,12 @@
         }
 
+        DroneController* droneController = 0;
+        droneController = orxonox_cast<DroneController*>(entity1->getController());
+        if (droneController && static_cast<ControllableEntity*>(droneController->getOwner()) == entity2)
+            return true;
+        droneController = orxonox_cast<DroneController*>(entity2->getController());
+        if (droneController && static_cast<ControllableEntity*>(droneController->getOwner()) == entity1)
+            return true;
+            
         return (team1 == team2 && team1 != -1);
     }
Index: /code/branches/ai/src/orxonox/controllers/DroneController.cc
===================================================================
--- /code/branches/ai/src/orxonox/controllers/DroneController.cc	(revision 6890)
+++ /code/branches/ai/src/orxonox/controllers/DroneController.cc	(revision 6891)
@@ -59,4 +59,6 @@
 
         this->actionTimer_.setTimer(ACTION_INTERVAL, true, createExecutor(createFunctor(&DroneController::action, this)));
+
+        this->owner_.setCallback(createFunctor(&DroneController::ownerDied, this));
     }
 
@@ -83,5 +85,5 @@
         const Vector3& dronePosition = getDrone()->getWorldPosition();
 
-        const Vector3& locOwnerDir = getDrone()->getOrientation().UnitInverse()*(dronePosition-ownerPosition); //Vector from Drone To Owner out of drones local coordinate system
+        const Vector3& locOwnerDir = getDrone()->getOrientation().UnitInverse()*(ownerPosition-dronePosition); //Vector from Drone To Owner out of drones local coordinate system
 
         int distance = sqrt( (ownerPosition.x-dronePosition.x)*(ownerPosition.x-dronePosition.x)
@@ -90,14 +92,27 @@
 
         if (distance > 500) { //TODO: variable implementation of maxdistance
-            drone_->moveUpDown(-locOwnerDir.y);
-            drone_->moveFrontBack(locOwnerDir.z);
-            drone_->moveRightLeft(-locOwnerDir.x);
+            drone_->moveUpDown(locOwnerDir.y);
+            drone_->moveFrontBack(-locOwnerDir.z);
+            drone_->moveRightLeft(locOwnerDir.x);
         }
 
+
+        random = rnd(maxrand);
+        if ( random < 30 && (!this->target_))
+            this->searchNewTarget();
+
+
+        this->aimAtTarget();
+        drone_->fire(0);
+         
+
+
+
+        //COUT(0) << "Drone: " << dronePosition << endl;
+        //COUT(0) << "Distance: " << distance << endl;
+        COUT(0) << "locDrone: " << locOwnerDir << endl;
+        COUT(0) << "target: " << targetPosition_ << endl;
         COUT(0) << "Owner: " << ownerPosition << endl;
-        COUT(0) << "Drone: " << dronePosition << endl;
-        COUT(0) << "Distance: " << distance << endl;
-        COUT(0) << "locDrone: " << locOwnerDir << endl;
-
+        COUT(0) << "Rand: " << random << endl;
 
 /*
@@ -160,16 +175,16 @@
         setTargetPosition(this->getControllableEntity()->getPosition());
 
-/*      myDrone->setRotationThrust(25);
-	myDrone->setAuxilaryThrust(30);
-	myDrone->rotateYaw(10*dt); */
         }
 
         SUPER(AIController, tick, dt);
 
-        // you can use the following commands for steering 
-        // - moveFrontBack, moveRightLeft, moveUpDown 
-        // - rotatePitch, rotateYaw, rotateRoll 
-        // - apply the to myDrone (e.g. myDrone->rotateYaw(..) ) 
+    }
 
+    void DroneController::ownerDied()
+    {
+        if (this->drone_)
+            this->drone_->destroy();
+        else
+            this->destroy();
     }
 }
Index: /code/branches/ai/src/orxonox/controllers/DroneController.h
===================================================================
--- /code/branches/ai/src/orxonox/controllers/DroneController.h	(revision 6890)
+++ /code/branches/ai/src/orxonox/controllers/DroneController.h	(revision 6891)
@@ -33,4 +33,5 @@
 
 #include "AIController.h"
+#include "core/WeakPtr.h"
 #include "tools/interfaces/Tickable.h"
 
@@ -64,8 +65,9 @@
         protected:
             virtual void action();
+            void ownerDied();
 
         private:
             Timer actionTimer_;
-            Pawn* owner_;
+            WeakPtr<Pawn> owner_;
             Drone* drone_;
     };
