Index: code/branches/weapons/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/weapons/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2898)
+++ code/branches/weapons/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2912)
@@ -39,4 +39,8 @@
 #include "objects/worldentities/ParticleSpawner.h"
 #include "objects/worldentities/ExplosionChunk.h"
+#include "objects/weaponSystem/WeaponSystem.h"
+#include "objects/weaponSystem/WeaponSlot.h"
+#include "objects/weaponSystem/WeaponPack.h"
+#include "objects/weaponSystem/WeaponSet.h"
 
 namespace orxonox
@@ -66,5 +70,5 @@
         {
             this->weaponSystem_ = new WeaponSystem(this);
-            this->weaponSystem_->setParentPawn(this);
+            this->weaponSystem_->setPawn(this);
         }
         else
@@ -100,7 +104,7 @@
         XMLPortParam(Pawn, "explosionchunks", setExplosionChunks, getExplosionChunks, xmlelement, mode).defaultValues(7);
 
-        XMLPortObject(Pawn, WeaponSlot, "weaponslots", setWeaponSlot, getWeaponSlot, xmlelement, mode);
-        XMLPortObject(Pawn, WeaponSet, "weaponsets", setWeaponSet, getWeaponSet, xmlelement, mode);
-        XMLPortObject(Pawn, WeaponPack, "weapons", setWeaponPack, getWeaponPack, xmlelement, mode);
+        XMLPortObject(Pawn, WeaponSlot, "weaponslots", addWeaponSlot, getWeaponSlot, xmlelement, mode);
+        XMLPortObject(Pawn, WeaponSet, "weaponsets", addWeaponSet, getWeaponSet, xmlelement, mode);
+        XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPack, getWeaponPack, xmlelement, mode);
     }
 
@@ -119,10 +123,7 @@
         if (this->weaponSystem_)
         {
-            if (this->fire_ & WeaponMode::fire)
-                this->weaponSystem_->fire(WeaponMode::fire);
-            if (this->fire_ & WeaponMode::altFire)
-                this->weaponSystem_->fire(WeaponMode::altFire);
-            if (this->fire_ & WeaponMode::altFire2)
-                this->weaponSystem_->fire(WeaponMode::altFire2);
+            for (unsigned int firemode = 0; firemode < WeaponSystem::getMaxFireModes(); firemode++)
+                if (this->fire_ & WeaponSystem::getFireModeMask(firemode))
+                    this->weaponSystem_->fire(firemode);
         }
         this->fire_ = this->firehack_;
@@ -252,7 +253,7 @@
     }
 
-    void Pawn::fire(WeaponMode::Enum fireMode)
-    {
-        this->firehack_ |= fireMode;
+    void Pawn::fire(unsigned int firemode)
+    {
+        this->firehack_ |= WeaponSystem::getFireModeMask(firemode);
     }
 
@@ -275,5 +276,5 @@
     *       --> e.g. Pickup-Items
     */
-    void Pawn::setWeaponSlot(WeaponSlot * wSlot)
+    void Pawn::addWeaponSlot(WeaponSlot * wSlot)
     {
         this->attach(wSlot);
@@ -285,18 +286,13 @@
     {
         if (this->weaponSystem_)
-            return this->weaponSystem_->getWeaponSlotPointer(index);
+            return this->weaponSystem_->getWeaponSlot(index);
         else
             return 0;
     }
 
-    void Pawn::setWeaponPack(WeaponPack * wPack)
-    {
-        if (this->weaponSystem_)
-        {
-            wPack->setParentWeaponSystem(this->weaponSystem_);
-            wPack->setParentWeaponSystemToAllWeapons(this->weaponSystem_);
-            this->weaponSystem_->attachWeaponPack( wPack,wPack->getFireMode() );
-            wPack->attachNeededMunitionToAllWeapons();
-        }
+    void Pawn::addWeaponPack(WeaponPack * wPack)
+    {
+        if (this->weaponSystem_)
+            this->weaponSystem_->attachWeaponPack(wPack, wPack->getFireMode());
     }
 
@@ -304,10 +300,10 @@
     {
         if (this->weaponSystem_)
-            return this->weaponSystem_->getWeaponPackPointer(firemode);
+            return this->weaponSystem_->getWeaponPack(firemode);
         else
             return 0;
     }
 
-    void Pawn::setWeaponSet(WeaponSet * wSet)
+    void Pawn::addWeaponSet(WeaponSet * wSet)
     {
         if (this->weaponSystem_)
@@ -318,5 +314,5 @@
     {
         if (this->weaponSystem_)
-            return this->weaponSystem_->getWeaponSetPointer(index);
+            return this->weaponSystem_->getWeaponSet(index);
         else
             return 0;
