Index: code/branches/weapon2/src/orxonox/CMakeLists.txt
===================================================================
--- code/branches/weapon2/src/orxonox/CMakeLists.txt	(revision 2287)
+++ code/branches/weapon2/src/orxonox/CMakeLists.txt	(revision 2288)
@@ -88,4 +88,5 @@
   objects/weaponSystem/WeaponSet.cc
   objects/weaponSystem/WeaponSlot.cc
+  objects/weaponSystem/WeaponPack.cc
   objects/weaponSystem/Weapon.cc
   objects/weaponSystem/Munition.cc
Index: code/branches/weapon2/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- code/branches/weapon2/src/orxonox/OrxonoxPrereqs.h	(revision 2287)
+++ code/branches/weapon2/src/orxonox/OrxonoxPrereqs.h	(revision 2288)
@@ -154,4 +154,5 @@
     class WeaponSet;
     class WeaponSlot;
+    class WeaponPack;
     class Weapon;
     class Munition;
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/Weapon.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/Weapon.cc	(revision 2287)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/Weapon.cc	(revision 2288)
@@ -96,5 +96,5 @@
      */
     void Weapon::setParentWeaponSystem()
-    {   this->parentWeaponSystem_ = this->parentWeaponSlot_->getParentWeaponSet()->getParentWeaponSystem(); }
+    {   this->parentWeaponSystem_ = this->parentWeaponSlot_->getParentWeaponSystem(); }
 
     Munition * Weapon::getAttachedMunition()
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.cc	(revision 2288)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.cc	(revision 2288)
@@ -0,0 +1,81 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Martin Polak
+ *   Co-authors:
+ *      ... *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <vector>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Debug.h"
+
+#include "WeaponPack.h"
+
+namespace orxonox
+{
+    WeaponPack::WeaponPack(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(WeaponPack);
+
+        this->parentWeaponSystem_ = 0;
+
+    }
+
+    WeaponPack::~WeaponPack()
+    {
+    }
+
+    int WeaponPack::getSize()
+    {
+        return this->weapons_.size();
+    }
+
+    void WeaponPack::attachWeapon(Weapon *weapon)
+    {
+        this->weapons_.push_back(weapon);
+    }
+
+    void WeaponPack::fire()
+    {
+        for (int i=0; i < (int) this->weapons_.size(); i++)
+        {
+COUT(0) << "WeaponPack::fire"<< i << std::endl;
+            this->weapons_[i]->fire();
+        }
+    }
+
+    Weapon * WeaponPack::getWeaponPointer(unsigned int n)
+    {
+        return this->weapons_[n];
+    }
+
+    void WeaponPack::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+
+    }
+
+}
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.h
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.h	(revision 2288)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.h	(revision 2288)
@@ -0,0 +1,67 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Martin Polak
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _WeaponPack_H__
+#define _WeaponPack_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "core/BaseObject.h"
+
+#include "Weapon.h"
+
+
+namespace orxonox
+{
+    class _OrxonoxExport WeaponPack : public BaseObject
+    {
+        public:
+            WeaponPack(BaseObject* creator);
+            virtual ~WeaponPack();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void fire();
+
+            Weapon * getWeaponPointer(unsigned int n);
+            int getSize();
+            void attachWeapon(Weapon *weapon);
+
+            inline void setParentWeaponSystem(WeaponSystem *parentWeaponSystem)
+                { parentWeaponSystem_=parentWeaponSystem; }
+            inline WeaponSystem * getParentWeaponSystem()
+                { return parentWeaponSystem_; }
+
+        private:
+            std::vector<Weapon *> weapons_;
+            WeaponSystem *parentWeaponSystem_;
+    };
+}
+
+#endif /* _WeaponPack_H__ */
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSet.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSet.cc	(revision 2287)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSet.cc	(revision 2288)
@@ -35,4 +35,5 @@
 
 #include "WeaponSet.h"
+#include "WeaponPack.h"
 
 namespace orxonox
@@ -44,10 +45,4 @@
         this->parentWeaponSystem_ = 0;
 
-        /* will be made with XML
-        for (int i=0;i<k;i++)
-        {
-            attachWeaponSlot(new WeaponSlot(this));
-        }
-        */
     }
 
@@ -56,25 +51,26 @@
     }
 
-    void WeaponSet::attachWeaponSlot(WeaponSlot *wSlot)
+    void WeaponSet::attachWeaponPack(WeaponPack *wPack)
     {
-        this->weaponSlots_.push_back(wSlot);
+        if (this->parentWeaponSystem_->getWeaponSlotSize()>0 && wPack->getSize()>0 && ( wPack->getSize() <= this->parentWeaponSystem_->getWeaponSlotSize() ) )
+        {
+            //should be possible to choose which slot to use
+            for (  int i=0; i < wPack->getSize() ; i++  )
+            {
+                this->parentWeaponSystem_->getWeaponSlotPointer(i)->attachWeapon( wPack->getWeaponPointer(i) );
+            }
+        }
     }
 
+    /* this function will be in WeaponPack
     void WeaponSet::fire()
     {
         for (int i=0; i < (int) this->weaponSlots_.size(); i++)
         {
+COUT(0) << "WeaponSlot::fire"<< i << std::endl;
             this->weaponSlots_[i]->fire();
         }
     }
-
-    WeaponSlot * WeaponSet::getWeaponSlotPointer(unsigned int n)
-    {
-        if (n < this->weaponSlots_.size())
-            return this->weaponSlots_[n];
-        else
-            return 0;
-    }
-
+    */
 
     void WeaponSet::XMLPort(Element& xmlelement, XMLPort::Mode mode)
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSet.h
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSet.h	(revision 2287)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSet.h	(revision 2288)
@@ -48,7 +48,6 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
 
-            void attachWeaponSlot(WeaponSlot *wSlot);
+            void attachWeaponPack(WeaponPack *wPack);
             void fire();
-            WeaponSlot * getWeaponSlotPointer(unsigned int n);
 
             inline void setParentWeaponSystem(WeaponSystem *parentWeaponSystem)
@@ -58,5 +57,4 @@
 
         private:
-            std::vector<WeaponSlot *> weaponSlots_;
             WeaponSystem *parentWeaponSystem_;
     };
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSlot.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSlot.cc	(revision 2287)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSlot.cc	(revision 2288)
@@ -44,5 +44,4 @@
         this->unlimitedAmmo_ = false;
         this->attachedWeapon_ = 0;
-        this->parentWeaponSet_ = 0;
         this->setObjectMode(0x0);
     }
@@ -65,4 +64,5 @@
     void WeaponSlot::fire()
     {
+COUT(0) << "WeaponSlot::fire" << std::endl;
         this->attachedWeapon_->fire();
     }
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSlot.h
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSlot.h	(revision 2287)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSlot.h	(revision 2288)
@@ -50,8 +50,8 @@
             void fire();
 
-            inline void setParentWeaponSet(WeaponSet *parentWeaponSet)
-                { parentWeaponSet_=parentWeaponSet; }
-            inline WeaponSet * getParentWeaponSet()
-                { return parentWeaponSet_; }
+            inline void setParentWeaponSystem(WeaponSystem *parentWeaponSystem)
+                { parentWeaponSystem_=parentWeaponSystem; }
+            inline WeaponSystem * getParentWeaponSystem()
+                { return parentWeaponSystem_; }
 
 
@@ -60,5 +60,5 @@
             bool unlimitedAmmo_;
 
-            WeaponSet *parentWeaponSet_;
+            WeaponSystem *parentWeaponSystem_;
     };
 }
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.cc	(revision 2287)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.cc	(revision 2288)
@@ -36,4 +36,5 @@
 
 #include "WeaponSystem.h"
+#include "WeaponPack.h"
 
 /* WEAPONSYSTEM
@@ -56,4 +57,15 @@
     WeaponSystem::~WeaponSystem()
     {
+    }
+
+    void WeaponSystem::attachWeaponPack(WeaponPack *wPack, int setNumber)
+    {
+        this->weaponSets_[setNumber]->attachWeaponPack(wPack);
+    }
+
+    void WeaponSystem::attachWeaponSlot(WeaponSlot *wSlot)
+    {
+        this->weaponSlots_.push_back(wSlot);
+        wSlot->setParentWeaponSystem(this);
     }
 
@@ -90,6 +102,8 @@
     void WeaponSystem::fire(WeaponMode::Enum n)
     {
+COUT(0) << "WeaponSystem::fire" << std::endl;
         if (n < (int)this->weaponSets_.size())
-            this->weaponSets_[n]->fire();
+COUT(0) << "WeaponSystem::fire - after if" << std::endl;
+            //this->weaponSets_[n]->fire();
     }
 
@@ -103,4 +117,12 @@
     }
 
+    WeaponSlot * WeaponSystem::getWeaponSlotPointer(unsigned int n)
+    {
+        if (n < this->weaponSlots_.size())
+            return this->weaponSlots_[n];
+        else
+            return 0;
+    }
+
     void WeaponSystem::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.h
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.h	(revision 2287)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.h	(revision 2288)
@@ -48,9 +48,12 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
 
+            void attachWeaponSlot(WeaponSlot *wSlot);
             void attachWeaponSet(WeaponSet *wSet);
-            void fire();
+            //void fire();
             void fire(WeaponMode::Enum fireMode);
             //void setActiveWeaponSet(unsigned int n);
+            void attachWeaponPack(WeaponPack * wPack, int setNumber);
             WeaponSet * getWeaponSetPointer(unsigned int n);
+            WeaponSlot * getWeaponSlotPointer(unsigned int n);
 
             void setNewMunition(std::string munitionType, Munition * munitionToAdd);
@@ -62,7 +65,10 @@
                 { return parentSpaceShip_; }
 
+            inline int getWeaponSlotSize()
+                { return this->weaponSlots_.size(); }
 
         private:
             std::vector<WeaponSet *> weaponSets_;
+            std::vector<WeaponSlot *> weaponSlots_;
             std::map<std::string, Munition *> munitionSet_;
             WeaponSet *activeWeaponSet_;
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/LaserGun.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/LaserGun.cc	(revision 2287)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/LaserGun.cc	(revision 2288)
@@ -56,4 +56,5 @@
     void LaserGun::fire()
     {
+COUT(0) << "LaserGun::fire" << std::endl;
         if ( this->getBulletReadyToShoot() && this->getMagazineReadyToShoot() )
         {
Index: code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2287)
+++ code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2288)
@@ -52,5 +52,4 @@
 
         this->lastHitOriginator_ = 0;
-        this->weaponSystem_ = 0;
 
         //WeaponSystem
@@ -58,4 +57,6 @@
         WeaponSet * weaponSet1 = new WeaponSet(this,1);
         this->weaponSystem_->attachWeaponSet(weaponSet1);
+        //totally bad solution...
+        weaponSet1->setParentWeaponSystem(weaponSystem_);
 
 
@@ -74,5 +75,9 @@
         XMLPortParam(Pawn, "maxhealth", setMaxHealth, getMaxHealth, xmlelement, mode).defaultValues(200);
         XMLPortParam(Pawn, "initialhealth", setInitialHealth, getInitialHealth, xmlelement, mode).defaultValues(100);
-    }
+
+        XMLPortObject(Pawn, WeaponSlot, "weaponslots", setWeaponSlot, getWeaponSlot, xmlelement, mode);
+        //XMLPortObject(Pawn, WeaponPack, "weapons", setWeaponPack, getWeaponPack, xmlelement, mode);
+
+        }
 
     void Pawn::registerVariables()
@@ -137,4 +142,5 @@
     void Pawn::fire(WeaponMode::Enum fireMode)
     {
+COUT(0) << "Pawn::fire" << std::endl;
         if (this->weaponSystem_)
             this->weaponSystem_->fire(fireMode);
@@ -146,3 +152,14 @@
         this->spawn();
     }
+
+    void Pawn::setWeaponSlot(WeaponSlot * wSlot)
+    {
+        this->weaponSystem_->attachWeaponSlot(wSlot);
+    }
+
+    WeaponSlot * Pawn::getWeaponSlot(unsigned int index) const
+    {
+        return this->weaponSystem_->getWeaponSlotPointer(index);
+    }
+
 }
Index: code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 2287)
+++ code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 2288)
@@ -79,4 +79,7 @@
             virtual void postSpawn();
 
+            void setWeaponSlot(WeaponSlot * wSlot);
+            WeaponSlot * getWeaponSlot(unsigned int index) const;
+
         protected:
             virtual void spawn();
Index: code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Spectator.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 2287)
+++ code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 2288)
@@ -169,5 +169,5 @@
     }
 
-    void Spectator::fire()
+    void Spectator::fire(WeaponMode::Enum fireMode)
     {
         if (this->getPlayer())
Index: code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Spectator.h
===================================================================
--- code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Spectator.h	(revision 2287)
+++ code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Spectator.h	(revision 2288)
@@ -56,5 +56,5 @@
             virtual void rotateRoll(const Vector2& value);
 
-            virtual void fire();
+            virtual void fire(WeaponMode::Enum fireMode);
             virtual void greet();
 
