Index: trunk/src/world_entities/Makefile.am
===================================================================
--- trunk/src/world_entities/Makefile.am	(revision 6433)
+++ trunk/src/world_entities/Makefile.am	(revision 6434)
@@ -22,7 +22,7 @@
                   world_entities/character_attributes.cc \
                   world_entities/test_entity.cc \
+                  \
                   world_entities/weapons/weapon_manager.cc \
                   world_entities/weapons/weapon.cc \
-                  world_entities/weapons/projectile.cc \
                   world_entities/weapons/test_gun.cc \
                   world_entities/weapons/turret.cc \
@@ -30,11 +30,14 @@
                   world_entities/weapons/targeting_turret.cc \
                   world_entities/weapons/cannon.cc \
-                  world_entities/weapons/test_bullet.cc \
-                  world_entities/weapons/rocket.cc \
-                  world_entities/weapons/guided_missile.cc \
-                  world_entities/weapons/laser.cc \
                   world_entities/weapons/aim.cc \
-                  world_entities/weapons/bomb.cc \
                   world_entities/weapons/crosshair.cc \
+                  \
+                  world_entities/projectiles/projectile.cc \
+                  world_entities/projectiles/bomb.cc \
+                  world_entities/projectiles/laser.cc \
+                  world_entities/projectiles/test_bullet.cc \
+                  world_entities/projectiles/rocket.cc \
+                  world_entities/projectiles/guided_missile.cc \
+                  \
                   world_entities/power_ups/power_up.cc \
                   world_entities/power_ups/turret_power_up.cc \
@@ -42,7 +45,9 @@
                   world_entities/power_ups/weapon_power_up.cc \
                   world_entities/power_ups/param_power_up.cc \
+                  \
                   world_entities/space_ships/space_ship.cc \
                   world_entities/space_ships/helicopter.cc \
                   world_entities/creatures/md2_creature.cc \
+                  \
                   world_entities/spawning_point.cc
 
@@ -63,7 +68,7 @@
                  world_entities/character_attributes.h \
                  world_entities/test_entity.h \
+                 \
                  world_entities/weapons/weapon_manager.h \
                  world_entities/weapons/weapon.h \
-                 world_entities/weapons/projectile.h \
                  world_entities/weapons/test_gun.h \
                  world_entities/weapons/cannon.h \
@@ -71,11 +76,14 @@
                  world_entities/weapons/aiming_turret.h \
                  world_entities/weapons/targeting_turret.h \
-                 world_entities/weapons/test_bullet.h \
-                 world_entities/weapons/rocket.h \
-                 world_entities/weapons/guided_missile.h \
-                 world_entities/weapons/laser.h \
                  world_entities/weapons/aim.h \
-                 world_entities/weapons/bomb.h \
                  world_entities/weapons/crosshair.h \
+                 \
+                 world_entities/projectiles/projectile.h \
+                 world_entities/projectiles/bomb.h \
+                 world_entities/projectiles/laser.h \
+                 world_entities/projectiles/test_bullet.h \
+                 world_entities/projectiles/rocket.h \
+                 world_entities/projectiles/guided_missile.h \
+                 \
                  world_entities/power_ups/power_up.h \
                  world_entities/power_ups/turret_power_up.h \
@@ -83,6 +91,8 @@
                  world_entities/power_ups/param_power_up.h \
                  world_entities/power_ups/weapon_power_up.h \
+                 \
                  world_entities/space_ships/space_ship.h \
                  world_entities/space_ships/helicopter.h \
                  world_entities/creatures/md2_creature.h \
+                 \
                  world_entities/spawning_point.h
Index: trunk/src/world_entities/projectiles/bomb.cc
===================================================================
--- trunk/src/world_entities/projectiles/bomb.cc	(revision 6434)
+++ trunk/src/world_entities/projectiles/bomb.cc	(revision 6434)
@@ -0,0 +1,199 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Stefan Lienhard
+   co-programmer: ...
+*/
+
+#include "bomb.h"
+#include "glincl.h"
+#include "state.h"
+#include "model.h"
+#include "primitive_model.h"
+
+#include "fast_factory.h"
+
+
+#include "object_manager.h"
+
+#include "particle_engine.h"
+#include "particle_emitter.h"
+#include "particle_system.h"
+
+using namespace std;
+
+CREATE_FAST_FACTORY_STATIC(Bomb, CL_BOMB);
+
+/**
+ * constructs and loads a Bomb from a XML-element
+ * @param root the XML-element to load from
+ */
+Bomb::Bomb(const TiXmlElement* root)
+{
+  this->init();
+  if (root != NULL)
+    this->loadParams(root);
+
+  float modelSize = 1.0;
+  this->loadModel("models/projectiles/RadioActiveBomb.obj", 1.0);
+
+  this->setMinEnergy(1);
+  this->setMaxEnergy(10);
+
+  this->lifeSpan = 15;
+
+  this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5);
+  this->emitter->setParent(this);
+  this->emitter->setSpread(M_PI, M_PI);
+}
+
+
+/**
+ * standard deconstructor
+ */
+Bomb::~Bomb ()
+{
+  delete this->detonationSphere;
+  delete this->detonationMaterial;
+
+}
+
+
+/**
+ * initializes the Bomb
+ * @todo change this to what you wish
+ */
+void Bomb::init()
+{
+  this->setClassID(CL_BOMB, "Bomb");
+
+
+  this->detonationSphere = new PrimitiveModel(PRIM_SPHERE);
+  this->detonationMaterial = new Material();
+  this->detonationMaterial->setDiffuse(1, 0, 0);
+  //   this->detonationMaterial->setTransparency(.1);
+  /**
+   * @todo: Write CL_PROTO_WORLD_ENTITY INTO THE src/defs/class_id.h (your own definition)
+   */
+
+}
+
+
+/**
+ * loads a Bomb from a XML-element
+ * @param root the XML-element to load from
+ * @todo make the class Loadable
+ */
+void Bomb::loadParams(const TiXmlElement* root)
+{
+  // all the clases this Entity is directly derived from must be called in this way, to load all settings.
+  static_cast<WorldEntity*>(this)->loadParams(root);
+
+
+  /**
+   * @todo: make the class Loadable
+   */
+}
+
+
+/**
+ * advances the Bomb about time seconds
+ * @param time the Time to step
+ */
+void Bomb::tick(float time)
+{
+  this->lifeCycle += time/this->lifeSpan;
+  if( this->lifeCycle >= 1.0)
+    {
+      PRINTF(5)("FINALIZE==========================\n");
+      PRINTF(5)("current life cycle is: %f\n", this->lifeCycle);
+      PRINTF(5)("FINALIZE===========================\n");
+
+      this->deactivate();
+    }
+  else if (this->lifeCycle > 0.9f)
+    this->detonate ((this->lifeCycle-.89) *1000.0);
+  else
+  {
+    Vector v = this->velocity * (time);
+    this->shiftCoor(v);
+  }
+}
+
+/**
+ * draws this worldEntity
+ */
+void Bomb::draw () const
+{
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+  float matrix[4][4];
+
+  /* translate */
+  glTranslatef (this->getAbsCoor ().x,
+                this->getAbsCoor ().y,
+                this->getAbsCoor ().z);
+  /* rotate */
+  this->getAbsDir().matrix(matrix);
+  glMultMatrixf((float*)matrix);
+
+  if (this->lifeCycle < .9)
+  {
+    if (this->getModel() != NULL)
+      this->getModel()->draw();
+  }
+  else
+  {
+    glScalef((this->lifeCycle-.89) *1000.0,
+              (this->lifeCycle-.89) *1000.0,
+              (this->lifeCycle-.89) *1000.0);
+    this->detonationMaterial->select();
+    this->detonationSphere->draw();
+  }
+  glPopMatrix();
+}
+
+
+/**
+ *
+ *
+ */
+void Bomb::collidesWith (WorldEntity* entity, const Vector& location)
+{
+  if (this->lifeCycle < .9f && entity->isA(CL_NPC))
+    this->lifeCycle = 0.9f;
+}
+
+void Bomb::activate()
+{
+
+}
+
+void Bomb::deactivate()
+{
+  this->toList(OM_DEAD);
+  this->lifeCycle = 0.0f;
+  Bomb::fastFactory->kill(this);
+}
+
+void Bomb::detonate(float size)
+{
+  std::list<WorldEntity*>* detonationList = ObjectManager::distanceFromObject(*this, size, CL_NPC);
+  if (detonationList != NULL)
+  {
+    while( !detonationList->empty() )
+    {
+      detonationList->front()->collidesWith(this, Vector(0,0,0));
+      detonationList->pop_front();
+    }
+    delete detonationList;
+  }
+}
Index: trunk/src/world_entities/projectiles/bomb.h
===================================================================
--- trunk/src/world_entities/projectiles/bomb.h	(revision 6434)
+++ trunk/src/world_entities/projectiles/bomb.h	(revision 6434)
@@ -0,0 +1,49 @@
+/*!
+ * @file bomb.h
+ * @brief description
+*/
+
+#ifndef _BOMB_H
+#define _BOMB_H
+
+#include "projectile.h"
+
+class FastFactory;
+class ParticleSystem;
+class ParticleEmitter;
+class Material;
+
+//! A Class to ...
+class Bomb : public Projectile
+{
+
+ public:
+  Bomb(const TiXmlElement* root = NULL);
+  virtual ~Bomb();
+
+  void loadParams(const TiXmlElement* root);
+  void init();
+
+//  virtual void postSpawn ();
+//  virtual void leftWorld ();
+
+
+  virtual void draw() const;
+  virtual void tick(float time);
+  virtual void collidesWith (WorldEntity* entity, const Vector& location);
+  virtual void activate();
+  virtual void deactivate();
+
+  void detonate(float size);
+
+ private:
+  static FastFactory*               fastFactory;
+  static ParticleSystem*            trailParticles;
+  static ParticleSystem*            explosionParticles;
+
+  ParticleEmitter*                  emitter;
+  Model*                            detonationSphere;
+  Material*                         detonationMaterial;
+};
+
+#endif /* BOMB */
Index: trunk/src/world_entities/projectiles/guided_missile.cc
===================================================================
--- trunk/src/world_entities/projectiles/guided_missile.cc	(revision 6434)
+++ trunk/src/world_entities/projectiles/guided_missile.cc	(revision 6434)
@@ -0,0 +1,211 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific
+   main-programmer: Silvan Nellen
+   co-programmer:
+
+*/
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
+
+#include "guided_missile.h"
+
+#include "fast_factory.h"
+
+#include "state.h"
+#include "class_list.h"
+
+#include "particle_engine.h"
+#include "particle_emitter.h"
+#include "particle_system.h"
+
+using namespace std;
+
+CREATE_FAST_FACTORY_STATIC(GuidedMissile, CL_GUIDED_MISSILE);
+
+/**
+ *  standard constructor
+*/
+GuidedMissile::GuidedMissile () : Projectile()
+{
+  this->setClassID(CL_GUIDED_MISSILE, "GuidedMissile");
+
+  float modelSize = .3;
+  this->loadModel("models/projectiles/orx-rocket.obj", .3);
+
+  this->setMinEnergy(1);
+  this->setMaxEnergy(10);
+  this->lifeSpan = 10.0;
+  this->agility = 500;
+  this->maxVelocity = 75;
+
+  this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5);
+  this->emitter->setParent(this);
+  this->emitter->setSpread(M_PI, M_PI);
+}
+
+
+/**
+ *  standard deconstructor
+*/
+GuidedMissile::~GuidedMissile ()
+{
+  // delete this->emitter;
+
+  /* this is normaly done by World.cc by deleting the ParticleEngine */
+  if (GuidedMissile::trailParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
+  {
+    if (ClassList::exists(GuidedMissile::trailParticles, CL_PARTICLE_SYSTEM))
+      delete GuidedMissile::trailParticles;
+    GuidedMissile::trailParticles = NULL;
+  }
+  if (GuidedMissile::explosionParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
+  {
+    if (ClassList::exists(GuidedMissile::explosionParticles, CL_PARTICLE_SYSTEM))
+      delete GuidedMissile::explosionParticles;
+    GuidedMissile::explosionParticles = NULL;
+  }
+
+}
+
+ParticleSystem* GuidedMissile::trailParticles = NULL;
+ParticleSystem* GuidedMissile::explosionParticles = NULL;
+
+
+
+void GuidedMissile::activate()
+{
+  if (unlikely(GuidedMissile::trailParticles == NULL))
+  {
+    GuidedMissile::trailParticles = new ParticleSystem(2000, PARTICLE_SPRITE);
+    GuidedMissile::trailParticles->setName("GuidedMissileTrailParticles");
+    GuidedMissile::trailParticles->setMaterialTexture("maps/radial-trans-noise.png");
+    GuidedMissile::trailParticles->setLifeSpan(1.0, .3);
+    GuidedMissile::trailParticles->setRadius(0.0, .5);
+    GuidedMissile::trailParticles->setRadius(0.2, 2.0);
+    GuidedMissile::trailParticles->setRadius(.5, .8);
+    GuidedMissile::trailParticles->setRadius(1.0, .8);
+    GuidedMissile::trailParticles->setColor(0.0, 1,0,0,.7);
+    GuidedMissile::trailParticles->setColor(0.2, .8,.8,0,.5);
+    GuidedMissile::trailParticles->setColor(0.5, .8,.8,.8,.8);
+    GuidedMissile::trailParticles->setColor(1.0, .8,.8,.8,.0);
+  }
+  if (unlikely(GuidedMissile::explosionParticles == NULL))
+  {
+    GuidedMissile::explosionParticles = new ParticleSystem(200, PARTICLE_SPRITE);
+    GuidedMissile::explosionParticles->setName("GuidedMissileExplosionParticles");
+    GuidedMissile::explosionParticles->setMaterialTexture("maps/radial-trans-noise.png");
+    GuidedMissile::explosionParticles->setLifeSpan(.5, .3);
+    GuidedMissile::explosionParticles->setRadius(0.0, 10);
+    GuidedMissile::explosionParticles->setRadius(.5, 15.0);
+    GuidedMissile::explosionParticles->setRadius(1.0, 10.0);
+    GuidedMissile::explosionParticles->setColor(0.0, 0,1,0,1);
+    GuidedMissile::explosionParticles->setColor(0.5, .8,.8,0,.8);
+    GuidedMissile::explosionParticles->setColor(0.8, .8,.8,.3,.8);
+    GuidedMissile::explosionParticles->setColor(1.0, 1,1,1,.0);
+  }
+
+  ParticleEngine::getInstance()->addConnection(this->emitter, GuidedMissile::trailParticles);
+
+  this->updateNode(0);
+  this->emitter->setEmissionRate(45.0);
+  this->emitter->setEmissionVelocity(0.0);
+}
+
+
+void GuidedMissile::deactivate()
+{
+  ParticleEngine::getInstance()->breakConnections(this->emitter);
+  this->lifeCycle = 0.0;
+
+  this->toList(OM_DEAD);
+  this->removeNode();
+  GuidedMissile::fastFactory->kill(this);
+}
+
+
+void GuidedMissile::collidesWith(WorldEntity* entity, const Vector& location)
+{
+  if (this->hitEntity != entity)
+    this->destroy();
+  this->hitEntity = entity;
+}
+
+/**
+ *  signal tick, time dependent things will be handled here
+ * @param time since last tick
+*/
+void GuidedMissile::tick (float time)
+{
+
+
+if (this->target != NULL && this->target->getParent() != PNode::getNullParent())
+   {
+    speed = velocity.len();
+    diffVector = ((target->getAbsCoor() - this->getAbsCoor()).getNormalized());
+
+    if(velocity.dot(diffVector) != 0)
+     {
+     correctionVector = (( ( diffVector *  (speed * speed/( velocity.dot(diffVector ) ) )) - velocity).getNormalized()) * agility;
+
+      if( (diffVector *  (speed * speed/( velocity.dot(diffVector ) ) ) -velocity).len() < agility )
+       velocity = ((diffVector *  (speed * speed/( velocity.dot(diffVector ) ) )).getNormalized())*agility;
+      else if(velocity.dot(diffVector) > 0)
+        velocity += correctionVector;
+      else if (velocity.dot(diffVector) < 0)
+        velocity -= correctionVector;
+     }
+    else
+      velocity += diffVector * agility;
+
+     this->setAbsDir(Quaternion(velocity, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0)));
+   }
+
+  velocity *= maxVelocity/velocity.len();
+  Vector v = this->velocity * (time);
+  this->shiftCoor(v);
+
+  if(this->tickLifeCycle(time))
+    this->deactivate();
+}
+
+/**
+ *  the function gets called, when the projectile is destroyed
+ */
+void GuidedMissile::destroy ()
+{
+  PRINTF(5)("DESTROY GuidedMissile\n");
+  this->lifeCycle = .95; //!< @todo calculate this usefully.
+  ParticleEngine::getInstance()->breakConnection(this->emitter, GuidedMissile::trailParticles);
+  ParticleEngine::getInstance()->addConnection(this->emitter, GuidedMissile::explosionParticles);
+
+  this->emitter->setEmissionRate(1000.0);
+  this->emitter->setEmissionVelocity(50.0);
+//  this->deactivate();
+
+}
+
+
+void GuidedMissile::draw () const
+{
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+
+  float matrix[4][4];
+  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
+  this->getAbsDir().matrix (matrix);
+  glMultMatrixf((float*)matrix);
+  glScalef(2.0, 2.0, 2.0);
+  this->getModel()->draw();
+
+  glPopMatrix();
+
+}
+
Index: trunk/src/world_entities/projectiles/guided_missile.h
===================================================================
--- trunk/src/world_entities/projectiles/guided_missile.h	(revision 6434)
+++ trunk/src/world_entities/projectiles/guided_missile.h	(revision 6434)
@@ -0,0 +1,50 @@
+/*!
+ * @file guided_missile.h
+ * @brief a GuidedMissile Projectile
+*/
+
+#ifndef _GUIDED_MISSILE_H
+#define _GUIDED_MISSILE_H
+
+#include "projectile.h"
+
+class Weapon;
+class ParticleSystem;
+class ParticleEmitter;
+class FastFactory;
+class Aim;
+
+class GuidedMissile : public Projectile
+{
+  public:
+    GuidedMissile ();
+    virtual ~GuidedMissile ();
+
+    virtual void activate();
+    virtual void deactivate();
+
+    virtual void collidesWith(WorldEntity* entity, const Vector& location);
+
+    virtual void destroy ();
+
+    virtual void tick (float time);
+    virtual void draw () const;
+
+
+  private:
+    static FastFactory*               fastFactory;
+    static ParticleSystem*            trailParticles;
+    static ParticleSystem*            explosionParticles;
+
+    ParticleEmitter*                  emitter;
+    float                             agility;
+    float                             maxVelocity;
+    float                             speed;
+    Vector                            diffVector ;
+    Vector                            correctionVector;
+
+    WorldEntity* hitEntity; // FIXME TEMPORARY
+
+};
+
+#endif /* _GUIDED_MISSILE_H */
Index: trunk/src/world_entities/projectiles/laser.cc
===================================================================
--- trunk/src/world_entities/projectiles/laser.cc	(revision 6434)
+++ trunk/src/world_entities/projectiles/laser.cc	(revision 6434)
@@ -0,0 +1,152 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific
+   main-programmer: Patrick Boenzli
+   co-programmer: Benjamin Grauer
+
+*/
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
+
+#include "laser.h"
+
+#include "fast_factory.h"
+
+#include "state.h"
+#include "class_list.h"
+#include "model.h"
+
+#include "particle_engine.h"
+#include "particle_emitter.h"
+#include "particle_system.h"
+
+
+using namespace std;
+
+CREATE_FAST_FACTORY_STATIC(Laser, CL_LASER);
+
+/**
+ *  standard constructor
+*/
+Laser::Laser () : Projectile()
+{
+  this->setClassID(CL_LASER, "Laser");
+
+  this->loadModel("models/projectiles/laser.obj");
+
+  this->setMinEnergy(1);
+  this->setMaxEnergy(10);
+  this->lifeSpan = 5.0;
+
+  this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5);
+  this->emitter->setParent(this);
+  this->emitter->setSpread(M_PI, M_PI);
+  this->emitter->setEmissionRate(300.0);
+  this->emitter->setEmissionVelocity(50.0);
+}
+
+
+/**
+ *  standard deconstructor
+*/
+Laser::~Laser ()
+{
+  // delete this->emitter;
+
+  /* this is normaly done by World.cc by deleting the ParticleEngine */
+  if (Laser::explosionParticles != NULL && ClassList::getList(CL_LASER)->size() <= 1)
+  {
+    //if (ClassList::exists(Laser::explosionParticles, CL_PARTICLE_SYSTEM))
+    //  delete Laser::explosionParticles;
+    PRINTF(1)("Deleting Laser Particles\n");
+    Laser::explosionParticles = NULL;
+  }
+
+}
+
+ParticleSystem* Laser::explosionParticles = NULL;
+
+void Laser::activate()
+{
+  if (unlikely(Laser::explosionParticles == NULL))
+  {
+    Laser::explosionParticles = new ParticleSystem(1000, PARTICLE_SPRITE);
+    Laser::explosionParticles->setName("LaserExplosionParticles");
+    Laser::explosionParticles->setLifeSpan(.5, .3);
+    Laser::explosionParticles->setRadius(0.0, 10.0);
+    Laser::explosionParticles->setRadius(.5, 6.0);
+    Laser::explosionParticles->setRadius(1.0, 3.0);
+    Laser::explosionParticles->setColor(0.0, 1,1,0,.9);
+    Laser::explosionParticles->setColor(0.5, .8,.8,0,.5);
+    Laser::explosionParticles->setColor(1.0, .8,.8,.7,.0);
+  }
+}
+
+
+void Laser::deactivate()
+{
+  ParticleEngine::getInstance()->breakConnections(this->emitter);
+  this->lifeCycle = 0.0;
+
+  this->toList(OM_NULL);
+  this->removeNode();
+  Laser::fastFactory->kill(this);
+}
+
+
+void Laser::collidesWith(WorldEntity* entity, const Vector& location)
+{
+  if (this->hitEntity != entity && entity->isA(CL_NPC))
+    this->destroy();
+  this->hitEntity = entity;
+}
+
+/**
+ *  signal tick, time dependent things will be handled here
+ * @param dt time since last tick
+*/
+void Laser::tick (float dt)
+{
+  //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
+  Vector v = this->velocity * dt;
+  this->shiftCoor(v);
+
+  if (this->tickLifeCycle(dt))
+    this->deactivate();
+}
+
+/**
+ *  the function gets called, when the projectile is destroyed
+*/
+void Laser::destroy ()
+{
+  PRINTF(5)("DESTROY Laser\n");
+  this->lifeCycle = .95; //!< @todo calculate this usefully.
+  ParticleEngine::getInstance()->addConnection(this->emitter, Laser::explosionParticles);
+}
+
+
+void Laser::draw () const
+{
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+  glPushAttrib(GL_ENABLE_BIT);
+  glDisable(GL_LIGHTING);
+
+  float matrix[4][4];
+  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
+  this->getAbsDir().matrix (matrix);
+  glMultMatrixf((float*)matrix);
+  glScalef(2.0, 2.0, 2.0);
+  this->getModel()->draw();
+  glPopAttrib();
+  glPopMatrix();
+}
+
Index: trunk/src/world_entities/projectiles/laser.h
===================================================================
--- trunk/src/world_entities/projectiles/laser.h	(revision 6434)
+++ trunk/src/world_entities/projectiles/laser.h	(revision 6434)
@@ -0,0 +1,46 @@
+/*!
+ * @file laser.h
+ * @brief a projectile, that is been shooted by a weapon
+*/
+
+#ifndef _LASER_H
+#define _LASER_H
+
+#include "projectile.h"
+
+class Vector;
+class Weapon;
+class ParticleSystem;
+class ParticleEmitter;
+class FastFactory;
+
+class Laser : public Projectile
+{
+  public:
+    Laser ();
+    virtual ~Laser ();
+
+
+    virtual void activate();
+    virtual void deactivate();
+
+    virtual void collidesWith(WorldEntity* entity, const Vector& location);
+
+    virtual void destroy ();
+
+    virtual void tick (float dt);
+    virtual void draw () const;
+
+
+  private:
+    static FastFactory*               fastFactory;
+
+    static ParticleSystem*            explosionParticles;
+
+    ParticleEmitter*                  emitter;
+
+
+    WorldEntity* hitEntity; // FIXME TEMPORARY
+};
+
+#endif /* _LASER_H */
Index: trunk/src/world_entities/projectiles/projectile.cc
===================================================================
--- trunk/src/world_entities/projectiles/projectile.cc	(revision 6434)
+++ trunk/src/world_entities/projectiles/projectile.cc	(revision 6434)
@@ -0,0 +1,117 @@
+
+
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific
+   main-programmer: Patrick Boenzli
+   co-programmer:
+*/
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
+
+#include "projectile.h"
+
+#include "world_entity.h"
+#include "world_entities/weapons/weapon.h"
+#include "model.h"
+
+using namespace std;
+
+
+/**
+ *  standard constructor
+*/
+Projectile::Projectile () : WorldEntity()
+{
+  this->setClassID(CL_PROJECTILE, "Projectile");
+
+  this->lifeCycle = 0.0;
+  this->lifeSpan = 1.0f; /* sec */
+  this->target = NULL;
+  this->removeNode();
+}
+
+
+/**
+ *  standard deconstructor
+*/
+Projectile::~Projectile ()
+{
+  /*
+     do not delete the test projectModel, since it is pnode
+     and will be cleaned out by world
+  */
+  //delete this->projectileModel;
+}
+
+
+void Projectile::setMinEnergy(float energyMin)
+{
+  this->energyMin = energyMin;
+}
+
+
+/**
+ *  this sets the flight direction of the projectile
+ * @param directin in which to flight
+
+   this function will calculate a vector out of this to be used in the
+   tick function
+*/
+void Projectile::setFlightDirection(const Quaternion& flightDirection)
+{
+  Vector v(1, 0, 0);
+  this->flightDirection = flightDirection.apply(v);
+  this->flightDirection.normalize();
+}
+
+/**
+ *  sets the velocity vector to a spec speed
+ * @param velocity: vector of the velocity
+*/
+void Projectile::setVelocity(const Vector &velocity)
+{
+  //Vector offsetVel =
+  this->velocity = velocity;
+ // offsetVel.normalize();
+  //this->velocity += (offsetVel * 50.0);
+}
+
+
+
+void Projectile::setTarget(PNode* target)
+{
+  if (this->target == NULL)
+    this->target = new PNode(target, PNODE_PARENT_MODE_DEFAULT | PNODE_REPARENT_ON_PARENTS_REMOVE);
+  else
+    this->target->setParent(target);
+}
+
+
+/**
+ * signal tick, time dependent things will be handled here
+ * @param dt since last tick
+*/
+void Projectile::tick (float dt)
+{
+  Vector v = this->velocity * (dt);
+  this->shiftCoor(v);
+
+  if (this->tickLifeCycle(dt))
+    this->destroy();
+}
+
+
+/**
+ *  the function gets called, when the projectile is destroyed
+*/
+void Projectile::destroy ()
+{}
+
Index: trunk/src/world_entities/projectiles/projectile.h
===================================================================
--- trunk/src/world_entities/projectiles/projectile.h	(revision 6434)
+++ trunk/src/world_entities/projectiles/projectile.h	(revision 6434)
@@ -0,0 +1,62 @@
+/*!
+ * @file projectile.h
+ * a projectile, that is been shooted by a weapon
+ *
+ * You can use this class to make some Projectiles/Bullets/Lasers/Rockets/etc.
+ *
+ */
+
+#ifndef _PROJECTILE_H
+#define _PROJECTILE_H
+
+#include "world_entity.h"
+
+class Projectile : public WorldEntity
+{
+  public:
+    Projectile ();
+    virtual ~Projectile ();
+
+    void setFlightDirection(const Quaternion& flightDirection);
+    void setVelocity(const Vector &velocity);
+    void setLifeSpan(float lifeSpan);
+
+
+    void setMinEnergy(float energyMin);
+    /** @returns the minimal charched energy */
+    inline float getMinEnergy() { return this->energyMin; };
+    /** @returns if the Projectile can be charged */
+    inline bool isChageable() { return this->bChargeable; };
+
+    void setTarget(PNode* target);
+
+    /** @brief This is called, when the Projectile is Emitted */
+    virtual void activate() = 0;
+    /** @brief This is called, when the Projectile is being destroyed, or deleted */
+    virtual void deactivate() = 0;
+
+    virtual void destroy ();
+
+    virtual void tick (float dt);
+    /** @brief convenience function
+     * @param dt the Time passed
+     * @returns true if the Projectile is past its lifeTime, false if it shall still live */
+    inline bool tickLifeCycle(float dt ) { this->lifeCycle += dt/this->lifeSpan;  return(unlikely(this->lifeCycle >= 1)); }
+
+
+  protected:
+    // energy
+    float                 energyMin;                 //!< The minimal Energy a Projectile needs to be emitted.
+    bool                  bChargeable;               //!< if the Projectile is Charegeable
+
+    float                 lifeCycle;                 //!< The percentage of the Lifetime done [0-1]
+    float                 lifeSpan;                  //!< The entire lifespan of the Shoot. in seconds
+
+    Vector                flightDirection;           //!< DOF direction in which the shoot flighs
+
+    Vector                velocity;                  //!< velocity of the projectile.
+
+    PNode*                target;                    //!< A target for guided Weapons.
+};
+
+#endif /* _PROJECTILE_H */
Index: trunk/src/world_entities/projectiles/rocket.cc
===================================================================
--- trunk/src/world_entities/projectiles/rocket.cc	(revision 6434)
+++ trunk/src/world_entities/projectiles/rocket.cc	(revision 6434)
@@ -0,0 +1,184 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific
+   main-programmer: Patrick Boenzli
+   co-programmer: Benjamin Grauer
+
+*/
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
+
+#include "rocket.h"
+
+#include "fast_factory.h"
+
+#include "state.h"
+#include "class_list.h"
+
+#include "particle_engine.h"
+#include "particle_emitter.h"
+#include "particle_system.h"
+
+
+using namespace std;
+
+CREATE_FAST_FACTORY_STATIC(Rocket, CL_ROCKET);
+
+/**
+ *  standard constructor
+*/
+Rocket::Rocket () : Projectile()
+{
+  this->setClassID(CL_TEST_BULLET, "Rocket");
+
+  float modelSize = .3;
+  this->loadModel("models/projectiles/orx-rocket.obj", .3);
+
+  this->setMinEnergy(1);
+  this->setMaxEnergy(10);
+  this->lifeSpan = 5;
+
+  this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5);
+  this->emitter->setParent(this);
+  this->emitter->setSpread(M_PI, M_PI);
+}
+
+
+/**
+ *  standard deconstructor
+*/
+Rocket::~Rocket ()
+{
+  // delete this->emitter;
+
+  /* this is normaly done by World.cc by deleting the ParticleEngine */
+  if (Rocket::trailParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
+  {
+    if (ClassList::exists(Rocket::trailParticles, CL_PARTICLE_SYSTEM))
+      delete Rocket::trailParticles;
+    Rocket::trailParticles = NULL;
+  }
+  if (Rocket::explosionParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
+  {
+    if (ClassList::exists(Rocket::explosionParticles, CL_PARTICLE_SYSTEM))
+      delete Rocket::explosionParticles;
+    Rocket::explosionParticles = NULL;
+  }
+
+}
+
+ParticleSystem* Rocket::trailParticles = NULL;
+ParticleSystem* Rocket::explosionParticles = NULL;
+
+void Rocket::activate()
+{
+  if (unlikely(Rocket::trailParticles == NULL))
+  {
+    Rocket::trailParticles = new ParticleSystem(2000, PARTICLE_SPRITE);
+    Rocket::trailParticles->setName("RocketTrailParticles");
+    Rocket::trailParticles->setMaterialTexture("maps/radial-trans-noise.png");
+    Rocket::trailParticles->setLifeSpan(1.0, .3);
+    Rocket::trailParticles->setRadius(0.0, .5);
+    Rocket::trailParticles->setRadius(0.2, 2.0);
+    Rocket::trailParticles->setRadius(.5, .8);
+    Rocket::trailParticles->setRadius(1.0, .8);
+    Rocket::trailParticles->setColor(0.0, 1,0,0,.7);
+    Rocket::trailParticles->setColor(0.2, .8,.8,0,.5);
+    Rocket::trailParticles->setColor(0.5, .8,.8,.8,.8);
+    Rocket::trailParticles->setColor(1.0, .8,.8,.8,.0);
+  }
+  if (unlikely(Rocket::explosionParticles == NULL))
+  {
+    Rocket::explosionParticles = new ParticleSystem(200, PARTICLE_SPRITE);
+    Rocket::explosionParticles->setName("RocketExplosionParticles");
+    Rocket::explosionParticles->setMaterialTexture("maps/radial-trans-noise.png");
+    Rocket::explosionParticles->setLifeSpan(.5, .3);
+    Rocket::explosionParticles->setRadius(0.0, 10);
+    Rocket::explosionParticles->setRadius(.5, 15.0);
+    Rocket::explosionParticles->setRadius(1.0, 10.0);
+    Rocket::explosionParticles->setColor(0.0, 0,1,0,1);
+    Rocket::explosionParticles->setColor(0.5, .8,.8,0,.8);
+    Rocket::explosionParticles->setColor(0.8, .8,.8,.3,.8);
+    Rocket::explosionParticles->setColor(1.0, 1,1,1,.0);
+  }
+
+  ParticleEngine::getInstance()->addConnection(this->emitter, Rocket::trailParticles);
+
+  this->updateNode(0);
+  this->emitter->setEmissionRate(45.0);
+  this->emitter->setEmissionVelocity(0.0);
+}
+
+
+void Rocket::deactivate()
+{
+  ParticleEngine::getInstance()->breakConnections(this->emitter);
+  this->lifeCycle = 0.0;
+  this->toList(OM_NULL);
+
+//  GarbageCollector::getInstance()->collect(this);
+  this->toList(OM_DEAD);
+  Rocket::fastFactory->kill(this);
+}
+
+
+void Rocket::collidesWith(WorldEntity* entity, const Vector& location)
+{
+  if (this->hitEntity != entity)
+    this->destroy();
+  this->hitEntity = entity;
+}
+
+/**
+ *  signal tick, time dependent things will be handled here
+ * @param time since last tick
+*/
+void Rocket::tick (float dt)
+{
+  //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
+  Vector v = this->velocity * (dt);
+  this->shiftCoor(v);
+
+  if(this->tickLifeCycle(dt))
+    this->deactivate();
+}
+
+/**
+ *  the function gets called, when the projectile is destroyed
+*/
+void Rocket::destroy ()
+{
+  PRINTF(5)("DESTROY Rocket\n");
+  this->lifeCycle = .95; //!< @todo calculate this usefully.
+  ParticleEngine::getInstance()->breakConnection(this->emitter, Rocket::trailParticles);
+  ParticleEngine::getInstance()->addConnection(this->emitter, Rocket::explosionParticles);
+
+  this->emitter->setEmissionRate(1000.0);
+  this->emitter->setEmissionVelocity(50.0);
+//  this->deactivate();
+
+}
+
+
+void Rocket::draw () const
+{
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+
+  float matrix[4][4];
+  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
+  this->getAbsDir().matrix (matrix);
+  glMultMatrixf((float*)matrix);
+  glScalef(2.0, 2.0, 2.0);
+  this->getModel()->draw();
+
+  glPopMatrix();
+}
+
Index: trunk/src/world_entities/projectiles/rocket.h
===================================================================
--- trunk/src/world_entities/projectiles/rocket.h	(revision 6434)
+++ trunk/src/world_entities/projectiles/rocket.h	(revision 6434)
@@ -0,0 +1,47 @@
+/*!
+ * @file rocket.h
+ * @brief a Rocket Projectile
+*/
+
+#ifndef _ROCKET_H
+#define _ROCKET_H
+
+#include "projectile.h"
+
+class Vector;
+class Weapon;
+class ParticleSystem;
+class ParticleEmitter;
+class FastFactory;
+
+class Rocket : public Projectile
+{
+  public:
+    Rocket ();
+    virtual ~Rocket ();
+
+
+    virtual void activate();
+    virtual void deactivate();
+
+    virtual void collidesWith(WorldEntity* entity, const Vector& location);
+
+    virtual void destroy ();
+
+    virtual void tick (float time);
+    virtual void draw () const;
+
+
+  private:
+    static FastFactory*               fastFactory;
+    static ParticleSystem*            trailParticles;
+    static ParticleSystem*            explosionParticles;
+
+    ParticleEmitter*                  emitter;
+
+
+    WorldEntity* hitEntity; // FIXME TEMPORARY
+
+};
+
+#endif /* _ROCKET_H */
Index: trunk/src/world_entities/projectiles/test_bullet.cc
===================================================================
--- trunk/src/world_entities/projectiles/test_bullet.cc	(revision 6434)
+++ trunk/src/world_entities/projectiles/test_bullet.cc	(revision 6434)
@@ -0,0 +1,183 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific
+   main-programmer: Patrick Boenzli
+   co-programmer: Benjamin Grauer
+
+*/
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
+
+#include "test_bullet.h"
+
+#include "fast_factory.h"
+
+#include "state.h"
+#include "class_list.h"
+
+#include "particle_engine.h"
+#include "particle_emitter.h"
+#include "particle_system.h"
+
+
+using namespace std;
+
+CREATE_FAST_FACTORY_STATIC(TestBullet, CL_TEST_BULLET);
+
+/**
+ *  standard constructor
+*/
+TestBullet::TestBullet () : Projectile()
+{
+  this->setClassID(CL_TEST_BULLET, "TestBullet");
+
+  float modelSize = .3;
+  this->loadModel("models/projectiles/orx-rocket.obj", .3);
+
+  this->setMinEnergy(1);
+  this->setMaxEnergy(10);
+  this->lifeSpan = 2;
+
+  this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5);
+  this->emitter->setParent(this);
+  this->emitter->setSpread(M_PI, M_PI);
+}
+
+
+/**
+ *  standard deconstructor
+*/
+TestBullet::~TestBullet ()
+{
+  // delete this->emitter;
+
+  /* this is normaly done by World.cc by deleting the ParticleEngine */
+  if (TestBullet::trailParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
+  {
+    if (ClassList::exists(TestBullet::trailParticles, CL_PARTICLE_SYSTEM))
+      delete TestBullet::trailParticles;
+    TestBullet::trailParticles = NULL;
+  }
+  if (TestBullet::explosionParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
+  {
+    if (ClassList::exists(TestBullet::explosionParticles, CL_PARTICLE_SYSTEM))
+      delete TestBullet::explosionParticles;
+    TestBullet::explosionParticles = NULL;
+  }
+
+}
+
+ParticleSystem* TestBullet::trailParticles = NULL;
+ParticleSystem* TestBullet::explosionParticles = NULL;
+
+void TestBullet::activate()
+{
+  if (unlikely(TestBullet::trailParticles == NULL))
+  {
+    TestBullet::trailParticles = new ParticleSystem(1000, PARTICLE_SPRITE);
+    TestBullet::trailParticles->setName("TestBulletTrailParticles");
+    TestBullet::trailParticles->setLifeSpan(.5, .3);
+    TestBullet::trailParticles->setRadius(0.0, .5);
+    TestBullet::trailParticles->setRadius(0.5, 2.0);
+    TestBullet::trailParticles->setRadius(1.0, 5.0);
+    TestBullet::trailParticles->setColor(0.0, 1,0,0,.7);
+    TestBullet::trailParticles->setColor(0.5, .8,.8,0,.5);
+    TestBullet::trailParticles->setColor(1.0, .7,.7,.7,.0);
+  }
+  if (unlikely(TestBullet::explosionParticles == NULL))
+  {
+    TestBullet::explosionParticles = new ParticleSystem(1000, PARTICLE_SPRITE);
+    TestBullet::explosionParticles->setName("TestBulletExplosionParticles");
+    TestBullet::explosionParticles->setLifeSpan(.5, .3);
+    TestBullet::explosionParticles->setRadius(0.0, 10);
+    TestBullet::explosionParticles->setRadius(.5, 20.0);
+    TestBullet::explosionParticles->setRadius(1.0, 3.0);
+    TestBullet::explosionParticles->setColor(0.0, 0,1,0,.9);
+    TestBullet::explosionParticles->setColor(0.5, .8,.8,0,.5);
+    TestBullet::explosionParticles->setColor(1.0, 1,1,1,.0);
+  }
+
+  ParticleEngine::getInstance()->addConnection(this->emitter, TestBullet::trailParticles);
+
+  this->emitter->setEmissionRate(20.0);
+  this->emitter->setEmissionVelocity(3.0);
+}
+
+
+void TestBullet::deactivate()
+{
+  ParticleEngine::getInstance()->breakConnections(this->emitter);
+  this->lifeCycle = 0.0;
+  this->toList(OM_NULL);
+
+  TestBullet::fastFactory->kill(this);
+}
+
+
+void TestBullet::collidesWith(WorldEntity* entity, const Vector& location)
+{
+  if (this->hitEntity != entity && entity->isA(CL_NPC))
+    this->destroy();
+  this->hitEntity = entity;
+}
+
+/**
+ *  signal tick, time dependent things will be handled here
+ * @param time since last tick
+*/
+void TestBullet::tick (float time)
+{
+  //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
+  Vector v = this->velocity * (time);
+  this->shiftCoor(v);
+
+  this->lifeCycle += time/this->lifeSpan;
+  if( this->lifeCycle >= 1.0)
+    {
+      PRINTF(5)("FINALIZE==========================\n");
+      PRINTF(5)("current life cycle is: %f\n", this->lifeCycle);
+      PRINTF(5)("FINALIZE===========================\n");
+
+      this->deactivate();
+    }
+}
+
+/**
+ *  the function gets called, when the projectile is destroyed
+*/
+void TestBullet::destroy ()
+{
+  PRINTF(5)("DESTROY TestBullet\n");
+  this->lifeCycle = .95; //!< @todo calculate this usefully.
+  ParticleEngine::getInstance()->breakConnection(this->emitter, TestBullet::trailParticles);
+  ParticleEngine::getInstance()->addConnection(this->emitter, TestBullet::explosionParticles);
+
+  this->emitter->setEmissionRate(30.0);
+  this->emitter->setEmissionVelocity(50.0);
+//  this->deactivate();
+
+}
+
+
+void TestBullet::draw () const
+{
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+
+  float matrix[4][4];
+  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
+  this->getAbsDir().matrix (matrix);
+  glMultMatrixf((float*)matrix);
+  glScalef(2.0, 2.0, 2.0);
+  this->getModel()->draw();
+
+  glPopMatrix();
+}
+
Index: trunk/src/world_entities/projectiles/test_bullet.h
===================================================================
--- trunk/src/world_entities/projectiles/test_bullet.h	(revision 6434)
+++ trunk/src/world_entities/projectiles/test_bullet.h	(revision 6434)
@@ -0,0 +1,47 @@
+/*!
+    \projectile.h
+  *  a projectile, that is been shooted by a weapon
+*/
+
+#ifndef _TEST_BULLET_H
+#define _TEST_BULLET_H
+
+#include "projectile.h"
+
+class Vector;
+class Weapon;
+class ParticleSystem;
+class ParticleEmitter;
+class FastFactory;
+
+class TestBullet : public Projectile
+{
+  public:
+    TestBullet ();
+    virtual ~TestBullet ();
+
+
+    virtual void activate();
+    virtual void deactivate();
+
+    virtual void collidesWith(WorldEntity* entity, const Vector& location);
+
+    virtual void destroy ();
+
+    virtual void tick (float time);
+    virtual void draw () const;
+
+
+  private:
+    static FastFactory*               fastFactory;
+    static ParticleSystem*            trailParticles;
+    static ParticleSystem*            explosionParticles;
+
+    ParticleEmitter*                  emitter;
+
+
+    WorldEntity* hitEntity; // FIXME TEMPORARY
+
+};
+
+#endif /* _TEST_BULLET_H */
Index: trunk/src/world_entities/weapons/aiming_turret.cc
===================================================================
--- trunk/src/world_entities/weapons/aiming_turret.cc	(revision 6433)
+++ trunk/src/world_entities/weapons/aiming_turret.cc	(revision 6434)
@@ -19,5 +19,5 @@
 #include "weapon_manager.h"
 #include "aim.h"
-#include "projectile.h"
+#include "world_entities/projectiles/projectile.h"
 
 #include "model.h"
Index: trunk/src/world_entities/weapons/bomb.cc
===================================================================
--- trunk/src/world_entities/weapons/bomb.cc	(revision 6433)
+++ 	(revision )
@@ -1,199 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: Stefan Lienhard
-   co-programmer: ...
-*/
-
-#include "bomb.h"
-#include "glincl.h"
-#include "state.h"
-#include "model.h"
-#include "primitive_model.h"
-
-#include "fast_factory.h"
-
-
-#include "object_manager.h"
-
-#include "particle_engine.h"
-#include "particle_emitter.h"
-#include "particle_system.h"
-
-using namespace std;
-
-CREATE_FAST_FACTORY_STATIC(Bomb, CL_BOMB);
-
-/**
- * constructs and loads a Bomb from a XML-element
- * @param root the XML-element to load from
- */
-Bomb::Bomb(const TiXmlElement* root)
-{
-  this->init();
-  if (root != NULL)
-    this->loadParams(root);
-
-  float modelSize = 1.0;
-  this->loadModel("models/projectiles/RadioActiveBomb.obj", 1.0);
-
-  this->setMinEnergy(1);
-  this->setMaxEnergy(10);
-
-  this->lifeSpan = 15;
-
-  this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5);
-  this->emitter->setParent(this);
-  this->emitter->setSpread(M_PI, M_PI);
-}
-
-
-/**
- * standard deconstructor
- */
-Bomb::~Bomb ()
-{
-  delete this->detonationSphere;
-  delete this->detonationMaterial;
-
-}
-
-
-/**
- * initializes the Bomb
- * @todo change this to what you wish
- */
-void Bomb::init()
-{
-  this->setClassID(CL_BOMB, "Bomb");
-
-
-  this->detonationSphere = new PrimitiveModel(PRIM_SPHERE);
-  this->detonationMaterial = new Material();
-  this->detonationMaterial->setDiffuse(1, 0, 0);
-  //   this->detonationMaterial->setTransparency(.1);
-  /**
-   * @todo: Write CL_PROTO_WORLD_ENTITY INTO THE src/defs/class_id.h (your own definition)
-   */
-
-}
-
-
-/**
- * loads a Bomb from a XML-element
- * @param root the XML-element to load from
- * @todo make the class Loadable
- */
-void Bomb::loadParams(const TiXmlElement* root)
-{
-  // all the clases this Entity is directly derived from must be called in this way, to load all settings.
-  static_cast<WorldEntity*>(this)->loadParams(root);
-
-
-  /**
-   * @todo: make the class Loadable
-   */
-}
-
-
-/**
- * advances the Bomb about time seconds
- * @param time the Time to step
- */
-void Bomb::tick(float time)
-{
-  this->lifeCycle += time/this->lifeSpan;
-  if( this->lifeCycle >= 1.0)
-    {
-      PRINTF(5)("FINALIZE==========================\n");
-      PRINTF(5)("current life cycle is: %f\n", this->lifeCycle);
-      PRINTF(5)("FINALIZE===========================\n");
-
-      this->deactivate();
-    }
-  else if (this->lifeCycle > 0.9f)
-    this->detonate ((this->lifeCycle-.89) *1000.0);
-  else
-  {
-    Vector v = this->velocity * (time);
-    this->shiftCoor(v);
-  }
-}
-
-/**
- * draws this worldEntity
- */
-void Bomb::draw () const
-{
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-  float matrix[4][4];
-
-  /* translate */
-  glTranslatef (this->getAbsCoor ().x,
-                this->getAbsCoor ().y,
-                this->getAbsCoor ().z);
-  /* rotate */
-  this->getAbsDir().matrix(matrix);
-  glMultMatrixf((float*)matrix);
-
-  if (this->lifeCycle < .9)
-  {
-    if (this->getModel() != NULL)
-      this->getModel()->draw();
-  }
-  else
-  {
-    glScalef((this->lifeCycle-.89) *1000.0,
-              (this->lifeCycle-.89) *1000.0,
-              (this->lifeCycle-.89) *1000.0);
-    this->detonationMaterial->select();
-    this->detonationSphere->draw();
-  }
-  glPopMatrix();
-}
-
-
-/**
- *
- *
- */
-void Bomb::collidesWith (WorldEntity* entity, const Vector& location)
-{
-  if (this->lifeCycle < .9f && entity->isA(CL_NPC))
-    this->lifeCycle = 0.9f;
-}
-
-void Bomb::activate()
-{
-
-}
-
-void Bomb::deactivate()
-{
-  this->toList(OM_DEAD);
-  this->lifeCycle = 0.0f;
-  Bomb::fastFactory->kill(this);
-}
-
-void Bomb::detonate(float size)
-{
-  std::list<WorldEntity*>* detonationList = ObjectManager::distanceFromObject(*this, size, CL_NPC);
-  if (detonationList != NULL)
-  {
-    while( !detonationList->empty() )
-    {
-      detonationList->front()->collidesWith(this, Vector(0,0,0));
-      detonationList->pop_front();
-    }
-    delete detonationList;
-  }
-}
Index: trunk/src/world_entities/weapons/bomb.h
===================================================================
--- trunk/src/world_entities/weapons/bomb.h	(revision 6433)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*!
- * @file bomb.h
- * @brief description
-*/
-
-#ifndef _BOMB_H
-#define _BOMB_H
-
-#include "projectile.h"
-
-class FastFactory;
-class ParticleSystem;
-class ParticleEmitter;
-class Material;
-
-//! A Class to ...
-class Bomb : public Projectile
-{
-
- public:
-  Bomb(const TiXmlElement* root = NULL);
-  virtual ~Bomb();
-
-  void loadParams(const TiXmlElement* root);
-  void init();
-
-//  virtual void postSpawn ();
-//  virtual void leftWorld ();
-
-
-  virtual void draw() const;
-  virtual void tick(float time);
-  virtual void collidesWith (WorldEntity* entity, const Vector& location);
-  virtual void activate();
-  virtual void deactivate();
-
-  void detonate(float size);
-
- private:
-  static FastFactory*               fastFactory;
-  static ParticleSystem*            trailParticles;
-  static ParticleSystem*            explosionParticles;
-
-  ParticleEmitter*                  emitter;
-  Model*                            detonationSphere;
-  Material*                         detonationMaterial;
-};
-
-#endif /* BOMB */
Index: trunk/src/world_entities/weapons/cannon.cc
===================================================================
--- trunk/src/world_entities/weapons/cannon.cc	(revision 6433)
+++ trunk/src/world_entities/weapons/cannon.cc	(revision 6434)
@@ -25,5 +25,5 @@
 #include "world_entity.h"
 #include "model.h"
-#include "test_bullet.h"
+#include "world_entities/projectiles/projectile.h"
 #include "weapon_manager.h"
 #include "factory.h"
Index: trunk/src/world_entities/weapons/guided_missile.cc
===================================================================
--- trunk/src/world_entities/weapons/guided_missile.cc	(revision 6433)
+++ 	(revision )
@@ -1,211 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific
-   main-programmer: Silvan Nellen
-   co-programmer:
-
-*/
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
-
-#include "guided_missile.h"
-
-#include "fast_factory.h"
-
-#include "state.h"
-#include "class_list.h"
-
-#include "particle_engine.h"
-#include "particle_emitter.h"
-#include "particle_system.h"
-
-using namespace std;
-
-CREATE_FAST_FACTORY_STATIC(GuidedMissile, CL_GUIDED_MISSILE);
-
-/**
- *  standard constructor
-*/
-GuidedMissile::GuidedMissile () : Projectile()
-{
-  this->setClassID(CL_GUIDED_MISSILE, "GuidedMissile");
-
-  float modelSize = .3;
-  this->loadModel("models/projectiles/orx-rocket.obj", .3);
-
-  this->setMinEnergy(1);
-  this->setMaxEnergy(10);
-  this->lifeSpan = 10.0;
-  this->agility = 500;
-  this->maxVelocity = 75;
-
-  this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5);
-  this->emitter->setParent(this);
-  this->emitter->setSpread(M_PI, M_PI);
-}
-
-
-/**
- *  standard deconstructor
-*/
-GuidedMissile::~GuidedMissile ()
-{
-  // delete this->emitter;
-
-  /* this is normaly done by World.cc by deleting the ParticleEngine */
-  if (GuidedMissile::trailParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
-  {
-    if (ClassList::exists(GuidedMissile::trailParticles, CL_PARTICLE_SYSTEM))
-      delete GuidedMissile::trailParticles;
-    GuidedMissile::trailParticles = NULL;
-  }
-  if (GuidedMissile::explosionParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
-  {
-    if (ClassList::exists(GuidedMissile::explosionParticles, CL_PARTICLE_SYSTEM))
-      delete GuidedMissile::explosionParticles;
-    GuidedMissile::explosionParticles = NULL;
-  }
-
-}
-
-ParticleSystem* GuidedMissile::trailParticles = NULL;
-ParticleSystem* GuidedMissile::explosionParticles = NULL;
-
-
-
-void GuidedMissile::activate()
-{
-  if (unlikely(GuidedMissile::trailParticles == NULL))
-  {
-    GuidedMissile::trailParticles = new ParticleSystem(2000, PARTICLE_SPRITE);
-    GuidedMissile::trailParticles->setName("GuidedMissileTrailParticles");
-    GuidedMissile::trailParticles->setMaterialTexture("maps/radial-trans-noise.png");
-    GuidedMissile::trailParticles->setLifeSpan(1.0, .3);
-    GuidedMissile::trailParticles->setRadius(0.0, .5);
-    GuidedMissile::trailParticles->setRadius(0.2, 2.0);
-    GuidedMissile::trailParticles->setRadius(.5, .8);
-    GuidedMissile::trailParticles->setRadius(1.0, .8);
-    GuidedMissile::trailParticles->setColor(0.0, 1,0,0,.7);
-    GuidedMissile::trailParticles->setColor(0.2, .8,.8,0,.5);
-    GuidedMissile::trailParticles->setColor(0.5, .8,.8,.8,.8);
-    GuidedMissile::trailParticles->setColor(1.0, .8,.8,.8,.0);
-  }
-  if (unlikely(GuidedMissile::explosionParticles == NULL))
-  {
-    GuidedMissile::explosionParticles = new ParticleSystem(200, PARTICLE_SPRITE);
-    GuidedMissile::explosionParticles->setName("GuidedMissileExplosionParticles");
-    GuidedMissile::explosionParticles->setMaterialTexture("maps/radial-trans-noise.png");
-    GuidedMissile::explosionParticles->setLifeSpan(.5, .3);
-    GuidedMissile::explosionParticles->setRadius(0.0, 10);
-    GuidedMissile::explosionParticles->setRadius(.5, 15.0);
-    GuidedMissile::explosionParticles->setRadius(1.0, 10.0);
-    GuidedMissile::explosionParticles->setColor(0.0, 0,1,0,1);
-    GuidedMissile::explosionParticles->setColor(0.5, .8,.8,0,.8);
-    GuidedMissile::explosionParticles->setColor(0.8, .8,.8,.3,.8);
-    GuidedMissile::explosionParticles->setColor(1.0, 1,1,1,.0);
-  }
-
-  ParticleEngine::getInstance()->addConnection(this->emitter, GuidedMissile::trailParticles);
-
-  this->updateNode(0);
-  this->emitter->setEmissionRate(45.0);
-  this->emitter->setEmissionVelocity(0.0);
-}
-
-
-void GuidedMissile::deactivate()
-{
-  ParticleEngine::getInstance()->breakConnections(this->emitter);
-  this->lifeCycle = 0.0;
-
-  this->toList(OM_DEAD);
-  this->removeNode();
-  GuidedMissile::fastFactory->kill(this);
-}
-
-
-void GuidedMissile::collidesWith(WorldEntity* entity, const Vector& location)
-{
-  if (this->hitEntity != entity)
-    this->destroy();
-  this->hitEntity = entity;
-}
-
-/**
- *  signal tick, time dependent things will be handled here
- * @param time since last tick
-*/
-void GuidedMissile::tick (float time)
-{
-
-
-if (this->target != NULL && this->target->getParent() != PNode::getNullParent())
-   {
-    speed = velocity.len();
-    diffVector = ((target->getAbsCoor() - this->getAbsCoor()).getNormalized());
-
-    if(velocity.dot(diffVector) != 0)
-     {
-     correctionVector = (( ( diffVector *  (speed * speed/( velocity.dot(diffVector ) ) )) - velocity).getNormalized()) * agility;
-
-      if( (diffVector *  (speed * speed/( velocity.dot(diffVector ) ) ) -velocity).len() < agility )
-       velocity = ((diffVector *  (speed * speed/( velocity.dot(diffVector ) ) )).getNormalized())*agility;
-      else if(velocity.dot(diffVector) > 0)
-        velocity += correctionVector;
-      else if (velocity.dot(diffVector) < 0)
-        velocity -= correctionVector;
-     }
-    else
-      velocity += diffVector * agility;
-
-     this->setAbsDir(Quaternion(velocity, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0)));
-   }
-
-  velocity *= maxVelocity/velocity.len();
-  Vector v = this->velocity * (time);
-  this->shiftCoor(v);
-
-  if(this->tickLifeCycle(time))
-    this->deactivate();
-}
-
-/**
- *  the function gets called, when the projectile is destroyed
- */
-void GuidedMissile::destroy ()
-{
-  PRINTF(5)("DESTROY GuidedMissile\n");
-  this->lifeCycle = .95; //!< @todo calculate this usefully.
-  ParticleEngine::getInstance()->breakConnection(this->emitter, GuidedMissile::trailParticles);
-  ParticleEngine::getInstance()->addConnection(this->emitter, GuidedMissile::explosionParticles);
-
-  this->emitter->setEmissionRate(1000.0);
-  this->emitter->setEmissionVelocity(50.0);
-//  this->deactivate();
-
-}
-
-
-void GuidedMissile::draw () const
-{
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-
-  float matrix[4][4];
-  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
-  this->getAbsDir().matrix (matrix);
-  glMultMatrixf((float*)matrix);
-  glScalef(2.0, 2.0, 2.0);
-  this->getModel()->draw();
-
-  glPopMatrix();
-
-}
-
Index: trunk/src/world_entities/weapons/guided_missile.h
===================================================================
--- trunk/src/world_entities/weapons/guided_missile.h	(revision 6433)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*!
- * @file guided_missile.h
- * @brief a GuidedMissile Projectile
-*/
-
-#ifndef _GUIDED_MISSILE_H
-#define _GUIDED_MISSILE_H
-
-#include "projectile.h"
-
-class Weapon;
-class ParticleSystem;
-class ParticleEmitter;
-class FastFactory;
-class Aim;
-
-class GuidedMissile : public Projectile
-{
-  public:
-    GuidedMissile ();
-    virtual ~GuidedMissile ();
-
-    virtual void activate();
-    virtual void deactivate();
-
-    virtual void collidesWith(WorldEntity* entity, const Vector& location);
-
-    virtual void destroy ();
-
-    virtual void tick (float time);
-    virtual void draw () const;
-
-
-  private:
-    static FastFactory*               fastFactory;
-    static ParticleSystem*            trailParticles;
-    static ParticleSystem*            explosionParticles;
-
-    ParticleEmitter*                  emitter;
-    float                             agility;
-    float                             maxVelocity;
-    float                             speed;
-    Vector                            diffVector ;
-    Vector                            correctionVector;
-
-    WorldEntity* hitEntity; // FIXME TEMPORARY
-
-};
-
-#endif /* _GUIDED_MISSILE_H */
Index: trunk/src/world_entities/weapons/laser.cc
===================================================================
--- trunk/src/world_entities/weapons/laser.cc	(revision 6433)
+++ 	(revision )
@@ -1,152 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific
-   main-programmer: Patrick Boenzli
-   co-programmer: Benjamin Grauer
-
-*/
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
-
-#include "laser.h"
-
-#include "fast_factory.h"
-
-#include "state.h"
-#include "class_list.h"
-#include "model.h"
-
-#include "particle_engine.h"
-#include "particle_emitter.h"
-#include "particle_system.h"
-
-
-using namespace std;
-
-CREATE_FAST_FACTORY_STATIC(Laser, CL_LASER);
-
-/**
- *  standard constructor
-*/
-Laser::Laser () : Projectile()
-{
-  this->setClassID(CL_LASER, "Laser");
-
-  this->loadModel("models/projectiles/laser.obj");
-
-  this->setMinEnergy(1);
-  this->setMaxEnergy(10);
-  this->lifeSpan = 5.0;
-
-  this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5);
-  this->emitter->setParent(this);
-  this->emitter->setSpread(M_PI, M_PI);
-  this->emitter->setEmissionRate(300.0);
-  this->emitter->setEmissionVelocity(50.0);
-}
-
-
-/**
- *  standard deconstructor
-*/
-Laser::~Laser ()
-{
-  // delete this->emitter;
-
-  /* this is normaly done by World.cc by deleting the ParticleEngine */
-  if (Laser::explosionParticles != NULL && ClassList::getList(CL_LASER)->size() <= 1)
-  {
-    //if (ClassList::exists(Laser::explosionParticles, CL_PARTICLE_SYSTEM))
-    //  delete Laser::explosionParticles;
-    PRINTF(1)("Deleting Laser Particles\n");
-    Laser::explosionParticles = NULL;
-  }
-
-}
-
-ParticleSystem* Laser::explosionParticles = NULL;
-
-void Laser::activate()
-{
-  if (unlikely(Laser::explosionParticles == NULL))
-  {
-    Laser::explosionParticles = new ParticleSystem(1000, PARTICLE_SPRITE);
-    Laser::explosionParticles->setName("LaserExplosionParticles");
-    Laser::explosionParticles->setLifeSpan(.5, .3);
-    Laser::explosionParticles->setRadius(0.0, 10.0);
-    Laser::explosionParticles->setRadius(.5, 6.0);
-    Laser::explosionParticles->setRadius(1.0, 3.0);
-    Laser::explosionParticles->setColor(0.0, 1,1,0,.9);
-    Laser::explosionParticles->setColor(0.5, .8,.8,0,.5);
-    Laser::explosionParticles->setColor(1.0, .8,.8,.7,.0);
-  }
-}
-
-
-void Laser::deactivate()
-{
-  ParticleEngine::getInstance()->breakConnections(this->emitter);
-  this->lifeCycle = 0.0;
-
-  this->toList(OM_NULL);
-  this->removeNode();
-  Laser::fastFactory->kill(this);
-}
-
-
-void Laser::collidesWith(WorldEntity* entity, const Vector& location)
-{
-  if (this->hitEntity != entity && entity->isA(CL_NPC))
-    this->destroy();
-  this->hitEntity = entity;
-}
-
-/**
- *  signal tick, time dependent things will be handled here
- * @param dt time since last tick
-*/
-void Laser::tick (float dt)
-{
-  //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
-  Vector v = this->velocity * dt;
-  this->shiftCoor(v);
-
-  if (this->tickLifeCycle(dt))
-    this->deactivate();
-}
-
-/**
- *  the function gets called, when the projectile is destroyed
-*/
-void Laser::destroy ()
-{
-  PRINTF(5)("DESTROY Laser\n");
-  this->lifeCycle = .95; //!< @todo calculate this usefully.
-  ParticleEngine::getInstance()->addConnection(this->emitter, Laser::explosionParticles);
-}
-
-
-void Laser::draw () const
-{
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-  glPushAttrib(GL_ENABLE_BIT);
-  glDisable(GL_LIGHTING);
-
-  float matrix[4][4];
-  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
-  this->getAbsDir().matrix (matrix);
-  glMultMatrixf((float*)matrix);
-  glScalef(2.0, 2.0, 2.0);
-  this->getModel()->draw();
-  glPopAttrib();
-  glPopMatrix();
-}
-
Index: trunk/src/world_entities/weapons/laser.h
===================================================================
--- trunk/src/world_entities/weapons/laser.h	(revision 6433)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*!
- * @file laser.h
- * @brief a projectile, that is been shooted by a weapon
-*/
-
-#ifndef _LASER_H
-#define _LASER_H
-
-#include "projectile.h"
-
-class Vector;
-class Weapon;
-class ParticleSystem;
-class ParticleEmitter;
-class FastFactory;
-
-class Laser : public Projectile
-{
-  public:
-    Laser ();
-    virtual ~Laser ();
-
-
-    virtual void activate();
-    virtual void deactivate();
-
-    virtual void collidesWith(WorldEntity* entity, const Vector& location);
-
-    virtual void destroy ();
-
-    virtual void tick (float dt);
-    virtual void draw () const;
-
-
-  private:
-    static FastFactory*               fastFactory;
-
-    static ParticleSystem*            explosionParticles;
-
-    ParticleEmitter*                  emitter;
-
-
-    WorldEntity* hitEntity; // FIXME TEMPORARY
-};
-
-#endif /* _LASER_H */
Index: trunk/src/world_entities/weapons/projectile.cc
===================================================================
--- trunk/src/world_entities/weapons/projectile.cc	(revision 6433)
+++ 	(revision )
@@ -1,117 +1,0 @@
-
-
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific
-   main-programmer: Patrick Boenzli
-   co-programmer:
-*/
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
-
-#include "projectile.h"
-
-#include "world_entity.h"
-#include "weapon.h"
-#include "model.h"
-
-using namespace std;
-
-
-/**
- *  standard constructor
-*/
-Projectile::Projectile () : WorldEntity()
-{
-  this->setClassID(CL_PROJECTILE, "Projectile");
-
-  this->lifeCycle = 0.0;
-  this->lifeSpan = 1.0f; /* sec */
-  this->target = NULL;
-  this->removeNode();
-}
-
-
-/**
- *  standard deconstructor
-*/
-Projectile::~Projectile ()
-{
-  /*
-     do not delete the test projectModel, since it is pnode
-     and will be cleaned out by world
-  */
-  //delete this->projectileModel;
-}
-
-
-void Projectile::setMinEnergy(float energyMin)
-{
-  this->energyMin = energyMin;
-}
-
-
-/**
- *  this sets the flight direction of the projectile
- * @param directin in which to flight
-
-   this function will calculate a vector out of this to be used in the
-   tick function
-*/
-void Projectile::setFlightDirection(const Quaternion& flightDirection)
-{
-  Vector v(1, 0, 0);
-  this->flightDirection = flightDirection.apply(v);
-  this->flightDirection.normalize();
-}
-
-/**
- *  sets the velocity vector to a spec speed
- * @param velocity: vector of the velocity
-*/
-void Projectile::setVelocity(const Vector &velocity)
-{
-  //Vector offsetVel =
-  this->velocity = velocity;
- // offsetVel.normalize();
-  //this->velocity += (offsetVel * 50.0);
-}
-
-
-
-void Projectile::setTarget(PNode* target)
-{
-  if (this->target == NULL)
-    this->target = new PNode(target, PNODE_PARENT_MODE_DEFAULT | PNODE_REPARENT_ON_PARENTS_REMOVE);
-  else
-    this->target->setParent(target);
-}
-
-
-/**
- * signal tick, time dependent things will be handled here
- * @param dt since last tick
-*/
-void Projectile::tick (float dt)
-{
-  Vector v = this->velocity * (dt);
-  this->shiftCoor(v);
-
-  if (this->tickLifeCycle(dt))
-    this->destroy();
-}
-
-
-/**
- *  the function gets called, when the projectile is destroyed
-*/
-void Projectile::destroy ()
-{}
-
Index: trunk/src/world_entities/weapons/projectile.h
===================================================================
--- trunk/src/world_entities/weapons/projectile.h	(revision 6433)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*!
- * @file projectile.h
- * a projectile, that is been shooted by a weapon
- *
- * You can use this class to make some Projectiles/Bullets/Lasers/Rockets/etc.
- *
- */
-
-#ifndef _PROJECTILE_H
-#define _PROJECTILE_H
-
-#include "world_entity.h"
-
-class Projectile : public WorldEntity
-{
-  public:
-    Projectile ();
-    virtual ~Projectile ();
-
-    void setFlightDirection(const Quaternion& flightDirection);
-    void setVelocity(const Vector &velocity);
-    void setLifeSpan(float lifeSpan);
-
-
-    void setMinEnergy(float energyMin);
-    /** @returns the minimal charched energy */
-    inline float getMinEnergy() { return this->energyMin; };
-    /** @returns if the Projectile can be charged */
-    inline bool isChageable() { return this->bChargeable; };
-
-    void setTarget(PNode* target);
-
-    /** @brief This is called, when the Projectile is Emitted */
-    virtual void activate() = 0;
-    /** @brief This is called, when the Projectile is being destroyed, or deleted */
-    virtual void deactivate() = 0;
-
-    virtual void destroy ();
-
-    virtual void tick (float dt);
-    /** @brief convenience function
-     * @param dt the Time passed
-     * @returns true if the Projectile is past its lifeTime, false if it shall still live */
-    inline bool tickLifeCycle(float dt ) { this->lifeCycle += dt/this->lifeSpan;  return(unlikely(this->lifeCycle >= 1)); }
-
-
-  protected:
-    // energy
-    float                 energyMin;                 //!< The minimal Energy a Projectile needs to be emitted.
-    bool                  bChargeable;               //!< if the Projectile is Charegeable
-
-    float                 lifeCycle;                 //!< The percentage of the Lifetime done [0-1]
-    float                 lifeSpan;                  //!< The entire lifespan of the Shoot. in seconds
-
-    Vector                flightDirection;           //!< DOF direction in which the shoot flighs
-
-    Vector                velocity;                  //!< velocity of the projectile.
-
-    PNode*                target;                    //!< A target for guided Weapons.
-};
-
-#endif /* _PROJECTILE_H */
Index: trunk/src/world_entities/weapons/rocket.cc
===================================================================
--- trunk/src/world_entities/weapons/rocket.cc	(revision 6433)
+++ 	(revision )
@@ -1,184 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific
-   main-programmer: Patrick Boenzli
-   co-programmer: Benjamin Grauer
-
-*/
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
-
-#include "rocket.h"
-
-#include "fast_factory.h"
-
-#include "state.h"
-#include "class_list.h"
-
-#include "particle_engine.h"
-#include "particle_emitter.h"
-#include "particle_system.h"
-
-
-using namespace std;
-
-CREATE_FAST_FACTORY_STATIC(Rocket, CL_ROCKET);
-
-/**
- *  standard constructor
-*/
-Rocket::Rocket () : Projectile()
-{
-  this->setClassID(CL_TEST_BULLET, "Rocket");
-
-  float modelSize = .3;
-  this->loadModel("models/projectiles/orx-rocket.obj", .3);
-
-  this->setMinEnergy(1);
-  this->setMaxEnergy(10);
-  this->lifeSpan = 5;
-
-  this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5);
-  this->emitter->setParent(this);
-  this->emitter->setSpread(M_PI, M_PI);
-}
-
-
-/**
- *  standard deconstructor
-*/
-Rocket::~Rocket ()
-{
-  // delete this->emitter;
-
-  /* this is normaly done by World.cc by deleting the ParticleEngine */
-  if (Rocket::trailParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
-  {
-    if (ClassList::exists(Rocket::trailParticles, CL_PARTICLE_SYSTEM))
-      delete Rocket::trailParticles;
-    Rocket::trailParticles = NULL;
-  }
-  if (Rocket::explosionParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
-  {
-    if (ClassList::exists(Rocket::explosionParticles, CL_PARTICLE_SYSTEM))
-      delete Rocket::explosionParticles;
-    Rocket::explosionParticles = NULL;
-  }
-
-}
-
-ParticleSystem* Rocket::trailParticles = NULL;
-ParticleSystem* Rocket::explosionParticles = NULL;
-
-void Rocket::activate()
-{
-  if (unlikely(Rocket::trailParticles == NULL))
-  {
-    Rocket::trailParticles = new ParticleSystem(2000, PARTICLE_SPRITE);
-    Rocket::trailParticles->setName("RocketTrailParticles");
-    Rocket::trailParticles->setMaterialTexture("maps/radial-trans-noise.png");
-    Rocket::trailParticles->setLifeSpan(1.0, .3);
-    Rocket::trailParticles->setRadius(0.0, .5);
-    Rocket::trailParticles->setRadius(0.2, 2.0);
-    Rocket::trailParticles->setRadius(.5, .8);
-    Rocket::trailParticles->setRadius(1.0, .8);
-    Rocket::trailParticles->setColor(0.0, 1,0,0,.7);
-    Rocket::trailParticles->setColor(0.2, .8,.8,0,.5);
-    Rocket::trailParticles->setColor(0.5, .8,.8,.8,.8);
-    Rocket::trailParticles->setColor(1.0, .8,.8,.8,.0);
-  }
-  if (unlikely(Rocket::explosionParticles == NULL))
-  {
-    Rocket::explosionParticles = new ParticleSystem(200, PARTICLE_SPRITE);
-    Rocket::explosionParticles->setName("RocketExplosionParticles");
-    Rocket::explosionParticles->setMaterialTexture("maps/radial-trans-noise.png");
-    Rocket::explosionParticles->setLifeSpan(.5, .3);
-    Rocket::explosionParticles->setRadius(0.0, 10);
-    Rocket::explosionParticles->setRadius(.5, 15.0);
-    Rocket::explosionParticles->setRadius(1.0, 10.0);
-    Rocket::explosionParticles->setColor(0.0, 0,1,0,1);
-    Rocket::explosionParticles->setColor(0.5, .8,.8,0,.8);
-    Rocket::explosionParticles->setColor(0.8, .8,.8,.3,.8);
-    Rocket::explosionParticles->setColor(1.0, 1,1,1,.0);
-  }
-
-  ParticleEngine::getInstance()->addConnection(this->emitter, Rocket::trailParticles);
-
-  this->updateNode(0);
-  this->emitter->setEmissionRate(45.0);
-  this->emitter->setEmissionVelocity(0.0);
-}
-
-
-void Rocket::deactivate()
-{
-  ParticleEngine::getInstance()->breakConnections(this->emitter);
-  this->lifeCycle = 0.0;
-  this->toList(OM_NULL);
-
-//  GarbageCollector::getInstance()->collect(this);
-  this->toList(OM_DEAD);
-  Rocket::fastFactory->kill(this);
-}
-
-
-void Rocket::collidesWith(WorldEntity* entity, const Vector& location)
-{
-  if (this->hitEntity != entity)
-    this->destroy();
-  this->hitEntity = entity;
-}
-
-/**
- *  signal tick, time dependent things will be handled here
- * @param time since last tick
-*/
-void Rocket::tick (float dt)
-{
-  //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
-  Vector v = this->velocity * (dt);
-  this->shiftCoor(v);
-
-  if(this->tickLifeCycle(dt))
-    this->deactivate();
-}
-
-/**
- *  the function gets called, when the projectile is destroyed
-*/
-void Rocket::destroy ()
-{
-  PRINTF(5)("DESTROY Rocket\n");
-  this->lifeCycle = .95; //!< @todo calculate this usefully.
-  ParticleEngine::getInstance()->breakConnection(this->emitter, Rocket::trailParticles);
-  ParticleEngine::getInstance()->addConnection(this->emitter, Rocket::explosionParticles);
-
-  this->emitter->setEmissionRate(1000.0);
-  this->emitter->setEmissionVelocity(50.0);
-//  this->deactivate();
-
-}
-
-
-void Rocket::draw () const
-{
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-
-  float matrix[4][4];
-  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
-  this->getAbsDir().matrix (matrix);
-  glMultMatrixf((float*)matrix);
-  glScalef(2.0, 2.0, 2.0);
-  this->getModel()->draw();
-
-  glPopMatrix();
-}
-
Index: trunk/src/world_entities/weapons/rocket.h
===================================================================
--- trunk/src/world_entities/weapons/rocket.h	(revision 6433)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*!
- * @file rocket.h
- * @brief a Rocket Projectile
-*/
-
-#ifndef _ROCKET_H
-#define _ROCKET_H
-
-#include "projectile.h"
-
-class Vector;
-class Weapon;
-class ParticleSystem;
-class ParticleEmitter;
-class FastFactory;
-
-class Rocket : public Projectile
-{
-  public:
-    Rocket ();
-    virtual ~Rocket ();
-
-
-    virtual void activate();
-    virtual void deactivate();
-
-    virtual void collidesWith(WorldEntity* entity, const Vector& location);
-
-    virtual void destroy ();
-
-    virtual void tick (float time);
-    virtual void draw () const;
-
-
-  private:
-    static FastFactory*               fastFactory;
-    static ParticleSystem*            trailParticles;
-    static ParticleSystem*            explosionParticles;
-
-    ParticleEmitter*                  emitter;
-
-
-    WorldEntity* hitEntity; // FIXME TEMPORARY
-
-};
-
-#endif /* _ROCKET_H */
Index: trunk/src/world_entities/weapons/targeting_turret.cc
===================================================================
--- trunk/src/world_entities/weapons/targeting_turret.cc	(revision 6433)
+++ trunk/src/world_entities/weapons/targeting_turret.cc	(revision 6434)
@@ -19,5 +19,5 @@
 #include "weapon_manager.h"
 #include "aim.h"
-#include "projectile.h"
+#include "world_entities/projectiles/projectile.h"
 
 #include "model.h"
@@ -119,5 +119,5 @@
 void TargetingTurret::tick(float dt)
 {
-  
+
   this->target->tick(dt);
 }
Index: trunk/src/world_entities/weapons/test_bullet.cc
===================================================================
--- trunk/src/world_entities/weapons/test_bullet.cc	(revision 6433)
+++ 	(revision )
@@ -1,183 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific
-   main-programmer: Patrick Boenzli
-   co-programmer: Benjamin Grauer
-
-*/
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
-
-#include "test_bullet.h"
-
-#include "fast_factory.h"
-
-#include "state.h"
-#include "class_list.h"
-
-#include "particle_engine.h"
-#include "particle_emitter.h"
-#include "particle_system.h"
-
-
-using namespace std;
-
-CREATE_FAST_FACTORY_STATIC(TestBullet, CL_TEST_BULLET);
-
-/**
- *  standard constructor
-*/
-TestBullet::TestBullet () : Projectile()
-{
-  this->setClassID(CL_TEST_BULLET, "TestBullet");
-
-  float modelSize = .3;
-  this->loadModel("models/projectiles/orx-rocket.obj", .3);
-
-  this->setMinEnergy(1);
-  this->setMaxEnergy(10);
-  this->lifeSpan = 2;
-
-  this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5);
-  this->emitter->setParent(this);
-  this->emitter->setSpread(M_PI, M_PI);
-}
-
-
-/**
- *  standard deconstructor
-*/
-TestBullet::~TestBullet ()
-{
-  // delete this->emitter;
-
-  /* this is normaly done by World.cc by deleting the ParticleEngine */
-  if (TestBullet::trailParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
-  {
-    if (ClassList::exists(TestBullet::trailParticles, CL_PARTICLE_SYSTEM))
-      delete TestBullet::trailParticles;
-    TestBullet::trailParticles = NULL;
-  }
-  if (TestBullet::explosionParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
-  {
-    if (ClassList::exists(TestBullet::explosionParticles, CL_PARTICLE_SYSTEM))
-      delete TestBullet::explosionParticles;
-    TestBullet::explosionParticles = NULL;
-  }
-
-}
-
-ParticleSystem* TestBullet::trailParticles = NULL;
-ParticleSystem* TestBullet::explosionParticles = NULL;
-
-void TestBullet::activate()
-{
-  if (unlikely(TestBullet::trailParticles == NULL))
-  {
-    TestBullet::trailParticles = new ParticleSystem(1000, PARTICLE_SPRITE);
-    TestBullet::trailParticles->setName("TestBulletTrailParticles");
-    TestBullet::trailParticles->setLifeSpan(.5, .3);
-    TestBullet::trailParticles->setRadius(0.0, .5);
-    TestBullet::trailParticles->setRadius(0.5, 2.0);
-    TestBullet::trailParticles->setRadius(1.0, 5.0);
-    TestBullet::trailParticles->setColor(0.0, 1,0,0,.7);
-    TestBullet::trailParticles->setColor(0.5, .8,.8,0,.5);
-    TestBullet::trailParticles->setColor(1.0, .7,.7,.7,.0);
-  }
-  if (unlikely(TestBullet::explosionParticles == NULL))
-  {
-    TestBullet::explosionParticles = new ParticleSystem(1000, PARTICLE_SPRITE);
-    TestBullet::explosionParticles->setName("TestBulletExplosionParticles");
-    TestBullet::explosionParticles->setLifeSpan(.5, .3);
-    TestBullet::explosionParticles->setRadius(0.0, 10);
-    TestBullet::explosionParticles->setRadius(.5, 20.0);
-    TestBullet::explosionParticles->setRadius(1.0, 3.0);
-    TestBullet::explosionParticles->setColor(0.0, 0,1,0,.9);
-    TestBullet::explosionParticles->setColor(0.5, .8,.8,0,.5);
-    TestBullet::explosionParticles->setColor(1.0, 1,1,1,.0);
-  }
-
-  ParticleEngine::getInstance()->addConnection(this->emitter, TestBullet::trailParticles);
-
-  this->emitter->setEmissionRate(20.0);
-  this->emitter->setEmissionVelocity(3.0);
-}
-
-
-void TestBullet::deactivate()
-{
-  ParticleEngine::getInstance()->breakConnections(this->emitter);
-  this->lifeCycle = 0.0;
-  this->toList(OM_NULL);
-
-  TestBullet::fastFactory->kill(this);
-}
-
-
-void TestBullet::collidesWith(WorldEntity* entity, const Vector& location)
-{
-  if (this->hitEntity != entity && entity->isA(CL_NPC))
-    this->destroy();
-  this->hitEntity = entity;
-}
-
-/**
- *  signal tick, time dependent things will be handled here
- * @param time since last tick
-*/
-void TestBullet::tick (float time)
-{
-  //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
-  Vector v = this->velocity * (time);
-  this->shiftCoor(v);
-
-  this->lifeCycle += time/this->lifeSpan;
-  if( this->lifeCycle >= 1.0)
-    {
-      PRINTF(5)("FINALIZE==========================\n");
-      PRINTF(5)("current life cycle is: %f\n", this->lifeCycle);
-      PRINTF(5)("FINALIZE===========================\n");
-
-      this->deactivate();
-    }
-}
-
-/**
- *  the function gets called, when the projectile is destroyed
-*/
-void TestBullet::destroy ()
-{
-  PRINTF(5)("DESTROY TestBullet\n");
-  this->lifeCycle = .95; //!< @todo calculate this usefully.
-  ParticleEngine::getInstance()->breakConnection(this->emitter, TestBullet::trailParticles);
-  ParticleEngine::getInstance()->addConnection(this->emitter, TestBullet::explosionParticles);
-
-  this->emitter->setEmissionRate(30.0);
-  this->emitter->setEmissionVelocity(50.0);
-//  this->deactivate();
-
-}
-
-
-void TestBullet::draw () const
-{
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-
-  float matrix[4][4];
-  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
-  this->getAbsDir().matrix (matrix);
-  glMultMatrixf((float*)matrix);
-  glScalef(2.0, 2.0, 2.0);
-  this->getModel()->draw();
-
-  glPopMatrix();
-}
-
Index: trunk/src/world_entities/weapons/test_bullet.h
===================================================================
--- trunk/src/world_entities/weapons/test_bullet.h	(revision 6433)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*!
-    \projectile.h
-  *  a projectile, that is been shooted by a weapon
-*/
-
-#ifndef _TEST_BULLET_H
-#define _TEST_BULLET_H
-
-#include "projectile.h"
-
-class Vector;
-class Weapon;
-class ParticleSystem;
-class ParticleEmitter;
-class FastFactory;
-
-class TestBullet : public Projectile
-{
-  public:
-    TestBullet ();
-    virtual ~TestBullet ();
-
-
-    virtual void activate();
-    virtual void deactivate();
-
-    virtual void collidesWith(WorldEntity* entity, const Vector& location);
-
-    virtual void destroy ();
-
-    virtual void tick (float time);
-    virtual void draw () const;
-
-
-  private:
-    static FastFactory*               fastFactory;
-    static ParticleSystem*            trailParticles;
-    static ParticleSystem*            explosionParticles;
-
-    ParticleEmitter*                  emitter;
-
-
-    WorldEntity* hitEntity; // FIXME TEMPORARY
-
-};
-
-#endif /* _TEST_BULLET_H */
Index: trunk/src/world_entities/weapons/test_gun.cc
===================================================================
--- trunk/src/world_entities/weapons/test_gun.cc	(revision 6433)
+++ trunk/src/world_entities/weapons/test_gun.cc	(revision 6434)
@@ -22,8 +22,8 @@
 
 #include "test_gun.h"
+#include "world_entities/projectiles/projectile.h"
 
 #include "world_entity.h"
 #include "static_model.h"
-#include "test_bullet.h"
 #include "weapon_manager.h"
 #include "factory.h"
Index: trunk/src/world_entities/weapons/turret.cc
===================================================================
--- trunk/src/world_entities/weapons/turret.cc	(revision 6433)
+++ trunk/src/world_entities/weapons/turret.cc	(revision 6434)
@@ -18,5 +18,5 @@
 
 #include "weapon_manager.h"
-#include "projectile.h"
+#include "world_entities/projectiles/projectile.h"
 
 #include "model.h"
Index: trunk/src/world_entities/weapons/weapon.cc
===================================================================
--- trunk/src/world_entities/weapons/weapon.cc	(revision 6433)
+++ trunk/src/world_entities/weapons/weapon.cc	(revision 6434)
@@ -22,5 +22,5 @@
 
 #include "fast_factory.h"
-#include "projectile.h"
+#include "world_entities/projectiles/projectile.h"
 
 #include "resource_manager.h"
