Index: code/branches/modularships/src/external/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
===================================================================
--- code/branches/modularships/src/external/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp	(revision 10052)
+++ code/branches/modularships/src/external/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp	(revision 10053)
@@ -21,4 +21,5 @@
 #include "LinearMath/btAabbUtil2.h"
 #include "btManifoldResult.h"
+#include <iostream>
 
 btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped)
@@ -115,5 +116,6 @@
 	void	ProcessChildShape(btCollisionShape* childShape,int index)
 	{
-		btAssert(index>=0);
+		// std::cout << "PCS: " << childShape << std::endl; // FIXME: (noep) remove DEBUG
+	    btAssert(index>=0);
 		btCompoundShape* compoundShape = static_cast<btCompoundShape*>(m_compoundColObj->getCollisionShape());
 		btAssert(index<compoundShape->getNumChildShapes());
Index: code/branches/modularships/src/orxonox/Scene.cc
===================================================================
--- code/branches/modularships/src/orxonox/Scene.cc	(revision 10052)
+++ code/branches/modularships/src/orxonox/Scene.cc	(revision 10053)
@@ -345,6 +345,4 @@
                                              int index0, const btCollisionObject* colObj1, int partId1, int index1)
     {
-        orxout() << "collisionCb()" << endl;
-
         // get the WorldEntity pointers
         SmartPtr<WorldEntity> object0 = static_cast<WorldEntity*>(colObj0->getUserPointer());
@@ -362,6 +360,4 @@
             modified |= object1->collidesAgainst(object0, cs0, cp);
 
-        orxout() << "collisionCb() completed." << endl;
-
         return modified;
     }
Index: code/branches/modularships/src/orxonox/items/PartDestructionEvent.cc
===================================================================
--- code/branches/modularships/src/orxonox/items/PartDestructionEvent.cc	(revision 10052)
+++ code/branches/modularships/src/orxonox/items/PartDestructionEvent.cc	(revision 10053)
@@ -49,5 +49,5 @@
     {
         RegisterObject(PartDestructionEvent);
-        this->isValid_ = false;
+        this->setValid(true);
     }
 
@@ -76,11 +76,28 @@
     void PartDestructionEvent::execute()
     {
-        if(!this->isValid_)
+        // Do not execute if this event is invalid
+        if(!isValid())
         {
-            //orxout(internal_warning) <<
+            orxout(internal_warning) << "Attempted to execute an invalid PartDestructionEvent!" << endl;
             return;
         }
 
+        if (this->targetType_ == "ship")
+        {
+            switch (this->targetParam_) {
+            case shieldhealth:
+                this->parent_->getParent()->setShieldHealth(operate(this->parent_->getParent()->getShieldHealth()));
+                break;
+            default:
+                break;
+            }
+            this->setValid(false);
+            return;
+        }
+    }
 
+    void PartDestructionEvent::setParent(ShipPart* part)
+    {
+        this->parent_ = part;
     }
 
@@ -95,6 +112,6 @@
 
         // Error, if invalid target-type was entered.
-        orxout(internal_warning) << type << " is not a valid target-type for a PartDestructionEvent. Valid types are: ship engine weapon" << endl;
-        this->isValid_ = false;
+        orxout(internal_warning) << "\"" << type << "\" is not a valid target-type for a PartDestructionEvent. Valid types are: ship engine weapon" << endl;
+        this->setValid(false);
         return;
     }
@@ -117,5 +134,5 @@
         {
             orxout(internal_warning) << "No valid target-type defined. Cannot set target-param for this PartDestructionEvent." << endl;
-            this->isValid_ = false;
+            this->setValid(false);
             return;
         }
@@ -131,11 +148,14 @@
             if (param == "shieldhealth")
             {
-                this->targetParam_ = param;
+                this->targetParam_ = shieldhealth;
                 return;
             }
 
-            orxout(internal_warning) << param << " is not a valid target-param for a PartDestructionEvent with target-type \"ship\". Valid types are: shieldhealth maxshieldhealth shieldabsorption shieldrechargerate" << endl;
+            orxout(internal_warning) << "\"" << param << "\" is not a valid target-param for a PartDestructionEvent with target-type \"ship\". Valid types are: shieldhealth maxshieldhealth shieldabsorption shieldrechargerate" << endl;
             return;
         }
+
+        orxout(internal_warning) << "No valid target-param defined. The chosen param is either invalid or not available for this target-type." << endl;
+        this->setValid(false);
     }
 
@@ -143,5 +163,26 @@
     {
         // * + - destroy
-        this->operation_ = operation;
+        if ((operation == "*") || (operation == "+") || (operation == "-") || (operation == "destroy"))
+        {
+            this->operation_ = operation;
+            return;
+        }
+        this->operation_ = "NULL";
+        orxout(internal_warning) << "\"" << operation << "\" is not a valid operation for a PartDestructionEvent. Valid operations are: * + - destroy" << endl;
+    }
+
+    float PartDestructionEvent::operate(float input)
+    {
+        if (this->operation_ == "*")
+            return input * this->value_;
+        if (this->operation_ == "+")
+            return input + this->value_;
+        if (this->operation_ == "-")
+            return input - this->value_;
+        if (this->operation_ == "destroy")
+        {
+            return 0;
+        }
+        return 0;
     }
 
Index: code/branches/modularships/src/orxonox/items/PartDestructionEvent.h
===================================================================
--- code/branches/modularships/src/orxonox/items/PartDestructionEvent.h	(revision 10052)
+++ code/branches/modularships/src/orxonox/items/PartDestructionEvent.h	(revision 10053)
@@ -44,4 +44,13 @@
         public:
 
+            enum TargetParam
+            {
+                shieldhealth,
+                maxshieldhealth,
+                shieldabsorption,
+                shieldrechargerate,
+                null
+            };
+
             PartDestructionEvent(Context* context);
             virtual ~PartDestructionEvent();
@@ -50,4 +59,13 @@
 
             void execute();
+
+            inline void setValid(bool valid)
+                { this->valid_ = valid; }
+            inline bool isValid()
+                { return this->valid_; }
+
+            void setParent(ShipPart* parent);
+            inline ShipPart* getParent()
+                { return this->parent_; }
 
             void setTargetType(std::string type);
@@ -67,4 +85,6 @@
                 { return this->operation_; }
 
+            float operate(float input);
+
             void setEventValue(float value);
             inline float getEventValue()
@@ -75,9 +95,10 @@
         private:
 
-            bool isValid_;
+            ShipPart* parent_;
+            bool valid_;
 
             std::string targetType_;
             std::string targetName_;
-            std::string targetParam_;
+            TargetParam targetParam_;
             std::string operation_;
 
Index: code/branches/modularships/src/orxonox/items/ShipPart.cc
===================================================================
--- code/branches/modularships/src/orxonox/items/ShipPart.cc	(revision 10052)
+++ code/branches/modularships/src/orxonox/items/ShipPart.cc	(revision 10053)
@@ -51,4 +51,5 @@
     {
         RegisterObject(ShipPart);
+        this->setAlive(true);
     }
 
@@ -91,4 +92,17 @@
     void ShipPart::death()
     {
+        if (!(this->isAlive()))
+            return;
+
+        this->setAlive(false);
+
+        // Execute all destruction events
+        for (unsigned int i = 0; i < this->eventList_.size(); i++)
+        {
+            orxout() << "executing" << endl;
+            this->getDestructionEvent(i)->execute();
+        }
+
+        // Remove this ShipPart from the parent.
         this->parent_->removeShipPart(this);
         orxout() << this->getName() << " has died." << endl;
@@ -105,5 +119,4 @@
         OrxAssert(entity != NULL, "The Entity cannot be NULL.");
         this->entityList_.push_back(entity);
-        //part->addToSpaceShip(this); //FIXME: (noep) add
     }
 
@@ -153,9 +166,9 @@
         A pointer to the PartDestructionEvent to be added.
     */
-    void ShipPart::addDestructionEvent(PartDestructionEvent* part)
-    {
-        OrxAssert(part != NULL, "The PartDestructionEvent cannot be NULL.");
-        this->eventList_.push_back(part);
-        //part->setParent(this);
+    void ShipPart::addDestructionEvent(PartDestructionEvent* event)
+    {
+        OrxAssert(event != NULL, "The PartDestructionEvent cannot be NULL.");
+        event->setParent(this);
+        this->eventList_.push_back(event);
     }
 
@@ -168,5 +181,5 @@
     PartDestructionEvent* ShipPart::getDestructionEvent(unsigned int index)
     {
-        if(this->eventList_.size() >= index)
+        if(this->eventList_.size() <= index)
             return NULL;
         else
@@ -200,4 +213,5 @@
     {
         orxout() << "ShipPart " <<this->getName() << " is handling a hit!" << endl;
+
         if (parent_->getGametype() && parent_->getGametype()->allowPawnDamage(parent_, originator))
         {
Index: code/branches/modularships/src/orxonox/items/ShipPart.h
===================================================================
--- code/branches/modularships/src/orxonox/items/ShipPart.h	(revision 10052)
+++ code/branches/modularships/src/orxonox/items/ShipPart.h	(revision 10053)
@@ -73,4 +73,9 @@
                 { return this->parent_; }
 
+            inline void setAlive(bool var)
+                { this->alive_ = var; }
+            inline bool isAlive()
+                { return this->alive_; }
+
             virtual void setHealth(float health);
             inline void addHealth(float health)
@@ -108,4 +113,6 @@
             std::vector<PartDestructionEvent*> eventList_;  // The list of all PartDestructionEvent assigned to this ShipPart.
 
+            bool alive_;
+
 
     }; // tolua_export
Index: code/branches/modularships/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/branches/modularships/src/orxonox/worldentities/WorldEntity.cc	(revision 10052)
+++ code/branches/modularships/src/orxonox/worldentities/WorldEntity.cc	(revision 10053)
@@ -119,5 +119,4 @@
     WorldEntity::~WorldEntity()
     {
-        orxout() << "destroying " << this->getIdentifier()->getName() << endl;
         if (this->isInitialized())
         {
@@ -581,5 +580,4 @@
     {
         // Note: The collision shapes may not be detached with this function!
-        orxout() << "WE: detachCS()" << endl;
         this->collisionShape_->detach(shape);
         // Note: this->collisionShape_ already notifies us of any changes.
Index: code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
===================================================================
--- code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	(revision 10052)
+++ code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	(revision 10053)
@@ -133,5 +133,5 @@
         this->entityPtrList_.push_back(one);
 
-        this->createCSPtrList(this->getWorldEntityCollisionShape());
+        //this->createCSPtrList(this->getWorldEntityCollisionShape());
 
         orxout() << "New entity-part assignment created!" << endl;
@@ -139,5 +139,5 @@
 
     // This should add smartPointers to all (Orxonox)Collisionshapes of this SpaceShip, preventing them fromg etting deleted. Might not work due to weird acting getAttachedShape
-    void ModularSpaceShip::createCSPtrList(CompoundCollisionShape* cs)
+    void ModularSpaceShip::createCSPtrList(CompoundCollisionShape* cs) // FIXME: (noep) remove debug
     {
         for (int i=0; i < cs->getNumChildShapes(); i++)
@@ -208,6 +208,4 @@
         //orxout() << "ShipPart of Entity " << cs->getUserPointer() << ": " << this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) << endl;
 
-        orxout() << "CP before handleHit" << endl;
-
         if (this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) != NULL)
             this->getPartOfEntity((StaticEntity*)(cs->getUserPointer()))->handleHit(damage, healthdamage, shielddamage, originator);
@@ -255,5 +253,4 @@
         this->partList_.push_back(part);
         part->setParent(this);
-        //part->addToSpaceShip(this); //FIXME: (noep) add
         this->updatePartAssignment();
     }
@@ -267,5 +264,5 @@
     ShipPart* ModularSpaceShip::getShipPart(unsigned int index)
     {
-        if(this->partList_.size() >= index)
+        if(this->partList_.size() <= index)
             return NULL;
         else
@@ -339,5 +336,5 @@
         this->printBtChildShapes((btCompoundShape*)(this->getWorldEntityCollisionShape()->getCollisionShape()), 2, 0);
         this->detachCollisionShape(object->collisionShape_);  // after succeeding, causes a crash in the collision handling
-        this->printBtChildShapes((btCompoundShape*)(this->getWorldEntityCollisionShape()->getCollisionShape()), 2, 0);
+        //this->printBtChildShapes((btCompoundShape*)(this->getWorldEntityCollisionShape()->getCollisionShape()), 2, 0);
 
         // mass
