Index: code/branches/ai/src/orxonox/controllers/AIController.cc
===================================================================
--- code/branches/ai/src/orxonox/controllers/AIController.cc	(revision 8710)
+++ code/branches/ai/src/orxonox/controllers/AIController.cc	(revision 8711)
@@ -270,18 +270,24 @@
             }
         }//END_OF DEFAULT MODE
-        else if (this->mode_ == ROCKET)
+        else if (this->mode_ == ROCKET)//Rockets do not belong to a group of bots -> bot states are not relevant.
         {   
             ControllableEntity *controllable = this->getControllableEntity(); 
             if(controllable)
             {
-                 if(controllable->getRocket())//Check wether the bot is controlling the rocket.
-                 {
-                     this->follow(); //TODO: CHECK: does follow make the bot crash into the target_ ?
-                 }
-                 else
-                     this->mode_ = DEFAULT;//no rocket -> get out of rocket mode
+                if(controllable->getRocket())//Check wether the bot is controlling the rocket and if the timeout is over.
+                {
+                    this->follow(); //TODO: CHECK: does follow make the bot crash into the target_ ?
+                    this->timeout_ -= dt;
+                    if((timeout_< 0)||(!target_))//Check if the timeout is over or target died.
+                    {
+                       controllable->fire(0);//kill the rocket
+                       this->setPreviousMode();//get out of rocket mode
+                    }
+                }
+                else
+                    this->setPreviousMode();//no rocket entity -> get out of rocket mode
             }
             else
-                this->mode_ = DEFAULT;//If bot dies -> getControllableEntity == NULL -> get out of ROCKET mode
+                this->setPreviousMode();//If bot dies -> getControllableEntity == NULL -> get out of ROCKET mode
         }//END_OF ROCKET MODE
         SUPER(AIController, tick, dt);
Index: code/branches/ai/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/branches/ai/src/orxonox/controllers/ArtificialController.cc	(revision 8710)
+++ code/branches/ai/src/orxonox/controllers/ArtificialController.cc	(revision 8711)
@@ -89,4 +89,5 @@
 	this->botlevel_ = 1.0f;
 	this->mode_ = DEFAULT;
+        this->timeout_=0;
     }
 
@@ -1035,19 +1036,27 @@
         else if(this->getControllableEntity()&&(numberOfWeapons>0)&&this->bShooting_ && this->isCloseAtTarget((1 + 2*botlevel_)*1000) && this->isLookingAtTarget(math::pi / 20.0f))
         {
-            /*if (this->isCloseAtTarget(130) && this->isLookingAtTarget(math::pi / 20.0f)&&(weapons[1]==1) )
+            if (this->isCloseAtTarget(130) &&(weapons[1]==1) )
             {//LENSFLARE: short range weapon     
                 this->getControllableEntity()->fire(1); //ai uses lens flare if they're close enough to the target
             }
-            else if(this->isLookingAtTarget(math::pi / 20.0f)&&(weapons[3]==3)&& this->isCloseAtTarget(260) &&projectiles[3] )*/
+            else if((weapons[3]==3)&& this->isCloseAtTarget(400) /*&&projectiles[3]*/ )
             {//ROCKET: mid range weapon
                 //TODO: Which weapon is the rocket? How many rockets are available?
                 this->mode_ = ROCKET;
-                //TODO: this->rockettimer->start()
                 this->getControllableEntity()->fire(3);//launch rocket
+                if(this->getControllableEntity()&&this->target_)//after fire(3) getControllableEntity() refers to the rocket!
+                {
+                    float speed = this->getControllableEntity()->getVelocity().length() - target_->getVelocity().length();
+                    if(!speed) speed = 0.1f;
+                    float distance = target_->getPosition().length() - this->getControllableEntity()->getPosition().length();
+                    this->timeout_= distance/speed*sgn(speed*distance) + 1.8f;//predicted time of target hit (+ tolerance)
+                }
+                else
+                    this->timeout_ = 4.0f;//TODO: find better default value
+                
                 this->projectiles[3]-=1;//decrease ammo !!
             }
-           
-            /*else if ((weapons[0]==0))//LASER: default weapon
-                this->getControllableEntity()->fire(0);*/
+            else if ((weapons[0]==0))//LASER: default weapon
+                this->getControllableEntity()->fire(0);
         }
     }
@@ -1094,4 +1103,9 @@
             it->setBotLevel(level);
     }
+
+    void ArtificialController::setPreviousMode()
+    {
+        this->mode_ = DEFAULT;
+    }
     
 }
Index: code/branches/ai/src/orxonox/controllers/ArtificialController.h
===================================================================
--- code/branches/ai/src/orxonox/controllers/ArtificialController.h	(revision 8710)
+++ code/branches/ai/src/orxonox/controllers/ArtificialController.h	(revision 8711)
@@ -149,8 +149,10 @@
             int weapons[WeaponSystem::MAX_WEAPON_MODES];
 	    int projectiles[WeaponSystem::MAX_WEAPON_MODES];
-	    float botlevel_; //< Makes the level of a bot configurable. 
+	    float botlevel_; //< Makes the level of a bot configurable.
+            float timeout_; //< Timeout for rocket usage. (If a rocket misses, a bot should stop using it.)
 
             enum Mode {DEFAULT, ROCKET, DEFENCE, MOVING};//TODO; implement DEFENCE, MOVING modes
             Mode mode_;
+            void setPreviousMode();
 
         private:
