Index: code/branches/modularships/src/orxonox/Scene.cc
===================================================================
--- code/branches/modularships/src/orxonox/Scene.cc	(revision 9994)
+++ code/branches/modularships/src/orxonox/Scene.cc	(revision 9995)
@@ -201,5 +201,5 @@
             // Note: This is a global variable which we assign a static function.
             // TODO: Check whether this (or anything about Bullet) works with multiple physics engine instances.
-            gContactAddedCallback = &Scene::collisionCallback;
+            gContactAddedCallback = &Scene::customCollisionCallback;
         }
         else if (!wantPhysics && hasPhysics())
@@ -358,3 +358,24 @@
         return modified;
     }
+
+    /* ADDED static*/ bool Scene::customCollisionCallback(btManifoldPoint& cp, const btCollisionObject* colObj0, int partId0,
+                                             int index0, const btCollisionObject* colObj1, int partId1, int index1)
+    {
+        // get the WorldEntity pointers
+        SmartPtr<WorldEntity> object0 = static_cast<WorldEntity*>(colObj0->getUserPointer());
+        SmartPtr<WorldEntity> object1 = static_cast<WorldEntity*>(colObj1->getUserPointer());
+
+        // get the CollisionShape pointers
+        const btCollisionShape* cs0 = colObj0->getCollisionShape();
+        const btCollisionShape* cs1 = colObj1->getCollisionShape();
+
+        // false means that bullet will assume we didn't modify the contact
+        bool modified = false;
+        if (object0->isCollisionCallbackActive())
+            modified |= object0->customCollidesAgainst(object1, cs0, cp);
+        if (object1->isCollisionCallbackActive())
+            modified |= object1->customCollidesAgainst(object0, cs1, cp);
+
+        return modified;
+    }
 }
Index: code/branches/modularships/src/orxonox/Scene.h
===================================================================
--- code/branches/modularships/src/orxonox/Scene.h	(revision 9994)
+++ code/branches/modularships/src/orxonox/Scene.h	(revision 9995)
@@ -143,4 +143,7 @@
                                           int index0, const btCollisionObject* colObj1, int partId1, int index1);
 
+            static bool customCollisionCallback(btManifoldPoint& cp, const btCollisionObject* colObj0, int partId0,
+                                                      int index0, const btCollisionObject* colObj1, int partId1, int index1);
+
             // Bullet objects
             btDiscreteDynamicsWorld*             physicalWorld_;
Index: code/branches/modularships/src/orxonox/worldentities/MovableEntity.cc
===================================================================
--- code/branches/modularships/src/orxonox/worldentities/MovableEntity.cc	(revision 9994)
+++ code/branches/modularships/src/orxonox/worldentities/MovableEntity.cc	(revision 9995)
@@ -87,4 +87,19 @@
     }
 
+    bool MovableEntity::customCollidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
+    {
+        if (GameMode::isMaster() && enableCollisionDamage_)
+        {
+            Pawn* victim = orxonox_cast<Pawn*>(otherObject);
+            if (victim)
+            {
+                float damage = this->collisionDamage_ * (victim->getVelocity() - this->getVelocity()).length();
+                victim->customHit(0, contactPoint, ownCollisionShape, damage);
+            }
+        }
+
+        return false;
+    }
+
 
     void MovableEntity::registerVariables()
Index: code/branches/modularships/src/orxonox/worldentities/MovableEntity.h
===================================================================
--- code/branches/modularships/src/orxonox/worldentities/MovableEntity.h	(revision 9994)
+++ code/branches/modularships/src/orxonox/worldentities/MovableEntity.h	(revision 9995)
@@ -48,4 +48,5 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
             virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
+            virtual bool customCollidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
 
             using WorldEntity::setPosition;
Index: code/branches/modularships/src/orxonox/worldentities/WorldEntity.h
===================================================================
--- code/branches/modularships/src/orxonox/worldentities/WorldEntity.h	(revision 9994)
+++ code/branches/modularships/src/orxonox/worldentities/WorldEntity.h	(revision 9995)
@@ -375,4 +375,7 @@
             */
             virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
+                { return false; } /* With false, Bullet assumes no modification to the collision objects. */
+
+            virtual inline bool customCollidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
                 { return false; } /* With false, Bullet assumes no modification to the collision objects. */
 
Index: code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.cc	(revision 9994)
+++ code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.cc	(revision 9995)
@@ -274,4 +274,36 @@
     }
 
+    void Pawn::customDamage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
+    {
+        // Applies multiplier given by the DamageBoost Pickup.
+        if (originator)
+            damage *= originator->getDamageMultiplier();
+
+        orxout() << "damage(): Custom collision detected on CS: " << cs << endl;
+
+        if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
+        {
+            if (shielddamage >= this->getShieldHealth())
+            {
+                this->setShieldHealth(0);
+                this->setHealth(this->health_ - (healthdamage + damage));
+            }
+            else
+            {
+                this->setShieldHealth(this->shieldHealth_ - shielddamage);
+
+                // remove remaining shieldAbsorpton-Part of damage from shield
+                shielddamage = damage * this->shieldAbsorption_;
+                shielddamage = std::min(this->getShieldHealth(),shielddamage);
+                this->setShieldHealth(this->shieldHealth_ - shielddamage);
+
+                // set remaining damage to health
+                this->setHealth(this->health_ - (damage - shielddamage) - healthdamage);
+            }
+
+            this->lastHitOriginator_ = originator;
+        }
+    }
+
 // TODO: Still valid?
 /* HIT-Funktionen
@@ -288,4 +320,12 @@
     }
 
+    void Pawn::customHit(Pawn* originator, const Vector3& force, const btCollisionShape* cs, float damage, float healthdamage, float shielddamage)
+    {
+        if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
+        {
+            this->customDamage(damage, healthdamage, shielddamage, originator, cs);
+            this->setVelocity(this->getVelocity() + force);
+        }
+    }
 
     void Pawn::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage, float shielddamage)
@@ -294,4 +334,15 @@
         {
             this->damage(damage, healthdamage, shielddamage, originator);
+
+            if ( this->getController() )
+                this->getController()->hit(originator, contactpoint, damage); // changed to damage, why shielddamage?
+        }
+    }
+
+    void Pawn::customHit(Pawn* originator, btManifoldPoint& contactpoint, const btCollisionShape* cs, float damage, float healthdamage, float shielddamage)
+    {
+        if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
+        {
+            this->customDamage(damage, healthdamage, shielddamage, originator, cs);
 
             if ( this->getController() )
Index: code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.h	(revision 9994)
+++ code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.h	(revision 9995)
@@ -127,5 +127,7 @@
             //virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage);
             virtual void hit(Pawn* originator, const Vector3& force, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
+            virtual void customHit(Pawn* originator, const Vector3& force, const btCollisionShape* cs, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
             virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
+            virtual void customHit(Pawn* originator, btManifoldPoint& contactpoint, const btCollisionShape* cs, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
 
             virtual void kill();
@@ -197,4 +199,5 @@
             //virtual void damage(float damage, Pawn* originator = 0);
             virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL);
+            virtual void customDamage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL, const btCollisionShape* cs = NULL);
 
             bool bAlive_;
