Index: /code/branches/weapon2/src/orxonox/objects/weaponSystem/Weapon.cc
===================================================================
--- /code/branches/weapon2/src/orxonox/objects/weaponSystem/Weapon.cc	(revision 2365)
+++ /code/branches/weapon2/src/orxonox/objects/weaponSystem/Weapon.cc	(revision 2366)
@@ -84,7 +84,9 @@
     void Weapon::attachNeededMunition(std::string munitionName)
     {
+COUT(0) << "Weapon::attachNeededMunition, parentWeaponSystem=" << this->parentWeaponSystem_ << std::endl;
         //if munition type already exists attach it, else create a new one of this type and attach it to the weapon and to the WeaponSystem
         if (this->parentWeaponSystem_)
         {
+COUT(0) << "Weapon::attachNeededMunition " << munitionName << std::endl;
             Munition* munition = this->parentWeaponSystem_->getMunitionType(munitionName);
             if ( munition )
Index: /code/branches/weapon2/src/orxonox/objects/weaponSystem/Weapon.h
===================================================================
--- /code/branches/weapon2/src/orxonox/objects/weaponSystem/Weapon.h	(revision 2365)
+++ /code/branches/weapon2/src/orxonox/objects/weaponSystem/Weapon.h	(revision 2366)
@@ -70,6 +70,6 @@
             Timer<Weapon> *getMagazineTimer();
 
-            void setMunitionType(std::string munitionType);
-            const std::string getMunitionType();
+            virtual void setMunitionType(std::string munitionType);
+            virtual const std::string getMunitionType();
 
             inline void setParentWeaponSlot(WeaponSlot *parentWeaponSlot)
Index: /code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.cc
===================================================================
--- /code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.cc	(revision 2365)
+++ /code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.cc	(revision 2366)
@@ -92,6 +92,5 @@
     void WeaponPack::addWeapon(Weapon * weapon)
     {
-        weapon->setParentWeaponSystem(this->parentWeaponSystem_);
-COUT(0) << "WeaponPack::addWeapon " << weapon << "   munition " << weapon->getMunitionType() << std::endl;
+COUT(0) << "WeaponPack::addWeapon:" << weapon << "   munition " << weapon->getMunitionType() << std::endl;
         this->weapons_.push_back(weapon);
     }
@@ -102,5 +101,5 @@
     }
 
-    void WeaponPack::setWeaponSystemToAllWeapons(WeaponSystem * weaponSystem)
+    void WeaponPack::setParentWeaponSystemToAllWeapons(WeaponSystem * weaponSystem)
     {
         for (int i=0; i < (int) this->weapons_.size(); i++)
@@ -110,3 +109,13 @@
 
     }
+
+    void WeaponPack::attachNeededMunitionToAllWeapons()
+    {
+        for (int i=0; i < (int) this->weapons_.size(); i++)
+        {
+            this->weapons_[i]->attachNeededMunition(weapons_[i]->getMunitionType());
+        }
+
+    }
+
 }
Index: /code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.h
===================================================================
--- /code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.h	(revision 2365)
+++ /code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.h	(revision 2366)
@@ -59,5 +59,7 @@
             const Weapon * getWeapon(unsigned int index);
 
-            void setWeaponSystemToAllWeapons(WeaponSystem * weaponSystem);
+            //functions needed for creating Pointer to the right objects (-->Pawn.cc)
+            void setParentWeaponSystemToAllWeapons(WeaponSystem * weaponSystem);
+            void attachNeededMunitionToAllWeapons();
 
             inline void setParentWeaponSystem(WeaponSystem *parentWeaponSystem)
Index: /code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSet.cc
===================================================================
--- /code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSet.cc	(revision 2365)
+++ /code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSet.cc	(revision 2366)
@@ -56,6 +56,10 @@
     {
 COUT(0) << "WeaponSet::attachWeaponPack" << std::endl;
+COUT(0) << "........ parentWeaponSystem_=" << this->parentWeaponSystem_ << std::endl;
+COUT(0) << "........ this->parentWeaponSystem_->getWeaponSlotSize()" << this->parentWeaponSystem_->getWeaponSlotSize() << std::endl;
+COUT(0) << "........ wPack->getSize()" << wPack->getSize() << std::endl;
         if ( this->parentWeaponSystem_->getWeaponSlotSize()>0 && wPack->getSize()>0 && ( wPack->getSize() <= this->parentWeaponSystem_->getWeaponSlotSize() ) )
         {
+COUT(0) << "WeaponSet::attachWeaponPack after if" << std::endl;
             this->attachedWeaponPack_ = wPack;
             int wPackWeapon = 0;    //WeaponCounter for Attaching
@@ -78,5 +82,5 @@
     {
         //fires all WeaponSlots available for this weaponSet attached from the WeaponPack
-COUT(0) << "WeaponSet::fire" << std::endl;
+COUT(0) << "WeaponSet::fire from Pack: " << this->attachedWeaponPack_ << std::endl;
         this->attachedWeaponPack_->fire();
     }
Index: /code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.cc
===================================================================
--- /code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.cc	(revision 2365)
+++ /code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.cc	(revision 2366)
@@ -62,5 +62,4 @@
     void WeaponSystem::attachWeaponPack(WeaponPack *wPack, unsigned int firemode)
     {
-        wPack->setParentWeaponSystem(this);
         if (firemode < this->weaponSets_.size())
             this->weaponSets_[firemode]->attachWeaponPack(wPack);
@@ -88,4 +87,5 @@
     Munition * WeaponSystem::getMunitionType(std::string munitionType)
     {
+COUT(0) << "WeaponSystem::getMunitionType " << munitionType << std::endl;
         std::map<std::string, Munition *>::const_iterator it = this->munitionSet_.find(munitionType);
         if (it != this->munitionSet_.end())
Index: /code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/LaserGun.cc
===================================================================
--- /code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/LaserGun.cc	(revision 2365)
+++ /code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/LaserGun.cc	(revision 2366)
@@ -44,10 +44,4 @@
     {
         RegisterObject(LaserGun);
-
-        //set weapon properties here
-        //this->setLoadingTime(0.5);
-
-COUT(0) << "LaserGun::LaserGun" << std::endl;
-        this->attachNeededMunition(this->getMunitionType());
     }
 
@@ -58,5 +52,5 @@
     void LaserGun::fire()
     {
-COUT(0) << "LaserGun::fire" << std::endl;
+COUT(0) << "LaserGun::fire, this=" << this << std::endl;
         if ( this->getBulletReadyToShoot() && this->getMagazineReadyToShoot() )
         {
@@ -81,17 +75,3 @@
     }
 
-    void LaserGun::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(LaserGun, XMLPort, xmlelement, mode);
-        XMLPortParam(LaserGun, "munitionType", setMunitionType, getMunitionType, xmlelement, mode);
-    }
-
-    void LaserGun::setMunitionType(std::string munitionType)
-    {   
-COUT(0) << "LaserGun::setMunitionType (XMLPort) "<< munitionType << std::endl;
-        this->munitionType_ = munitionType; }
-
-    const std::string LaserGun::getMunitionType()
-    {   return this->munitionType_;  }
-
 }
Index: /code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/LaserGun.h
===================================================================
--- /code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/LaserGun.h	(revision 2365)
+++ /code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/LaserGun.h	(revision 2366)
@@ -48,10 +48,5 @@
             virtual ~LaserGun();
 
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
             void fire();
-
-            void setMunitionType(std::string munitionType);
-            const std::string getMunitionType();
 
         private:
Index: /code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- /code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2365)
+++ /code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2366)
@@ -167,7 +167,8 @@
     {   
 COUT(0) << "Pawn::setWeaponPack" << std::endl;
+        wPack->setParentWeaponSystem(this->weaponSystem_);
+        wPack->setParentWeaponSystemToAllWeapons(this->weaponSystem_);
         this->weaponSystem_->attachWeaponPack( wPack,wPack->getFireMode() );
-        wPack->setParentWeaponSystem(this->weaponSystem_);
-        wPack->setWeaponSystemToAllWeapons(this->weaponSystem_);
+        wPack->attachNeededMunitionToAllWeapons();
     }
 
