Index: /branches/spaceshipcontrol/src/world_entities/weapons/aim.cc
===================================================================
--- /branches/spaceshipcontrol/src/world_entities/weapons/aim.cc	(revision 6613)
+++ /branches/spaceshipcontrol/src/world_entities/weapons/aim.cc	(revision 6614)
@@ -73,4 +73,6 @@
   this->source = NULL;
 
+  this->range = 0;
+  this->angle = 0;
   this->anim = new tAnimation<Aim>(this, &Aim::setSize);
   this->anim->setInfinity(ANIM_INF_CONSTANT);
@@ -101,5 +103,5 @@
 }
 
-void Aim::searchTarget(float range, float angle)
+void Aim::searchTarget()
 {
   std::list<WorldEntity*>::iterator entity;
@@ -107,6 +109,6 @@
   diffVec = ( this->getAbsCoor() - this->source->getAbsCoor() );
 
-//only look for target if the aim hasn`t locked a target yet or if the actual target is out of range 
-  if( this == PNode::getNullParent() || diffVec.len() > range  || ( acos( (this->source->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) ) > angle && (this->source->getAbsDirX()).dot(diffVec) > 0))
+//only look for target if the aim hasn`t locked a target yet or if the actual target is out of range
+  if( this == PNode::getNullParent() || diffVec.len() > range  || ( acos( (this->source->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) ) > angle))
   for (entity = State::getObjectManager()->getObjectList(OM_GROUP_00).begin();
        entity != State::getObjectManager()->getObjectList(OM_GROUP_00).end();
@@ -115,5 +117,5 @@
     diffVec = ( (*entity)->getAbsCoor() - this->source->getAbsCoor() );
 
-    if ( diffVec.len() < range  &&  acos( (this->source->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) ) < angle && (this->source->getAbsDirX()).dot(diffVec) > 0)
+    if ( diffVec.len() < range  &&  acos( (this->source->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) ) < angle)
     {
       if (this->getParent() != (*entity))
@@ -130,5 +132,4 @@
 
 
-
 /**
  * @brief sets the size of the Aim.
@@ -164,5 +165,5 @@
 
 //  if (this->source->getAbsCoor().x > this->getAbsCoor().x )
-//    this->searchTarget(1000,M_PI_2);
+     this->searchTarget();
 //   float z = 0.0f;
 //   glReadPixels ((int)this->getAbsCoor2D().x,
Index: /branches/spaceshipcontrol/src/world_entities/weapons/aim.h
===================================================================
--- /branches/spaceshipcontrol/src/world_entities/weapons/aim.h	(revision 6613)
+++ /branches/spaceshipcontrol/src/world_entities/weapons/aim.h	(revision 6614)
@@ -38,5 +38,8 @@
   inline PNode* getTarget(PNode* target) { return this->getParent(); };
 
-  void searchTarget(float range, float angle);
+  void searchTarget();
+
+  void setRange(float range){this->range = range;};
+  void setAngle(float angle){this->angle = angle;};
 
   void setSize(float size);
@@ -53,4 +56,7 @@
    tAnimation<Aim>* anim;
 
+   float            range;                //!<
+   float            angle;                //!<
+
    PNode*           source;               //!< Where this Shot has come from.
 
Index: /branches/spaceshipcontrol/src/world_entities/weapons/aiming_turret.cc
===================================================================
--- /branches/spaceshipcontrol/src/world_entities/weapons/aiming_turret.cc	(revision 6613)
+++ /branches/spaceshipcontrol/src/world_entities/weapons/aiming_turret.cc	(revision 6614)
@@ -98,4 +98,6 @@
   this->target = new Aim(this);
   this->target->setVisibility(false);
+  this->target->setRange(100);
+  this->target->setAngle(M_PI);
 }
 
@@ -130,5 +132,5 @@
   this->setAbsDirSoft(quat, 5);
 
-  this->target->searchTarget(100,M_PI_2);
+  this->target->tick(dt);
 }
 
@@ -146,5 +148,5 @@
   pj->setAbsDir(this->getAbsDir());
   pj->activate();
-  this->target->searchTarget(100,M_PI_2);
+  this->target->searchTarget();
 }
 
Index: /branches/spaceshipcontrol/src/world_entities/weapons/targeting_turret.cc
===================================================================
--- /branches/spaceshipcontrol/src/world_entities/weapons/targeting_turret.cc	(revision 6613)
+++ /branches/spaceshipcontrol/src/world_entities/weapons/targeting_turret.cc	(revision 6614)
@@ -92,4 +92,6 @@
   this->target = new Aim(this);
   this->target->setVisibility(false);
+  this->target->setRange(100);
+  this->target->setAngle(M_PI_4/2);
   this->lockedTime = 0;
   this->neededLockTime = 2;
@@ -150,5 +152,5 @@
   pj->setAbsDir(this->getAbsDir());
   pj->activate();
-  this->target->searchTarget(100,M_PI_2);
+  this->target->searchTarget();
 }
 
