Index: /branches/playability/src/world_entities/projectiles/projectile.cc
===================================================================
--- /branches/playability/src/world_entities/projectiles/projectile.cc	(revision 10034)
+++ /branches/playability/src/world_entities/projectiles/projectile.cc	(revision 10035)
@@ -167,21 +167,19 @@
  *  @return normalized (new) direction vector
 */
-Vector Projectile::newDirection(Vector curDirection, Vector estTargetDir, float angle)
-{
-  float tmp = angleDeg ( curDirection, estTargetDir);
-  if (tmp == 0) { return curDirection; }
-
-  if( angle >  tmp ) { angle = tmp; }
-
-  //Vector n = curDirection.cross(estTargetDir);
-  //Vector d = n.cross(curDirection);
-  Vector d = curDirection.cross(estTargetDir).cross(curDirection);
-  d.normalize();
-  if( angle == 90) { return d; }
-
-  Vector newDir = curDirection + d *  curDirection.len() * tan (angle);
-  newDir.normalize();
-  return newDir;
-}
+// Vector Projectile::newDirection(Vector curDirection, Vector estTargetDir, float angle)
+// {
+//   float tmp = angleDeg ( curDirection, estTargetDir);
+//   if ( unlikely(tmp == 0) ) { return curDirection; }
+// 
+//   if( fabsf(angle) >  fabsf(tmp) ) { angle = tmp; }
+// 
+//   Vector d = curDirection.cross(estTargetDir).cross(curDirection);
+//   d.normalize();
+//   if( unlikely( angle == 90)) { return d; }
+// 
+//   Vector newDir = curDirection + d *  curDirection.len() * tan (angle);
+//   newDir.normalize();
+//   return newDir;
+// }
 
 
@@ -192,9 +190,12 @@
 void Projectile::tick (float dt)
 {
-  float tti = 0;  //!< time to impact
-  Vector estTargetDir = (this->target->getRelCoor() + this->target->getVelocity());
-  this->velocity = this->newDirection(this->velocity, estTargetDir, this->turningSpeed * dt ) * this->velocity.len();
-  Vector v = this->velocity * (dt);
-  this->shiftCoor(v);
+/*
+  if (target != NULL){
+    float tti = this->target->getRelCoor().len() / this->getVelocity().len();
+    Vector estTargetDir = (this->target->getRelCoor() + this->target->getVelocity()) * tti;
+    this->velocity = this->newDirection(this->velocity, estTargetDir, this->turningSpeed * dt ) * this->velocity.len();
+    Vector v = this->velocity * (dt);
+    this->shiftCoor(v);
+  }*/
 
   if (this->tickLifeCycle(dt))
Index: /branches/playability/src/world_entities/projectiles/projectile.h
===================================================================
--- /branches/playability/src/world_entities/projectiles/projectile.h	(revision 10034)
+++ /branches/playability/src/world_entities/projectiles/projectile.h	(revision 10035)
@@ -62,4 +62,7 @@
     inline float getElecDamage() { return this->elecDamage; };
 
+    inline void setPhysDamage( float dmg) {this->physDamage = dmg; };
+    inline void setElecDamage( float dmg) {this->elecDamage = dmg; };
+
   protected:
     // energy
@@ -88,5 +91,5 @@
     OrxSound::SoundBuffer  engineBuffer;
 
-    virtual Vector newDirection(Vector curDirection, Vector estTargetDir, float angle);
+//     virtual Vector newDirection(Vector curDirection, Vector estTargetDir, float angle);
 };
 
Index: /branches/playability/src/world_entities/projectiles/swarm_projectile.cc
===================================================================
--- /branches/playability/src/world_entities/projectiles/swarm_projectile.cc	(revision 10034)
+++ /branches/playability/src/world_entities/projectiles/swarm_projectile.cc	(revision 10035)
@@ -37,5 +37,6 @@
 {
 
-  this->loadModel("models/projectiles/orx-rocket.obj", 0.5);
+/*  this->loadModel("models/projectiles/orx-rocket.obj", 0.5);*/
+  this->loadModel("models/projectiles/swarm_projectile.obj");
   this->loadExplosionSound("sound/explosions/explosion_4.wav");
 
@@ -45,5 +46,5 @@
   this->lifeSpan = 2.0;
   this->agility = 3.5;
-  this->maxVelocity = 150;
+  this->maxVelocity = 100;
 
   this->emitter = new DotEmitter(100, 5, M_2_PI);
@@ -141,4 +142,34 @@
 }
 
+
+
+/**
+ *  this function gets called by tick to calculate the new flight direction
+ *  @param curDirection direction vector
+ *  @param estTargetDir target vector, pointing to where the target will be on hit
+ *  @param angle = tick * turningSpeed
+ *  @return (new) direction vector
+*/
+Vector SwarmProjectile::newDirection(Vector curDirection, Vector estTargetDir, float angle)
+{
+  printf("recalculating direction\n");
+  float tmp = angleDeg ( curDirection, estTargetDir);
+  if ( unlikely(tmp == 0) ) { return curDirection * maxVelocity / curDirection.len(); }
+
+  if( fabsf(angle) >  fabsf(tmp) ) { angle = tmp; }
+
+  Vector d = curDirection.cross(estTargetDir).cross(curDirection);
+  d.normalize();
+  if( unlikely( angle == 90)) { return d; } //avoid complication
+
+  Vector newDir = curDirection + d *  curDirection.len() * tan (angle);
+  newDir.normalize();
+  newDir *= curDirection.len();
+  return newDir;
+}
+
+
+
+
 /**
  *  signal tick, time dependent things will be handled here
@@ -147,5 +178,5 @@
 void SwarmProjectile::tick (float time)
 {
-
+/*
   Vector targetFarFarAway = this->getAbsCoor() + Vector(100000, 0, 0);
 
@@ -173,5 +204,15 @@
   velocity *= maxVelocity/velocity.len();
   Vector v = this->velocity * (time);
-  this->shiftCoor(v);
+  this->shiftCoor(v);*/
+
+  if (target != NULL){
+    float tti = this->target->getRelCoor().len() / this->getVelocity().len();
+    Vector estTargetDir = (this->target->getRelCoor() + this->target->getVelocity()) * tti;
+    this->velocity = this->newDirection(this->velocity, estTargetDir, this->turningSpeed * time );
+  }
+  else
+    velocity *= maxVelocity / velocity.len(); // set speed to max
+
+  this->shiftCoor(velocity * time);
 
   if(this->tickLifeCycle(time))
@@ -208,5 +249,5 @@
   this->getAbsDir().matrix (matrix);
   glMultMatrixf((float*)matrix);
-  glScalef(2.0, 2.0, 2.0);
+  //glScalef(2.0, 2.0, 2.0);
   this->getModel()->draw();
 
Index: /branches/playability/src/world_entities/projectiles/swarm_projectile.h
===================================================================
--- /branches/playability/src/world_entities/projectiles/swarm_projectile.h	(revision 10034)
+++ /branches/playability/src/world_entities/projectiles/swarm_projectile.h	(revision 10035)
@@ -45,5 +45,9 @@
     Vector                            correctionVector;
 
+    PNode*                            target;
+
     WorldEntity* hitEntity; // FIXME TEMPORARY
+
+    Vector newDirection(Vector curDirection, Vector estTargetDir, float angle);
 
 };
Index: /branches/playability/src/world_entities/test_entity2.cc
===================================================================
--- /branches/playability/src/world_entities/test_entity2.cc	(revision 10034)
+++ /branches/playability/src/world_entities/test_entity2.cc	(revision 10035)
@@ -88,4 +88,5 @@
 
   this->material->setDiffuseMap("maps/TE2.tga");
+
 }
 
@@ -126,4 +127,9 @@
 
 
+  glEnable(GL_BLEND);
+  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+  glShadeModel(GL_FLAT);
+  glClearColor(0.0, 0.0, 0.0, 0.0);
+
   glEnable(GL_TEXTURE_2D);
   this->material->select();
@@ -186,4 +192,5 @@
   glEnd();
 
+/*
   glBegin(GL_QUADS);// -X
     glTexCoord2f (0.0, 0.0);
@@ -238,5 +245,5 @@
     glVertex3f( -0.5f, 0.5f, 0.0f );
 //     glNormal3f(0.0, 0.0, -1.0);
-  glEnd();
+  glEnd();*/
 
   glPopMatrix();
