Index: orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc
===================================================================
--- orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc	(revision 3999)
+++ orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc	(revision 4001)
@@ -124,6 +124,5 @@
     // saving the time
     float count = (dt+this->saveTime) * this->emissionRate;
-    this->saveTime = modff(count, &count);
-    this->saveTime /= this->emissionRate;
+    this->saveTime = modff(count, &count) / this->emissionRate;
     PRINTF(5)("emitting %f particles, saving %f seconds for the next round\n", count, this->saveTime); 
     
@@ -137,7 +136,7 @@
 	    randDir.normalize();
 	    randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)random()/RAND_MAX -.5), randDir)).apply(this->direction);
-	    randDir = randDir.getNormalized()*velocity + inheritVelocity;
+	    Vector velocityV = randDir.getNormalized()*this->velocity + inheritVelocity;
 	    
-	    system->addParticle(this->getAbsCoor(), randDir);
+	    system->addParticle(this->getAbsCoor(), velocityV);
 	  }
       }
Index: orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.cc
===================================================================
--- orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.cc	(revision 3999)
+++ orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.cc	(revision 4001)
@@ -229,13 +229,13 @@
   glMatrixMode(GL_MODELVIEW);
   //  glDisable(GL_LIGHTING);
-  material->select();
-
-  Particle* drawPart = particles;
+  material->select(); 
+  glDisable(GL_DEPTH_TEST);
+ Particle* drawPart = particles;
   if (likely(drawPart != NULL))
     {
-      glBegin(GL_POINTS);
+      //draw in DOT mode
+      //      glBegin(GL_POINTS);
       while (likely(drawPart != NULL))
 	{
-	  // draw in DOT mode
 	  glPushMatrix();
 	  glTranslatef(drawPart->position.x, drawPart->position.y, drawPart->position.z);
@@ -243,10 +243,12 @@
 	  glCallList(*this->glID);
 	  
-	  //	  	  glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
+	  //glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
 	  drawPart = drawPart->next;
 	  glPopMatrix();
 	}
-      glEnd();
+      //      glEnd();
     }
+  //  glEnable(GL_LIGHTING);
+  glEnable(GL_DEPTH_TEST);
 }
 
@@ -288,5 +290,5 @@
     }
   else
-    PRINTF(4)("maximum count of particles reached not adding any more\n");
+    PRINTF(5)("maximum count of particles reached not adding any more\n");
 }
 
Index: orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.h
===================================================================
--- orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.h	(revision 3999)
+++ orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.h	(revision 4001)
@@ -10,12 +10,14 @@
 #include "vector.h"
 
-#define PARTICLE_DOT_MASK           0x00001
-#define PARTICLE_SPRITE_MASK        0x00010
-#define PARTICLE_MODEL_MASK         0x00100
-#define PARTICLE_WORDL_ENTITY_MASK  0x01000
-#define PARTICLE_MULTI_MASK         0x10000
+#define PARTICLE_DOT_MASK           0x000001
+#define PARTICLE_SPARK_MASK         0x000010
+#define PARTICLE_SPRITE_MASK        0x000100
+#define PARTICLE_MODEL_MASK         0x001000
+#define PARTICLE_WORDL_ENTITY_MASK  0x010000
+#define PARTICLE_MULTI_MASK         0x100000
 
 //! An enumerator for the different types of particles.
 typedef enum PARTICLE_TYPE {PARTICLE_DOT = PARTICLE_DOT_MASK,
+			    PARTICLE_SPARK = PARTICLE_SPARK_MASK,
 			    PARTICLE_SPRITE = PARTICLE_SPRITE_MASK,
 			    PARTICLE_MULTI_SPRITE = PARTICLE_SPRITE_MASK | PARTICLE_MULTI_MASK,
@@ -41,4 +43,6 @@
   float radius;               //!< The current size of this particle.
   float radiusIt;             //!< The difference of the Size per second.
+
+  PARTICLE_TYPE type;
 
   Particle* next;             //!< pointer to the next particle in the List. (NULL if no preceding one)
