Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Munition.cc
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Munition.cc	(revision 2778)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Munition.cc	(revision 2804)
@@ -105,5 +105,4 @@
     void Munition::fillBullets()
     {
-//COUT(0) << "Munition::fillBullets maxBullets_=" << this->maxBullets_ << std::endl;
         this->bullets_ = this->maxBullets_;
     }
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Weapon.cc
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Weapon.cc	(revision 2778)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Weapon.cc	(revision 2804)
@@ -42,13 +42,16 @@
     {
         RegisterObject(Weapon);
+
         this->bulletReadyToShoot_ = true;
         this->magazineReadyToShoot_ = true;
         this->parentWeaponSystem_ = 0;
         this->attachedToWeaponSlot_ = 0;
-        this->munition_ = 0;
         this->bulletLoadingTime_ = 0;
         this->magazineLoadingTime_ = 0;
         this->bReloading_ = false;
-
+        this->bulletAmount_= 0;
+        this->magazineAmount_ = 0;
+        this->munition_ = 0;
+        this->unlimitedMunition_ = false;
         this->setObjectMode(0x0);
     }
@@ -66,4 +69,7 @@
         XMLPortParam(Weapon, "magazineLoadingTime", setMagazineLoadingTime, getMagazineLoadingTime, xmlelement, mode);
         XMLPortParam(Weapon, "bSharedMunition", setSharedMunition, getSharedMunition, xmlelement, mode);
+        XMLPortParam(Weapon, "bullets", setBulletAmount, getBulletAmount, xmlelement, mode);
+        XMLPortParam(Weapon, "magazines", setMagazineAmount, getMagazineAmount, xmlelement, mode);
+        XMLPortParam(Weapon, "unlimitedMunition", setUnlimitedMunition, getUnlimitedMunition, xmlelement, mode);
     }
 
@@ -74,34 +80,51 @@
     }
 
+    void Weapon::setMunition()
+    {
+        this->munition_->setMaxBullets(this->bulletAmount_);
+        this->munition_->setMaxMagazines(this->magazineAmount_);
+    }
 
     void Weapon::fire()
     {
-//COUT(0) << "LaserGun::fire, this=" << this << std::endl;
+COUT(0) << "Weapon::fire" << std::endl;
         if ( this->bulletReadyToShoot_ && this->magazineReadyToShoot_ && !this->bReloading_)
         {
-//COUT(0) << "LaserGun::fire - ready to shoot" << std::endl;
-//COUT(0) << "LaserGun::fire - bullets" << this->munition_->bullets() << std::endl;
+COUT(0) << "Weapon::fire 2" << std::endl;
             this->bulletReadyToShoot_ = false;
-            if ( this->munition_->bullets() > 0)
-            {
+            if ( this->unlimitedMunition_== true )
+            {
+COUT(0) << "Weapon::fire 3" << std::endl;
                 //shoot
-                this->takeBullets();
+                this->reloadBullet();
                 this->createProjectile();
             }
-            //if there are no bullets, but magazines
-            else if ( this->munition_->magazines() > 0 && this->munition_->bullets() == 0 )
-            {
-//COUT(0) << "LaserGun::fire - no bullets" << std::endl;
-                this->takeMagazines();
-            }
             else
             {
-//COUT(0) << "LaserGun::fire - no magazines" << std::endl;
-                //no magazines
+COUT(0) << "Weapon::fire 4" << std::endl;
+                if ( this->munition_->bullets() > 0)
+                {
+COUT(0) << "Weapon::fire 5" << std::endl;
+                    //shoot
+                    this->takeBullets();
+                    this->reloadBullet();
+                    this->createProjectile();
+                }
+                //if there are no bullets, but magazines
+                else if ( this->munition_->magazines() > 0 && this->munition_->bullets() == 0 )
+                {
+COUT(0) << "Weapon::fire 6" << std::endl;
+                    this->takeMagazines();
+                    this->reloadMagazine();
+                }
+                else
+                {
+                    //no magazines
+                }
             }
         }
         else
         {
-//COUT(0) << "LaserGun::fire - weapon not reloaded - bullets remaining:" << this->munition_->bullets() << std::endl;
+COUT(0) << "Weapon::fire not reloaded" << std::endl;
             //weapon not reloaded
         }
@@ -109,8 +132,9 @@
     }
 
-
+    /*
+    * weapon reloading
+    */
     void Weapon::bulletTimer(float bulletLoadingTime)
     {
-//COUT(0) << "Weapon::bulletTimer started" << std::endl;
         this->bReloading_ = true;
         this->bulletReloadTimer_.setTimer( bulletLoadingTime , false , this , createExecutor(createFunctor(&Weapon::bulletReloaded)));
@@ -118,5 +142,4 @@
     void Weapon::magazineTimer(float magazineLoadingTime)
     {
-//COUT(0) << "Weapon::magazineTimer started" << std::endl;
         this->bReloading_ = true;
         this->magazineReloadTimer_.setTimer( magazineLoadingTime , false , this , createExecutor(createFunctor(&Weapon::magazineReloaded)));
@@ -140,8 +163,7 @@
     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 the weapon shares one munitionType put it into sharedMunitionSet
-        //else to munitionSet
+        /*  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_)
         {
@@ -154,5 +176,4 @@
             else
             {
-//COUT(0) << "Weapon::attachNeededMunition " << munitionName << std::endl;
                 //getMunitionType returns 0 if there is no such munitionType
                 Munition* munition = this->parentWeaponSystem_->getMunitionType(munitionName);
@@ -162,5 +183,4 @@
                 {
                     //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);
@@ -168,6 +188,22 @@
                 }
             }
+            this->setMunition();
         }
     }
+
+
+    Munition * Weapon::getAttachedMunition(std::string munitionType)
+    {
+        this->munition_ = this->parentWeaponSystem_->getMunitionType(munitionType);
+        return this->munition_;
+    }
+
+
+    //these function are defined in the weapon classes
+    void Weapon::takeBullets() { };
+    void Weapon::createProjectile() { };
+    void Weapon::takeMagazines() { };
+    void Weapon::reloadBullet() { };
+    void Weapon::reloadMagazine() { };
 
 
@@ -175,5 +211,4 @@
      *
      */
-
     void Weapon::setMunitionType(std::string munitionType)
     {   this->munitionType_ = munitionType; }
@@ -200,16 +235,21 @@
     {   return this->bSharedMunition_;  }
 
-
-    Munition * Weapon::getAttachedMunition(std::string munitionType)
-    {
-//COUT(0) << "Weapon::getAttachedMunition, parentWeaponSystem_="<< this->parentWeaponSystem_ << std::endl;
-        this->munition_ = this->parentWeaponSystem_->getMunitionType(munitionType);
-//COUT(0) << "Weapon::getAttachedMunition, munition_="<< this->munition_ << std::endl;
-        return this->munition_;
-    }
-
-    void Weapon::takeBullets() { };
-    void Weapon::createProjectile() { };
-    void Weapon::takeMagazines() { };
+    void Weapon::setBulletAmount(unsigned int amount)
+    {   this->bulletAmount_ = amount; }
+
+    const unsigned int Weapon::getBulletAmount()
+    {   return this->bulletAmount_;  }
+
+    void Weapon::setMagazineAmount(unsigned int amount)
+    {   this->magazineAmount_ = amount; }
+
+    const unsigned int Weapon::getMagazineAmount()
+    {   return this->magazineAmount_;  }
+
+    void Weapon::setUnlimitedMunition(bool unlimitedMunition)
+    {   this->unlimitedMunition_ = unlimitedMunition;   }
+
+    const bool Weapon::getUnlimitedMunition()
+    {   return this->unlimitedMunition_;    }
 
 }
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Weapon.h
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Weapon.h	(revision 2778)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/Weapon.h	(revision 2804)
@@ -62,4 +62,5 @@
             void magazineReloaded();
 
+            //XMLPort functions
             virtual void setMunitionType(std::string munitionType);
             virtual const std::string getMunitionType();
@@ -70,9 +71,22 @@
             virtual void setSharedMunition(bool bSharedMunition);
             virtual const bool getSharedMunition();
+            virtual void setBulletAmount(unsigned int amount);
+            virtual const unsigned int getBulletAmount();
+            virtual void setMagazineAmount(unsigned int amount);
+            virtual const unsigned int getMagazineAmount();
+            virtual void setUnlimitedMunition(bool unlimitedMunition);
+            virtual const bool getUnlimitedMunition();
 
+            //weapon actions
             virtual void takeBullets();
             virtual void takeMagazines();
             virtual void createProjectile();
+            virtual void reloadBullet();
+            virtual void reloadMagazine();
 
+            //manually set or reset
+            virtual void setWeapon();
+            virtual void setMunition();
+            
             inline void setParentWeaponSystem(WeaponSystem *parentWeaponSystem)
                 { this->parentWeaponSystem_=parentWeaponSystem; };
@@ -85,5 +99,4 @@
                 { return this->attachedToWeaponSlot_; }
 
-            virtual void setWeapon();
 
         private:
@@ -94,6 +107,9 @@
             bool magazineReadyToShoot_;
             bool bSharedMunition_;
+            bool unlimitedMunition_;
             float bulletLoadingTime_;
             float magazineLoadingTime_;
+            unsigned int bulletAmount_;
+            unsigned int magazineAmount_;
             std::string munitionType_;
 
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponPack.cc
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponPack.cc	(revision 2778)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponPack.cc	(revision 2804)
@@ -63,5 +63,4 @@
         for (int i=0; i < (int) this->weapons_.size(); i++)
         {
-//COUT(0) << "WeaponPack::fire (attached from WeaponSet)  from Weapon: "<< i << std::endl;
             this->weapons_[i]->getAttachedToWeaponSlot()->fire();
         }
@@ -83,5 +82,4 @@
     void WeaponPack::setFireMode(unsigned int firemode)
     {
-//COUT(0) << "WeaponPack::setFireMode " << std::endl;
         this->firemode_ = firemode;
     }
@@ -94,5 +92,4 @@
     void WeaponPack::addWeapon(Weapon * weapon)
     {
-//COUT(0) << "WeaponPack::addWeapon:" << weapon << "   munition " << weapon->getMunitionType() << std::endl;
         this->weapons_.push_back(weapon);
     }
@@ -117,5 +114,4 @@
         {
             this->weapons_[i]->attachNeededMunition(weapons_[i]->getMunitionType());
-            //hack!
             this->weapons_[i]->setWeapon();
         }
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponPack.h
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponPack.h	(revision 2778)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponPack.h	(revision 2804)
@@ -59,4 +59,5 @@
             const Weapon * getWeapon(unsigned int index);
 
+            //functions with effect to all weapons of the weaponPack
             //functions needed for creating Pointer to the right objects (-->Pawn.cc)
             void setParentWeaponSystemToAllWeapons(WeaponSystem * weaponSystem);
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSet.cc
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSet.cc	(revision 2778)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSet.cc	(revision 2804)
@@ -60,6 +60,6 @@
             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++  )
@@ -80,5 +80,4 @@
                         if ( this->parentWeaponSystem_->getWeaponSlotPointer(k)->getAttachedWeapon() == 0 )
                         {
-//COUT(0) << "WeaponSet::attachWeaponPack mode 2 k="<< k << std::endl;
                             this->setWeaponSlots_.push_back( this->parentWeaponSystem_->getWeaponSlotPointer(k) );
                             this->parentWeaponSystem_->getWeaponSlotPointer(k)->attachWeapon( wPack->getWeaponPointer(wPackWeapon) );
@@ -96,5 +95,4 @@
     {
         //fires all WeaponSlots available for this weaponSet attached from the WeaponPack
-//COUT(0) << "WeaponSet::fire from Pack: " << this->attachedWeaponPack_ << std::endl;
         if (this->attachedWeaponPack_)
             this->attachedWeaponPack_->fire();
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.cc
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.cc	(revision 2778)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.cc	(revision 2804)
@@ -51,5 +51,4 @@
         RegisterObject(WeaponSystem);
 
-        this->activeWeaponSet_ = 0;
         this->parentPawn_ = 0;
     }
@@ -91,5 +90,4 @@
     Munition * WeaponSystem::getMunitionType(std::string munitionType)
     {
-//COUT(0) << "WeaponSystem::getMunitionType " << munitionType << std::endl;
         std::map<std::string, Munition *>::const_iterator it = this->munitionSharedSet_.find(munitionType);
         if (it != this->munitionSharedSet_.end())
@@ -105,4 +103,5 @@
     //n is the n'th weaponSet, starting with zero
     //SpaceShip.cc only needs to have the keybinding to a specific Set-number n (=firemode)
+    //in future this could be well defined and not only for 3 different WeaponModes
     void WeaponSystem::fire(WeaponMode::Enum n)
     {
@@ -120,7 +119,5 @@
                 break;
         }
-//COUT(0) << "WeaponSystem::fire" << std::endl;
         if (set < (int)this->weaponSets_.size())
-//COUT(0) << "WeaponSystem::fire - after if" << std::endl;
             this->weaponSets_[set]->fire();
     }
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.h
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.h	(revision 2778)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.h	(revision 2804)
@@ -75,5 +75,4 @@
             std::map<std::string, Munition *> munitionSharedSet_;
             std::map<std::string, Munition *> munitionSet_;
-            WeaponSet *activeWeaponSet_;
             Pawn *parentPawn_;
     };
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/weapons/LaserGun.cc
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/weapons/LaserGun.cc	(revision 2778)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/weapons/LaserGun.cc	(revision 2804)
@@ -53,9 +53,17 @@
     }
 
+    void LaserGun::reloadBullet()
+    {
+        this->bulletTimer(this->bulletLoadingTime_);
+    }
+
+    void LaserGun::reloadMagazine()
+    {
+        this->magazineTimer(this->magazineLoadingTime_);
+    }
+
     void LaserGun::takeBullets()
     {
-//COUT(0) << "LaserGun::takeBullets" << std::endl;
         this->munition_->removeBullets(1);
-        this->bulletTimer(this->bulletLoadingTime_);
     }
 
@@ -63,10 +71,8 @@
     {
         this->munition_->removeMagazines(1);
-        this->magazineTimer(this->magazineLoadingTime_);
     }
 
     void LaserGun::createProjectile()
     {
-//COUT(0) << "LaserGun::createProjectile" << std::endl;
         BillboardProjectile* projectile = new ParticleProjectile(this);
         projectile->setOrientation(this->getWorldOrientation());
Index: code/branches/weaponsystem/src/orxonox/objects/weaponSystem/weapons/LaserGun.h
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/weaponSystem/weapons/LaserGun.h	(revision 2778)
+++ code/branches/weaponsystem/src/orxonox/objects/weaponSystem/weapons/LaserGun.h	(revision 2804)
@@ -51,4 +51,6 @@
             virtual void takeMagazines();
             virtual void createProjectile();
+            virtual void reloadBullet();
+            virtual void reloadMagazine();
 
         private:
Index: code/branches/weaponsystem/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/weaponsystem/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2778)
+++ code/branches/weaponsystem/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2804)
@@ -222,5 +222,4 @@
             ExplosionChunk* chunk = new ExplosionChunk(this->getCreator());
             chunk->setPosition(this->getPosition());
-
         }
     }
@@ -243,4 +242,10 @@
     }
 
+
+    /* WeaponSystem:
+    *   functions load Slot, Set, Pack from XML and make sure all parent-pointers are set.
+    *   with setWeaponPack you can not just load a Pack from XML but if a Pack already exists anywhere, you can attach it.
+    *       --> e.g. Pickup-Items
+    */
     void Pawn::setWeaponSlot(WeaponSlot * wSlot)
     {
