Index: code/branches/ppspickups3/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/ppspickups3/src/orxonox/worldentities/pawns/Pawn.cc	(revision 6756)
+++ code/branches/ppspickups3/src/orxonox/worldentities/pawns/Pawn.cc	(revision 6884)
@@ -64,4 +64,6 @@
         this->maxHealth_ = 0;
         this->initialHealth_ = 0;
+        this->shieldHealth_ = 0;
+        this->shieldAbsorption_ = 0;
 
         this->lastHitOriginator_ = 0;
@@ -105,4 +107,8 @@
         XMLPortParam(Pawn, "maxhealth", setMaxHealth, getMaxHealth, xmlelement, mode).defaultValues(200);
         XMLPortParam(Pawn, "initialhealth", setInitialHealth, getInitialHealth, xmlelement, mode).defaultValues(100);
+        
+        XMLPortParam(Pawn, "shieldhealth", setShieldHealth, getShieldHealth, xmlelement, mode).defaultValues(0);
+        XMLPortParam(Pawn, "shieldabsorption", setShieldAbsorption, getShieldAbsorption, xmlelement, mode).defaultValues(0);
+        
         XMLPortParam(Pawn, "spawnparticlesource", setSpawnParticleSource, getSpawnParticleSource, xmlelement, mode);
         XMLPortParam(Pawn, "spawnparticleduration", setSpawnParticleDuration, getSpawnParticleDuration, xmlelement, mode).defaultValues(3.0f);
@@ -116,9 +122,11 @@
     void Pawn::registerVariables()
     {
-        registerVariable(this->bAlive_,        VariableDirection::ToClient);
-        registerVariable(this->health_,        VariableDirection::ToClient);
-        registerVariable(this->initialHealth_, VariableDirection::ToClient);
-        registerVariable(this->bReload_,       VariableDirection::ToServer);
-        registerVariable(this->aimPosition_,   Bidirectionality::ServerMaster, 0, true);
+        registerVariable(this->bAlive_,           VariableDirection::ToClient);
+        registerVariable(this->health_,           VariableDirection::ToClient);
+        registerVariable(this->initialHealth_,    VariableDirection::ToClient);
+        registerVariable(this->shieldHealth_,     VariableDirection::ToClient);
+        registerVariable(this->shieldAbsorption_, VariableDirection::ToClient);
+        registerVariable(this->bReload_,          VariableDirection::ToServer);
+        registerVariable(this->aimPosition_,      Bidirectionality::ServerMaster, 0, true);
     }
 
@@ -159,5 +167,22 @@
         if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
         {
-            this->setHealth(this->health_ - damage);
+            //share the dealt damage to the shield and the Pawn.
+            float shielddamage = damage*this->shieldAbsorption_;
+            float healthdamage = damage*(1-this->shieldAbsorption_);
+            
+            // In case the shield can not take all the shield damage.
+            if (shielddamage > this->getShieldHealth()) 
+            {
+                healthdamage += shielddamage-this->getShieldHealth();
+                this->setShieldHealth(0);
+            }
+
+            this->setHealth(this->health_ - healthdamage);
+            
+            if (this->getShieldHealth() > 0)
+            {
+                this->setShieldHealth(this->shieldHealth_ - shielddamage);
+            }
+
             this->lastHitOriginator_ = originator;
 
@@ -165,5 +190,5 @@
         }
     }
-
+    
     void Pawn::hit(Pawn* originator, const Vector3& force, float damage)
     {
Index: code/branches/ppspickups3/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/ppspickups3/src/orxonox/worldentities/pawns/Pawn.h	(revision 6756)
+++ code/branches/ppspickups3/src/orxonox/worldentities/pawns/Pawn.h	(revision 6884)
@@ -73,4 +73,14 @@
                 { return this->initialHealth_; }
 
+            inline void setShieldHealth(float shieldHealth)
+            { this->shieldHealth_ = shieldHealth; }
+            inline float getShieldHealth()
+            { return this->shieldHealth_; }
+            
+            inline void setShieldAbsorption(float shieldAbsorption)
+            { this->shieldAbsorption_ = shieldAbsorption; }
+            inline float getShieldAbsorption()
+            { return this->shieldAbsorption_; }
+
             inline ControllableEntity* getLastHitOriginator() const
                 { return this->lastHitOriginator_; }
@@ -141,4 +151,6 @@
             float maxHealth_;
             float initialHealth_;
+            float shieldHealth_;
+            float shieldAbsorption_; // Has to be between 0 and 1
 
             Pawn* lastHitOriginator_;
