Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Weapon.cc
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Weapon.cc	(revision 2743)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Weapon.cc	(revision 2778)
@@ -65,4 +65,5 @@
         XMLPortParam(Weapon, "bulletLoadingTime", setBulletLoadingTime, getBulletLoadingTime, xmlelement, mode);
         XMLPortParam(Weapon, "magazineLoadingTime", setMagazineLoadingTime, getMagazineLoadingTime, xmlelement, mode);
+        XMLPortParam(Weapon, "bSharedMunition", setSharedMunition, getSharedMunition, xmlelement, mode);
     }
 
@@ -97,5 +98,5 @@
             {
 //COUT(0) << "LaserGun::fire - no magazines" << std::endl;
-                //actions
+                //no magazines
             }
         }
@@ -103,5 +104,5 @@
         {
 //COUT(0) << "LaserGun::fire - weapon not reloaded - bullets remaining:" << this->munition_->bullets() << std::endl;
-            //actions
+            //weapon not reloaded
         }
 
@@ -141,18 +142,30 @@
 //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 the weapon shares one munitionType put it into sharedMunitionSet
+        //else to munitionSet
         if (this->parentWeaponSystem_)
         {
-//COUT(0) << "Weapon::attachNeededMunition " << munitionName << std::endl;
-            Munition* munition = this->parentWeaponSystem_->getMunitionType(munitionName);
-            if ( munition )
-                this->munition_ = munition;
-            else
-            {
-                //create new munition with identifier
-//COUT(0) << "Weapon::attachNeededMunition, create new Munition of Type " << munitionName << std::endl;
+            if (this->bSharedMunition_ == false)
+            {
                 this->munitionIdentifier_ = ClassByString(munitionName);
                 this->munition_ = this->munitionIdentifier_.fabricate(this);
                 this->parentWeaponSystem_->setNewMunition(munitionName, this->munition_);
             }
+            else
+            {
+//COUT(0) << "Weapon::attachNeededMunition " << munitionName << std::endl;
+                //getMunitionType returns 0 if there is no such munitionType
+                Munition* munition = this->parentWeaponSystem_->getMunitionType(munitionName);
+                if ( munition )
+                    this->munition_ = munition;
+                else
+                {
+                    //create new munition with identifier because there is no such munitionType
+//COUT(0) << "Weapon::attachNeededMunition, create new Munition of Type " << munitionName << std::endl;
+                    this->munitionIdentifier_ = ClassByString(munitionName);
+                    this->munition_ = this->munitionIdentifier_.fabricate(this);
+                    this->parentWeaponSystem_->setNewSharedMunition(munitionName, this->munition_);
+                }
+            }
         }
     }
@@ -180,4 +193,10 @@
     const float Weapon::getMagazineLoadingTime()
     {   return this->magazineLoadingTime_;  }
+
+    void Weapon::setSharedMunition(bool bSharedMunition)
+    {   this->bSharedMunition_ = bSharedMunition; }
+
+    const bool Weapon::getSharedMunition()
+    {   return this->bSharedMunition_;  }
 
 
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Weapon.h
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Weapon.h	(revision 2743)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Weapon.h	(revision 2778)
@@ -68,4 +68,6 @@
             virtual void setMagazineLoadingTime(float loadingTime);
             virtual const float getMagazineLoadingTime();
+            virtual void setSharedMunition(bool bSharedMunition);
+            virtual const bool getSharedMunition();
 
             virtual void takeBullets();
@@ -91,4 +93,5 @@
             bool bulletReadyToShoot_;
             bool magazineReadyToShoot_;
+            bool bSharedMunition_;
             float bulletLoadingTime_;
             float magazineLoadingTime_;
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSet.cc
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSet.cc	(revision 2743)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSet.cc	(revision 2778)
@@ -56,20 +56,17 @@
     void WeaponSet::attachWeaponPack(WeaponPack *wPack)
     {
-//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
             //should be possible to choose which slot to use
+
+            //attach every weapon of the weaponPack to a weaponSlot
             for (  int i=0; i < wPack->getSize() ; i++  )
             {
                 //at the moment this function only works for one weaponPack in the entire WeaponSystem...
+                //it also takes the first free weaponSlot...
                 if ( this->parentWeaponSystem_->getWeaponSlotPointer(i)->getAttachedWeapon() == 0 && this->parentWeaponSystem_->getWeaponSlotPointer(i) != 0) //if slot not full
                 {
-//COUT(0) << "WeaponSet::attachWeaponPack attaching Weapon" << std::endl;
                     this->setWeaponSlots_.push_back( this->parentWeaponSystem_->getWeaponSlotPointer(i) );
                     this->parentWeaponSystem_->getWeaponSlotPointer(i)->attachWeapon( wPack->getWeaponPointer(wPackWeapon) );
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.cc
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.cc	(revision 2743)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.cc	(revision 2778)
@@ -38,8 +38,7 @@
 
 
-/* WEAPONSYSTEM
- * creates the WeaponSystem and the ability to use weapons and munition
- * loads the weapon the whole weaponSystem setting from an xml file
+/* WeaponSystem
  *
+ *  www.orxonox.net/wiki/WeaponSystem
  */
 
@@ -84,10 +83,15 @@
     }
 
-    //returns the Pointer to the munitionType
+    void WeaponSystem::setNewSharedMunition(std::string munitionType, Munition * munitionToAdd)
+    {
+        this->munitionSharedSet_[munitionType] = munitionToAdd;
+    }
+
+    //returns the Pointer to the munitionType, if this munitionType doesn't exist returns 0, see Weapon::attachNeededMunition
     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())
+        std::map<std::string, Munition *>::const_iterator it = this->munitionSharedSet_.find(munitionType);
+        if (it != this->munitionSharedSet_.end())
             return it->second;
         else
@@ -96,18 +100,9 @@
 
 
-/*
-    //the first weaponSet is at n=0
-    void WeaponSystem::setActiveWeaponSet(unsigned int n)
-    {
-        if (n < this->weaponSets_.size())
-            this->activeWeaponSet_ = this->weaponSets_[n];
-        else
-            this->activeWeaponSet_ = this->weaponSets_[0];
-    }
-*/
+
 
 
     //n is the n'th weaponSet, starting with zero
-    //SpaceShip.cc only needs to have the keybinding to a specific Set-number n
+    //SpaceShip.cc only needs to have the keybinding to a specific Set-number n (=firemode)
     void WeaponSystem::fire(WeaponMode::Enum n)
     {
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.h
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.h	(revision 2743)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.h	(revision 2778)
@@ -53,5 +53,4 @@
             //void fire();
             void fire(WeaponMode::Enum fireMode);
-            //void setActiveWeaponSet(unsigned int n);
             void attachWeaponPack(WeaponPack * wPack, unsigned int firemode);
             WeaponSet * getWeaponSetPointer(unsigned int n);
@@ -59,4 +58,5 @@
             WeaponPack * getWeaponPackPointer(unsigned int n);
             void setNewMunition(std::string munitionType, Munition * munitionToAdd);
+            void setNewSharedMunition(std::string munitionType, Munition * munitionToAdd);
             Munition * getMunitionType(std::string munitionType);
 
@@ -73,4 +73,5 @@
             std::vector<WeaponSlot *> weaponSlots_;
             std::vector<WeaponPack *> weaponPacks_;
+            std::map<std::string, Munition *> munitionSharedSet_;
             std::map<std::string, Munition *> munitionSet_;
             WeaponSet *activeWeaponSet_;
