Index: code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.cc	(revision 11735)
+++ code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.cc	(revision 11736)
@@ -71,8 +71,4 @@
 */
 
-
-#include "../../orxonox/worldentities/pawns/Pawn.h"
-#include "../../orxonox/worldentities/WorldEntity.h"
-
 #include "AsteroidMinable.h"
 
@@ -82,15 +78,12 @@
 #include "core/GameMode.h"
 #include "core/XMLPort.h"
-#include "core/EventIncludes.h"
-#include "network/NetworkFunction.h" 
 #include "util/Convert.h"
 #include "util/Math.h"
 
-#include "../pickup/PickupSpawner.h"
-#include "../pickup/Pickup.h"
-
-#include "../objects/collisionshapes/SphereCollisionShape.h"
-#include "../../orxonox/graphics/Model.h"
-
+#include "pickup/PickupSpawner.h"
+#include "pickup/Pickup.h"
+
+#include "objects/collisionshapes/SphereCollisionShape.h"
+#include "graphics/Model.h"
 
 namespace orxonox{
@@ -102,12 +95,9 @@
 
         RegisterObject(AsteroidMinable);
-        this->context = context;
 
         // Default Values:
-        this->size = 10; 
+        this->size = 1;
         this->dropStuff = true; 
         this->generateSmaller = true; 
-        this->health_ = 15*size; 
-        this->maxHealth_ = this->health_;
         this->acceptsPickups_ = false; 
 
@@ -121,8 +111,17 @@
     }
 
-    // @brief Use this constructor with care. Mainly used internally, arguments are passed directly. 
-    AsteroidMinable::AsteroidMinable(Context* c, float size, Vector3 position, bool dropStuff) : Pawn(c){
-
-        RegisterObject(AsteroidMinable);
+    AsteroidMinable::~AsteroidMinable(){
+
+    }
+
+    void AsteroidMinable::setSize(int s)
+    {
+        this->size = s;
+        this->health_ = 15*size;
+        this->maxHealth_ = this->health_;
+    }
+
+    // @brief Helper method.
+    void AsteroidMinable::putStuff(){
 
         // The radar is able to detect whether an asteroid contains resources....
@@ -136,20 +135,6 @@
         }
 
-        this->context = c;
-        this->size = size;
-        this->health_ = 15*size; 
-        this->maxHealth_ = this->health_;
-        this->acceptsPickups_ = false; 
-        this->generateSmaller = true; 
-        this->dropStuff = dropStuff; 
-
-        this->setPosition(position);
-        //this->roll = rand()*5; //etwas Drehung. Richtige Variable?
-
-        this->setCollisionType(WorldEntity::CollisionType::Dynamic);
-        this->enableCollisionCallback();
-
         // Add Model, random one of the 6 shapes
-        Model* hull = new Model(this->context);
+        Model* hull = new Model(this->getContext());
         hull->setMeshSource("ast" + multi_cast<std::string>(1 + (int)rnd(0, 6)) + ".mesh");
         hull->setScale(this->size);
@@ -157,28 +142,9 @@
 
         // Collision shape
-        SphereCollisionShape* cs = new SphereCollisionShape(this->context);
+        SphereCollisionShape* cs = new SphereCollisionShape(this->getContext());
         cs->setRadius((this->size)*2); //OFFEN: Feinabstimmung der Radien. 
         this->attachCollisionShape(cs); 
 
-        this->registerVariables();
-
         this->initialised=true; 
-
-    }
-
-    AsteroidMinable::~AsteroidMinable(){
-
-    }
-
-    // @brief Helper method. 
-    void AsteroidMinable::putStuff(){
-
-        AsteroidMinable* reborn = new AsteroidMinable(this->context, this->size, this->getPosition(), this->dropStuff);
-        reborn->setVelocity(this->getVelocity());
-        // reborn->setAngularVelocity(this->getAngularVelocity()); // Add all other stuff, too?
-
-        this->bAlive_ = false;
-        this->destroyLater();
-
     }
 
@@ -188,12 +154,6 @@
 
         XMLPortParam(AsteroidMinable, "size", setSize, getSize, xmlelement, mode);
-        XMLPortParam(AsteroidMinable, "generateSmaller", toggleShattering, doesShatter, xmlelement, mode);
-        XMLPortParam(AsteroidMinable, "dropStuff", toggleDropStuff, doesDropStuff, xmlelement, mode); 
-
-    }
-
-    void AsteroidMinable::XMLEventPort(Element& xmlelement, XMLPort::Mode mode){
-
-        SUPER(AsteroidMinable, XMLEventPort, xmlelement, mode);
+        XMLPortParam(AsteroidMinable, "generateSmaller", setShattering, doesShatter, xmlelement, mode);
+        XMLPortParam(AsteroidMinable, "dropStuff", setDropStuff, doesDropStuff, xmlelement, mode);
 
     }
@@ -228,5 +188,5 @@
         // Pickups which can be harvested. It's munition at the moment, could be changed/extended. 
         if(dropStuff){
-            PickupSpawner* thingy = new PickupSpawner(this->context);
+            PickupSpawner* thingy = new PickupSpawner(this->getContext());
 
             std::string tname;
@@ -366,7 +326,9 @@
         }
         
-        AsteroidMinable* child = new AsteroidMinable(this->context, masses[fisch], this->getPosition() + pos, this->dropStuff);
+        AsteroidMinable* child = new AsteroidMinable(this->getContext());
+        child->setSize(masses[fisch]);
+        child->setPosition(this->getPosition() + pos);
         child->setVelocity(this->getVelocity());
-
+        child->setDropStuff(this->dropStuff);
     }
     // orxout() << "Leaving spawnChildren() method. " << endl;
