Index: /orxonox/branches/physics/src/lib/graphics/particles/particle_system.cc
===================================================================
--- /orxonox/branches/physics/src/lib/graphics/particles/particle_system.cc	(revision 4191)
+++ /orxonox/branches/physics/src/lib/graphics/particles/particle_system.cc	(revision 4192)
@@ -53,4 +53,5 @@
   this->setRadius(1.0, 1.0, 0.0);
   this->setType(type, 1);
+  this->setColor(1.0,1.0,1.0,1.0, .5,.5,.5,.5, .0,.0,.0,.0);
   ParticleEngine::getInstance()->addSystem(this);
 }
@@ -198,4 +199,29 @@
 }
 
+
+/**
+   \brief Tells the ParticleSystem how it should iterate the color over time
+   \param ....
+*/
+void ParticleSystem::setColor(GLfloat br, GLfloat bg, GLfloat bb, GLfloat ba,
+			      GLfloat mr, GLfloat mg, GLfloat mb, GLfloat ma,
+			      GLfloat er, GLfloat eg, GLfloat eb, GLfloat ea)
+{
+  this->startColor[0] = br;
+  this->startColor[1] = bg;
+  this->startColor[2] = bb;
+  this->startColor[3] = ba;
+
+  this->midColor[0] = mr;
+  this->midColor[1] = mg;
+  this->midColor[2] = mb;
+  this->midColor[3] = ma;
+
+  this->endColor[0] = er;
+  this->endColor[1] = eg;
+  this->endColor[2] = eb;
+  this->endColor[3] = ea;
+}
+
 /**
    \brief ticks the system.
@@ -217,4 +243,11 @@
       tickPart->extForce = Vector(0,0,0);
 
+      // applying Color
+      //! \todo better algorithm to do this \todo also implement the midColor
+      tickPart->color[0] = this->startColor[0] *(1-tickPart->lifeCycle) + tickPart->lifeCycle * this->endColor[0];
+      tickPart->color[1] = this->startColor[1] *(1-tickPart->lifeCycle) + tickPart->lifeCycle * this->endColor[1];
+      tickPart->color[2] = this->startColor[2] *(1-tickPart->lifeCycle) + tickPart->lifeCycle * this->endColor[2];
+      tickPart->color[3] = this->startColor[3] *(1-tickPart->lifeCycle) + tickPart->lifeCycle * this->endColor[3];
+
       // many more to come
 
@@ -222,5 +255,5 @@
 	tickPart->velocity = tickPart->velocity * this->conserve;
       // find out if we have to delete tickPart
-      if ((tickPart->timeToLive -= dt) <= 0)
+      if ((tickPart->lifeCycle += dt/tickPart->lifeTime) >= 1.0)
 	{
 	  // remove the particle from the list
@@ -267,29 +300,33 @@
    \brief draws all the Particles of this System
    \param the time passed in seconds (since the last draw)
+
+   The Cases in this Function all do the same:
+   Drawing all the particles with the appropriate Type.
+   This is just the fastest Way to do this, but will most likely be changed in the future.
 */
 void ParticleSystem::draw(float dt)
 {
   glPushAttrib(GL_ENABLE_BIT);
-  //  material->select();
+  glDisable(GL_LIGHTING);
+
   Particle* drawPart = particles;
-
+      
   switch (this->particleType)
     {
+    default:
     case PARTICLE_SPRITE:
-      GLdouble projMat[16];
-      GLfloat drawPartPos[4];
-      glGetDoublev(GL_PROJECTION_MATRIX, projMat);
-      
       glMatrixMode(GL_MODELVIEW);
       glDisable(GL_DEPTH_TEST);
-      glDisable(GL_LIGHTING);
-           material->select(); 
+
+      material->select(); 
+      //      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_ENV_MODE, GL_MODULATE);
       
 
       while (likely(drawPart != NULL))
 	{
+	  glColor4fv(drawPart->color);
 	  //! \todo implement a faster code for the look-at Camera algorithm.
 
-	  Camera* camera = WorldInterface::getInstance()->getCurrentWorld()->getLocalCamera();
+	  Camera* camera = WorldInterface::getInstance()->getCurrentWorld()->getLocalCamera();  //!< \todo MUST be different
 	  Vector cameraPos = camera->getAbsCoor();
 	  Vector cameraTargetPos = camera->getTarget()->getAbsCoor();
@@ -326,10 +363,7 @@
 	  drawPart = drawPart->next;
 	}
-      glEnable(GL_LIGHTING);
-      glEnable(GL_DEPTH_TEST);
 
       
       break;
-    default:
 
     case PARTICLE_SPARK:
@@ -338,4 +372,5 @@
       while (likely(drawPart != NULL))
 	{
+	  glColor4fv(drawPart->color);
 	  glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
 	  glVertex3f(drawPart->position.x - drawPart->velocity.x,
@@ -351,4 +386,6 @@
       while (likely(drawPart != NULL))
 	{
+	  glColor4fv(drawPart->color);
+
 	  glLineWidth(drawPart->radius);
 
@@ -405,5 +442,6 @@
 	}
       
-      particles->timeToLive = this->lifeSpan + (float)(rand()/RAND_MAX)* this->randomLifeSpan;
+      particles->lifeTime = this->lifeSpan + (float)(rand()/RAND_MAX)* this->randomLifeSpan;
+      particles->lifeCycle = 0.0;
       particles->position = position;
       particles->velocity = velocity;
@@ -413,5 +451,5 @@
       particles->radius = this->startRadius + (rand()/RAND_MAX-.5)*this->randomStartRadius;
       
-      particles->radiusIt = (this->endRadius + (rand()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->timeToLive;
+      particles->radiusIt = (this->endRadius + (rand()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->lifeTime;
 
       ++this->count;
Index: /orxonox/branches/physics/src/lib/graphics/particles/particle_system.h
===================================================================
--- /orxonox/branches/physics/src/lib/graphics/particles/particle_system.h	(revision 4191)
+++ /orxonox/branches/physics/src/lib/graphics/particles/particle_system.h	(revision 4192)
@@ -36,5 +36,7 @@
 typedef struct Particle
 {
-  float timeToLive;           //!< The time this particle lives from NOW on.
+  float lifeTime;             //!< The time this particle has to live.
+  float lifeCycle;            //!< The fraction of time passed. (in percentage of its lifeTime)
+
   Vector position;            //!< The current position of this particle.
   Vector velocity;            //!< The current velocity of this particle.
@@ -44,4 +46,6 @@
   float radius;               //!< The current size of this particle.
   float radiusIt;             //!< The difference of the Size per second.
+
+  GLfloat color [4];          //!< A Color for the particles.
 
   PARTICLE_TYPE type;
@@ -70,4 +74,8 @@
   void setMass(float mass, float randomMass);
 
+  void setColor(GLfloat br, GLfloat bg, GLfloat bb, GLfloat ba,
+		GLfloat mr, GLfloat mg, GLfloat mb, GLfloat ma,
+		GLfloat er, GLfloat eg, GLfloat eb, GLfloat ea);
+
   void applyField(float dt, Field* field);
 
@@ -82,12 +90,16 @@
   float conserve;            //!< How much energy gets conserved to the next Tick.
   float lifeSpan;            //!< Initial lifetime of a Particle.
-  float randomLifeSpan;
-  float startRadius;
-  float endRadius;
-  float randomStartRadius;
-  float randomEndRadius;
-  float initialMass;
-  float randomInitialMass;
-  float inheritSpeed;
+  float randomLifeSpan;      //!< A random value for the Lifespan (around the initial lifetime)
+  float startRadius;         //!< The beginning Radius of the Particle
+  float endRadius;           //!< The end Radius of the Particle
+  float randomStartRadius;   //!< The Random start Radius (begin + rand*randomValue)
+  float randomEndRadius;     //!< Random end value
+  float initialMass;         //!< The initial Mass of the Particle
+  float randomInitialMass;   //!< The random initial Mass of the Particle
+  float inheritSpeed;        //!< How much speed the particle inherits from the Emitters speed \todo move this to the emitter
+
+  GLfloat startColor[4];     //!< Color of the Particle at the beginning
+  GLfloat midColor[4];       //!< Color of the Particle at the middle of its lifeSpan
+  GLfloat endColor[4];       //!< Color of the Particle at the end of its lifeSpan
 
   // particles
Index: /orxonox/branches/physics/src/story_entities/world.cc
===================================================================
--- /orxonox/branches/physics/src/story_entities/world.cc	(revision 4191)
+++ /orxonox/branches/physics/src/story_entities/world.cc	(revision 4192)
@@ -492,21 +492,31 @@
 
 
+  // Creating a Test Particle System
   ParticleSystem* system = new ParticleSystem(100000, PARTICLE_SPRITE);
-  system->setLifeSpan(3);
-  system->setConserve(.9);
-  system->setRadius(2, 0, 2, 0);
-
+  system->setLifeSpan(1);
+  system->setConserve(.8);
+  system->setRadius(4, 0, 1, 0);
+  system->setColor(1,0,0,1, 1,1,0,1, 0,0,0,0);
+
+  // Creating a Test Particle Emitter
   ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 400, .5);
   emitter->setParent(this->localPlayer);
-  
+  emitter->setRelCoor(Vector(0,-3,0));
+  
+  // Add the Flow from the Emitter into the System
+  particleEngine->addConnection(emitter, system);
+
+
+  // Creating Some Fields
   Field* twirl = new Twirl();
   twirl->setMagnitude(.1);
   Field* gravity = new PointGravity();
   gravity->setMagnitude(.5);
-    new PhysicsConnection(system, twirl);
-    //    new PhysicsConnection(system, gravity);
-    twirl->setParent(this->localCamera->getTarget());
-    gravity->setParent(this->localCamera->getTarget());
-    particleEngine->addConnection(emitter, system);
+  twirl->setParent(this->localCamera->getTarget());
+  gravity->setParent(this->localCamera->getTarget());
+
+  //  new PhysicsConnection(system, twirl);
+  //    new PhysicsConnection(system, gravity);
+
 }
 
