Index: code/trunk/src/orxonox/worldentities/BigExplosion.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/BigExplosion.cc	(revision 8858)
+++ code/trunk/src/orxonox/worldentities/BigExplosion.cc	(revision 9667)
@@ -41,7 +41,7 @@
 namespace orxonox
 {
-    CreateFactory(BigExplosion);
-
-    BigExplosion::BigExplosion(BaseObject* creator) : StaticEntity(creator)
+    RegisterClass(BigExplosion);
+
+    BigExplosion::BigExplosion(Context* context) : StaticEntity(context)
     {
         RegisterObject(BigExplosion);
@@ -80,8 +80,8 @@
     void BigExplosion::init()
     {
-        this->debrisEntity1_ = new MovableEntity(this);
-        this->debrisEntity2_ = new MovableEntity(this);
-        this->debrisEntity3_ = new MovableEntity(this);
-        this->debrisEntity4_ = new MovableEntity(this);
+        this->debrisEntity1_ = new MovableEntity(this->getContext());
+        this->debrisEntity2_ = new MovableEntity(this->getContext());
+        this->debrisEntity3_ = new MovableEntity(this->getContext());
+        this->debrisEntity4_ = new MovableEntity(this->getContext());
 
         this->debrisEntity1_->setSyncMode(0);
@@ -90,8 +90,8 @@
         this->debrisEntity4_->setSyncMode(0);
 
-        this->debris1_ = new Model(this);
-        this->debris2_ = new Model(this);
-        this->debris3_ = new Model(this);
-        this->debris4_ = new Model(this);
+        this->debris1_ = new Model(this->getContext());
+        this->debris2_ = new Model(this->getContext());
+        this->debris3_ = new Model(this->getContext());
+        this->debris4_ = new Model(this->getContext());
 
         this->debris1_->setSyncMode(0);
@@ -100,5 +100,5 @@
         this->debris4_->setSyncMode(0);
 
-        this->explosion_ = new StaticEntity(this);
+        this->explosion_ = new StaticEntity(this->getContext());
         this->explosion_->setSyncMode(0);
 
@@ -148,5 +148,5 @@
         this->debrisEntity4_->attach(debris4_);
 
-        ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
+        ParticleSpawner* effect = new ParticleSpawner(this->getContext());
         effect->setDestroyAfterLife(true);
         effect->setSource("Orxonox/explosion2b");
@@ -154,5 +154,5 @@
         effect->setSyncMode(0);
 
-        ParticleSpawner* effect2 = new ParticleSpawner(this->getCreator());
+        ParticleSpawner* effect2 = new ParticleSpawner(this->getContext());
         effect2->setDestroyAfterLife(true);
         effect2->setSource("Orxonox/smoke6");
@@ -172,9 +172,9 @@
         for(int i=0;i<10;i++)
         {
-            Model* part1 = new Model(this);
-            Model* part2 = new Model(this);
-
-            MovableEntity* partEntity1 = new MovableEntity(this);
-            MovableEntity* partEntity2 = new MovableEntity(this);
+            Model* part1 = new Model(this->getContext());
+            Model* part2 = new Model(this->getContext());
+
+            MovableEntity* partEntity1 = new MovableEntity(this->getContext());
+            MovableEntity* partEntity2 = new MovableEntity(this->getContext());
 
             part1->setSyncMode(0);
@@ -225,10 +225,10 @@
             {
                 this->debris1_->detachOgreObject(this->debrisFire1_->getParticleSystem());
-                this->debrisFire1_->destroy();
+                delete this->debrisFire1_;
             }
             if (this->debrisSmoke1_)
             {
                 this->debris1_->detachOgreObject(this->debrisSmoke1_->getParticleSystem());
-                this->debrisSmoke1_->destroy();
+                delete this->debrisSmoke1_;
             }
 
@@ -236,10 +236,10 @@
             {
                 this->debris2_->detachOgreObject(this->debrisFire2_->getParticleSystem());
-                this->debrisFire2_->destroy();
+                delete this->debrisFire2_;
             }
             if (this->debrisSmoke2_)
             {
                 this->debris2_->detachOgreObject(this->debrisSmoke2_->getParticleSystem());
-                this->debrisSmoke2_->destroy();
+                delete this->debrisSmoke2_;
             }
 
@@ -247,10 +247,10 @@
             {
                 this->debris3_->detachOgreObject(this->debrisFire3_->getParticleSystem());
-                this->debrisFire3_->destroy();
+                delete this->debrisFire3_;
             }
             if (this->debrisSmoke3_)
             {
                 this->debris3_->detachOgreObject(this->debrisSmoke3_->getParticleSystem());
-                this->debrisSmoke3_->destroy();
+                delete this->debrisSmoke3_;
             }
 
@@ -258,10 +258,10 @@
             {
                 this->debris4_->detachOgreObject(this->debrisFire4_->getParticleSystem());
-                this->debrisFire4_->destroy();
+                delete this->debrisFire4_;
             }
             if (this->debrisSmoke4_)
             {
                 this->debris4_->detachOgreObject(this->debrisSmoke4_->getParticleSystem());
-                this->debrisSmoke4_->destroy();
+                delete this->debrisSmoke4_;
             }
         }
