Index: trunk/src/lib/particles/particle_engine.cc
===================================================================
--- trunk/src/lib/particles/particle_engine.cc	(revision 6512)
+++ trunk/src/lib/particles/particle_engine.cc	(revision 6612)
@@ -309,37 +309,38 @@
 {
   // ticks all the ParticleSystems
+//   tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
+//   ParticleSystem* tmpSys = tmpIt->firstElement();
+//   while(tmpSys)
+//     {
+//       tmpSys->tick(dt);
+//       tmpSys = tmpIt->nextElement();
+//     }
+//   delete tmpIt;
+
+  // add new Particles to each System connected to an Emitter.
+  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
+  ParticleConnection* tmpConnection = tmpConIt->firstElement();
+  while(tmpConnection)
+    {
+      tmpConnection->emitter->tick(dt, tmpConnection->system);
+      tmpConnection = tmpConIt->nextElement();
+    }
+  delete tmpConIt;
+}
+
+/**
+ *  draws all the systems and their Particles.
+*/
+void ParticleEngine::draw() const
+{
+  /*
   tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
   ParticleSystem* tmpSys = tmpIt->firstElement();
   while(tmpSys)
     {
-      tmpSys->tick(dt);
-      tmpSys = tmpIt->nextElement();
-    }
-  delete tmpIt;
-
-  // add new Particles to each System connected to an Emitter.
-  tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
-  ParticleConnection* tmpConnection = tmpConIt->firstElement();
-  while(tmpConnection)
-    {
-      tmpConnection->emitter->tick(dt, tmpConnection->system);
-      tmpConnection = tmpConIt->nextElement();
-    }
-  delete tmpConIt;
-}
-
-/**
- *  draws all the systems and their Particles.
-*/
-void ParticleEngine::draw() const
-{
-  tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
-  ParticleSystem* tmpSys = tmpIt->firstElement();
-  while(tmpSys)
-    {
       tmpSys->draw();
       tmpSys = tmpIt->nextElement();
     }
-  delete tmpIt;
+  delete tmpIt;*/
 
 }
Index: trunk/src/lib/particles/particle_system.cc
===================================================================
--- trunk/src/lib/particles/particle_system.cc	(revision 6512)
+++ trunk/src/lib/particles/particle_system.cc	(revision 6612)
@@ -31,4 +31,6 @@
 
 #include "parser/tinyxml/tinyxml.h"
+#include <algorithm>
+
 
 CREATE_FACTORY(ParticleSystem, CL_PARTICLE_SYSTEM);
@@ -107,4 +109,6 @@
   this->setType(PARTICLE_DEFAULT_TYPE, 1);
   ParticleEngine::getInstance()->addSystem(this);
+
+  this->toList(OM_ENVIRON);
 }
 
@@ -132,4 +136,5 @@
 
   LoadParam(root, "texture", this, ParticleSystem, setMaterialTexture);
+  LoadParamXML(root, "emitter", this, ParticleSystem, addEmitterXML);
 
   LOAD_PARAM_START_CYCLE(root, element);
@@ -147,5 +152,4 @@
   }
   LOAD_PARAM_END_CYCLE(element);
-
 }
 
@@ -288,4 +292,24 @@
   this->colorAnim[2].changeEntry(lifeCycleTime, blue);
   this->colorAnim[3].changeEntry(lifeCycleTime, alpha);
+}
+
+
+void ParticleSystem::addEmitter(ParticleEmitter* emitter)
+{
+  this->emitters.push_back(emitter);
+}
+
+void ParticleSystem::addEmitterXML(const TiXmlElement* emitterRoot)
+{
+  ParticleEmitter* emitter = new ParticleEmitter(emitterRoot);
+  this->addEmitter(emitter);
+}
+
+
+void ParticleSystem::removeEmitter(ParticleEmitter* emitter)
+{
+  std::list<ParticleEmitter*>::iterator it = std::find(this->emitters.begin(), this->emitters.end(), emitter);
+  if (it != this->emitters.end())
+    this->emitters.erase(it);
 }
 
@@ -357,4 +381,8 @@
         }
     }
+
+    std::list<ParticleEmitter*>::iterator emitter;
+    for (emitter = this->emitters.begin(); emitter != this->emitters.end(); emitter++)
+      (*emitter)->tick(dt, this);
 }
 
Index: trunk/src/lib/particles/particle_system.h
===================================================================
--- trunk/src/lib/particles/particle_system.h	(revision 6512)
+++ trunk/src/lib/particles/particle_system.h	(revision 6612)
@@ -12,4 +12,5 @@
 #include "glincl.h"
 #include "vector.h"
+#include <list>
 
 #include "quick_animation.h"
@@ -107,4 +108,7 @@
   virtual unsigned int getFaceCount() const;
 
+  void addEmitter(ParticleEmitter* emitter);
+  void addEmitterXML(const TiXmlElement* emitterRoot);
+  void removeEmitter(ParticleEmitter* emitter);
 
   virtual void applyField(Field* field);
@@ -136,4 +140,6 @@
   GLuint            dialectCount;        //!< How many different types of particles are there in the Particle System
 
+  std::list<ParticleEmitter*> emitters;  //!< The Emitters that do emit into this System.
+
   // per particle attributes
   QuickAnimation    radiusAnim;          //!< Animation of the radius
