Index: code/trunk/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.h	(revision 10437)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.h	(revision 11052)
@@ -33,7 +33,9 @@
 
 #include <string>
+#include <vector>
 #include "interfaces/PickupCarrier.h"
 #include "interfaces/RadarViewable.h"
 #include "worldentities/ControllableEntity.h"
+#include "worldentities/ExplosionPart.h"
 
 
@@ -42,9 +44,9 @@
     /**
     @brief
-        Everything in Orxonoy that has a health attribute is a Pawn. After a Pawn is spawned its health is set to
+        Everything in Orxonox that has a health attribute is a Pawn. After a Pawn is spawned its health is set to
         its initial health. In every call of the Pawns tick function the game checks whether the pawns health is at
         or below zero. If it is, the pawn gets killed.
 
-        Pawns can carry pickups and fire weapons. The can also have shields.
+        Pawns can carry pickups and fire weapons. They can also have shields.
 
         Notice that every Pawn is a ControllableEntity.
@@ -62,4 +64,5 @@
 
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
             virtual void tick(float dt);
 
@@ -116,26 +119,37 @@
                 { return this->shieldAbsorption_; }
 
-            // TODO: Rename to shieldRechargeRate
-            virtual void setReloadRate(float reloadrate);
-            inline float getReloadRate() const
-                { return this->reloadRate_; }
-
-            virtual void setReloadWaitTime(float reloadwaittime);
-            inline float getReloadWaitTime() const
-                { return this->reloadWaitTime_; }
-
-            inline void resetReloadCountdown()
-                { this->reloadWaitCountdown_ = 0; }
-
-            inline void startReloadCountdown()
-                { this->reloadWaitCountdown_ = this->getReloadWaitTime(); } // TODO: Implement in Projectile.cc
-
-            virtual void decreaseReloadCountdownTime(float dt);
+            virtual void setShieldRechargeRate(float shieldRechargeRate);
+            inline float getShieldRechargeRate() const
+                { return this->shieldRechargeRate_; }
+
+            virtual void setShieldRechargeWaitTime(float shieldRechargeWaitTime);
+            inline float getShieldRechargeWaitTime() const
+                { return this->shieldRechargeWaitTime_; }
+
+            inline void resetShieldRechargeCountdown()
+                { this->shieldRechargeWaitCountdown_ = 0; }
+
+            inline void startShieldRechargeCountdown()
+                { this->shieldRechargeWaitCountdown_ = this->getShieldRechargeWaitTime(); } // TODO: Implement in Projectile.cc
+
+            virtual void decreaseShieldRechargeCountdownTime(float dt);
+
+            /** @brief Sets the state of the pawns vulnerability. @param bVulnerable */
+            inline void setVulnerable(bool bVulnerable)
+            {
+                if (this->bVulnerable_ != bVulnerable)
+                {
+                    this->bVulnerable_ = bVulnerable;
+                    this->changedVulnerability();
+                }
+            }
+            /** @brief Returns the state of the pawns vulnerability. @return The state of the vulnerability */
+            inline const bool& isVulnerable() const { return this->bVulnerable_; }
+            /** @brief This function gets called if the vulnerability of the pawn changes. */
+            virtual void changedVulnerability();
 
             inline ControllableEntity* getLastHitOriginator() const
                 { return this->lastHitOriginator_; }
 
-            //virtual void hit(Pawn* originator, const Vector3& force, float damage);
-            //virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage);
             virtual void hit(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, const btCollisionShape* cs, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
@@ -144,6 +158,8 @@
 
             virtual void fired(unsigned int firemode);
-            virtual void reload();
             virtual void postSpawn();
+
+            void addExplosionPart(ExplosionPart* ePart);
+            ExplosionPart * getExplosionPart();
 
             void addWeaponSlot(WeaponSlot * wSlot);
@@ -154,4 +170,10 @@
             void addWeaponPackXML(WeaponPack * wPack);
             WeaponPack * getWeaponPack(unsigned int index) const;
+            std::vector<WeaponPack *> * getAllWeaponPacks();
+
+            void addMunitionXML(Munition* munition);
+            Munition* getMunitionXML() const;
+            
+            Munition* getMunition(SubclassIdentifier<Munition> * identifier);
 
             virtual void addedWeaponPack(WeaponPack* wPack) {}
@@ -194,4 +216,7 @@
             const std::string& getExplosionSound();
 
+            virtual const WeaponSystem* getWeaponSystem() const
+                { return this->weaponSystem_; }
+
         protected:
             virtual void preDestroy();
@@ -204,11 +229,10 @@
             virtual Controller* getSlave();
             virtual void goWithStyle();
-            virtual void deatheffect();
             virtual void spawneffect();
 
-            //virtual void damage(float damage, Pawn* originator = 0);
             virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL, const btCollisionShape* cs = NULL);
 
             bool bAlive_;
+            bool bVulnerable_; ///< If false the pawn may not ged damaged
 
             virtual std::vector<PickupCarrier*>* getCarrierChildren(void) const
@@ -226,7 +250,7 @@
             float initialShieldHealth_;
             float shieldAbsorption_; ///< Has to be between 0 and 1
-            float reloadRate_;
-            float reloadWaitTime_;
-            float reloadWaitCountdown_;
+            float shieldRechargeRate_;
+            float shieldRechargeWaitTime_;
+            float shieldRechargeWaitCountdown_;
 
             float damageMultiplier_; ///< Used by the Damage Boost Pickup.
@@ -235,9 +259,10 @@
 
             WeaponSystem* weaponSystem_;
-            bool bReload_;
 
             std::string spawnparticlesource_;
             float spawnparticleduration_;
             unsigned int numexplosionchunks_;
+
+            std::vector<ExplosionPart*> explosionPartList_;
 
         private:
