Index: code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.cc	(revision 11731)
+++ code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.cc	(revision 11732)
@@ -85,4 +85,5 @@
 #include "core/EventIncludes.h"
 #include "network/NetworkFunction.h" 
+#include "util/Convert.h"
 #include "util/Math.h"
 
@@ -152,7 +153,5 @@
         // Add Model, random one of the 6 shapes
         Model* hull = new Model(this->context);
-        char meshThingy[] = "";
-        sprintf(meshThingy, "ast%.0f.mesh", round(5*rnd())+1); 
-        hull->setMeshSource(meshThingy);
+        hull->setMeshSource("ast" + multi_cast<std::string>(1 + (int)rnd(0, 6)) + ".mesh");
         hull->setScale(this->size);
         this->attach(hull);
@@ -233,11 +232,11 @@
             PickupSpawner* thingy = new PickupSpawner(this->context);
 
-            char tname[] = ""; // can-t overwrite strings easily in C (strcat etc.)
+            std::string tname;
             if(this->size <= 5){
-                strcat(tname, "smallmunitionpickup");
+                tname = "smallmunitionpickup";
             }else if(this->size <= 20){
-                strcat(tname, "mediummunitionpickup");
+                tname = "mediummunitionpickup";
             }else{
-                strcat(tname, "hugemunitionpickup");
+                tname = "hugemunitionpickup";
             }
             thingy->setPickupTemplateName(tname);
@@ -260,14 +259,19 @@
     int num = round(rnd()*(massRem-1)) + 1; // random number of children, at least one
     if(num > 10){num = 10;} // no max function in C? 
-    int masses[num]; // Masses of the asteroids
+    std::vector<int> masses(num); // Masses of the asteroids
     // orxout() << "SpawnChildren(): Passed basic stuff. num = " << num << "; massRem(total) = "<< massRem << endl;
     massRem = massRem-num; // mass must be at least one, add later.  
 
     // Randomnised spawning points for the new asteroids
-    float phi[num]; 
-    float theta[num]; 
+    std::vector<float> phi(num);
+    std::vector<float> theta(num);
 
     // Discusting C stuff -> use that to initialise dynamic array values to 0. 
-    for(int twat = 0; twat<num; ++twat){masses[twat] = 0; phi[twat] = 0.0; theta[twat] = 0.0;}
+    for(int twat = 0; twat<num; ++twat)
+    {
+        masses[twat] = 0;
+        phi[twat] = 0.0f;
+        theta[twat] = 0.0f;
+    }
 
     float piG = 3.1415927410125732421875; //pi; // Math.pi ist statisch oder so. 
@@ -310,5 +314,5 @@
     if(massRem>0){
         int c = massRem;
-        float probDensity[c];
+        std::vector<float> probDensity(c);
 
         int a = round(massRem/num);
@@ -405,55 +409,3 @@
         // }
     }
-
-    // @brief Just for testing. Don-t work anyways. 
-    void AsteroidMinable::printArrayString(float thingy[]){ // Don-t work!
-
-        orxout() << "[" ; //<< endl;  
-        char frag[] = "";
-        int len = (int)(sizeof(thingy)/sizeof(thingy[0]));
-        for(int m = 0; m< (len-2); ++m){
-            sprintf(frag, "%.5f, ", thingy[m]);
-            orxout() << frag << endl;//std::flush;
-        }
-        sprintf(frag, "%.5f]", thingy[len-1]);
-        orxout() << frag << endl; // Just print it here! No ugly passing. 
-    }
-
-    // @brief Just for testing. Don-t work anyways. 
-    void AsteroidMinable::printArrayString(int thingy[]){
-
-        orxout() << "[" ; //<< endl; 
-        char frag[] = "";
-        int len = (int)(sizeof(thingy)/sizeof(thingy[0]));
-        for(int m = 0; m< (len-2); ++m){
-            sprintf(frag, "%.0i, ", thingy[m]);
-            orxout() << frag << endl;//std::flush;
-            printf("TEst");
-        }
-
-        sprintf(frag, "%.0i]", thingy[len-1]); // last element
-        orxout() << frag << endl; // Just print it here! No ugly passing. 
-    }
-
-    // void AsteroidMinable::printArrayString(int thingy[]){
-    //     char res[] = "[";
-    //     //strcat(res, "[");
-    //     char frag[] = "";
-
-    //     int len = (int)(sizeof(thingy)/sizeof(thingy[0]));
-    //     for(int m = 0; m< (len-1); ++m){
-    //         sprintf(frag, "%.0i, ", thingy[m]);
-    //         strcat(res, frag);
-    //     }
-    //     sprintf(frag, "%.0i]", thingy[len]);
-    //     strcat(res, frag); // last element
-
-    //     orxout() << res << endl; // Just print it here! No ugly passing. 
-
-    //     // static char result[(sizeof(res)/sizeof("")] = res; // define as static, would get deleted otherwise. 
-    //     // char *result = malloc(sizeof(res)/sizeof("") + 1); 
-    //     // *result = res;
-    //     // return result;
-    // }
-
 }
Index: code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.h	(revision 11731)
+++ code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.h	(revision 11732)
@@ -137,9 +137,4 @@
             virtual void spawnChildren();
 
-            // @brief Just for testing. Don-t work anyways. 
-            void printArrayString(float thingy[]);
-            // @brief Just for testing. Don-t work anyways. 
-            void printArrayString(int thingy[]);
-
     }; // tolua_export
 } // tolua_export
Index: code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidBelt.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidBelt.cc	(revision 11731)
+++ code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidBelt.cc	(revision 11732)
@@ -100,7 +100,4 @@
         int segmentCount = round(this->count / this->segments);
 
-        SpicedAsteroidField* af[this->segments]; 
-        (void)af[0]; // avoid nasty compiler warning
-
         float dPhi = (2 * myPi) / this->segments;
         float dTheta = 4.0*this->tiltBy/this->segments; 
@@ -117,5 +114,5 @@
             
             Vector3* pos = new Vector3(radius*cos(sepp)*sin(globi), radius*sin(sepp)*sin(globi), radius*cos(globi)); 
-            af[s] = new SpicedAsteroidField(this->context, this->position + *pos, this->minSize, this->maxSize, width, segmentCount, this->foggy, this->mDensity, this->fogDensity);
+            new SpicedAsteroidField(this->context, this->position + *pos, this->minSize, this->maxSize, width, segmentCount, this->foggy, this->mDensity, this->fogDensity);
             
         }
