Index: /code/branches/modularships/data/levels/emptyLevel.oxw
===================================================================
--- /code/branches/modularships/data/levels/emptyLevel.oxw	(revision 10028)
+++ /code/branches/modularships/data/levels/emptyLevel.oxw	(revision 10029)
@@ -98,5 +98,5 @@
     </ModularSpaceShip>
     
-    <ModularSpaceShip position="0,-1000,-200" health="1000" maxhealth="2000" initialhealth="1000">
+    <ModularSpaceShip position="0,-1000,-200" health="2000" maxhealth="4000" initialhealth="2000">
       <templates>
         <Template link=HeavyCruiser />
Index: /code/branches/modularships/data/levels/templates/HeavyCruiser.oxt
===================================================================
--- /code/branches/modularships/data/levels/templates/HeavyCruiser.oxt	(revision 10028)
+++ /code/branches/modularships/data/levels/templates/HeavyCruiser.oxt	(revision 10029)
@@ -11,7 +11,7 @@
    explosionchunks        = 6
 
-   health            = 1000
-   maxhealth         = 2000
-   initialhealth     = 1000
+   health            = 2000
+   maxhealth         = 4000
+   initialhealth     = 2000
 
    shieldhealth        = 100
@@ -51,12 +51,12 @@
     
     <parts>
-        <ShipPart name="frontL" health="100" damageabsorption="0.5" />
-        <ShipPart name="frontR" health="100" damageabsorption="0.5" />
-        <ShipPart name="partL" health="100" damageabsorption="0.5" />
-        <ShipPart name="partR" health="100" damageabsorption="0.5" />
-        <ShipPart name="sidearmL" health="201" damageabsorption="0.2" />
-        <ShipPart name="sidearmLfront" health="100" damageabsorption="0.5" />
-        <ShipPart name="sidearmR" health="200" damageabsorption="0.2" />
-        <ShipPart name="sidearmRfront" health="100" damageabsorption="0.5" />
+        <ShipPart name="frontL" initialhealth="10" damageabsorption="0.5" />
+        <ShipPart name="frontR" initialhealth="10" damageabsorption="0.5" />
+        <ShipPart name="partL" initialhealth="10" damageabsorption="0.5" />
+        <ShipPart name="partR" initialhealth="10" damageabsorption="0.5" />
+        <ShipPart name="sidearmL" initialhealth="20" damageabsorption="0.2" />
+        <ShipPart name="sidearmLfront" initialhealth="10" damageabsorption="0.5" />
+        <ShipPart name="sidearmR" initialhealth="20" damageabsorption="0.2" />
+        <ShipPart name="sidearmRfront" initialhealth="10" damageabsorption="0.5" />
     </parts>
     
Index: /code/branches/modularships/src/orxonox/worldentities/WorldEntity.h
===================================================================
--- /code/branches/modularships/src/orxonox/worldentities/WorldEntity.h	(revision 10028)
+++ /code/branches/modularships/src/orxonox/worldentities/WorldEntity.h	(revision 10029)
@@ -206,4 +206,7 @@
 
             void notifyChildPropsChanged();
+
+            inline int getNumAttachedObj()
+                { return this->children_.size(); }
 
         protected:
Index: /code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
===================================================================
--- /code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	(revision 10028)
+++ /code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	(revision 10029)
@@ -78,8 +78,10 @@
     {
         // iterate through all attached objects
-        for (unsigned int i=0; i < 100; i++)
+        for (unsigned int i=0; i < this->getNumAttachedObj(); i++)
         {
             if (this->getAttachedObject(i) == NULL)
+            {
                 break;
+            }
             // iterate through all attached parts
             for(unsigned int j = 0; j < this->partList_.size(); j++)
@@ -149,5 +151,5 @@
     void ModularSpaceShip::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
     {
-        orxout() << "Mdamage(): Collision detected on " << this->getRadarName() << ", btCS*: " << cs << endl;
+        /*orxout() << "Mdamage(): Collision detected on " << this->getRadarName() << ", btCS*: " << cs << endl;
         orxout() << "UserPtr of said collisionShape: " << cs->getUserPointer() << endl;
 
@@ -177,12 +179,8 @@
         //orxout() << "ShipPart of Entity " << cs->getUserPointer() << ": " << this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) << endl;
 
-        orxout() << "CP_start" << endl;
-
         if (this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) != NULL)
             this->getPartOfEntity((StaticEntity*)(cs->getUserPointer()))->handleHit(damage, healthdamage, shielddamage, originator);
         else
             SpaceShip::damage(damage, healthdamage, shielddamage, originator, cs);
-
-        orxout() << "CP_end" << endl;
 
         /*
@@ -267,5 +265,8 @@
         {
             if(this->partList_[i] == part)
+            {
                 this->partList_.erase(it);
+                break;
+            }
             it++;
         }
@@ -275,5 +276,9 @@
             if (itt->second == part)
             {
-                this->detach(itt->first);
+                //this->detach(itt->first);
+                //itt->first->destroy();
+                itt->first->setActive(false);
+                itt->first->setVisible(false);
+                itt->first->setCollisionResponse(false);
                 this->partMap_.erase(itt);
             }
