Index: /code/branches/libraries2/src/modules/weapons/CMakeLists.txt
===================================================================
--- /code/branches/libraries2/src/modules/weapons/CMakeLists.txt	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/CMakeLists.txt	(revision 5723)
@@ -0,0 +1,27 @@
+ADD_SOURCE_FILES(ORXONOX_SRC_FILES
+  Munition.cc
+  Weapon.cc
+  WeaponMode.cc
+  WeaponPack.cc
+  WeaponSet.cc
+  WeaponSlot.cc
+  WeaponSystem.cc
+  DefaultWeaponmodeLink.cc
+)
+
+SET_SOURCE_FILES(WEAPONSYSTEM_SRC_FILES
+  MuzzleFlash.cc
+)
+
+ADD_SUBDIRECTORY(munitions)
+ADD_SUBDIRECTORY(projectiles)
+ADD_SUBDIRECTORY(weaponmodes)
+
+ORXONOX_ADD_LIBRARY(weaponsystem
+  MODULE
+  DEFINE_SYMBOL
+    "WEAPONSYSTEM_SHARED_BUILD"
+  LINK_LIBRARIES
+    orxonox
+  SOURCE_FILES ${WEAPONSYSTEM_SRC_FILES}
+)
Index: /code/branches/libraries2/src/modules/weapons/MuzzleFlash.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/MuzzleFlash.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/MuzzleFlash.cc	(revision 5723)
@@ -0,0 +1,53 @@
+/*
+ *   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:
+ *      Hagen Seifert
+ *   Co-authors:
+ *      Ich
+ *      Dini Mueter
+ *
+ */
+
+#include "MuzzleFlash.h"
+
+#include "core/CoreIncludes.h"
+#include "core/Executor.h"
+
+namespace orxonox
+{
+    CreateFactory(MuzzleFlash);
+
+    MuzzleFlash::MuzzleFlash(BaseObject* creator) : Billboard(creator)
+    {
+        RegisterObject(MuzzleFlash);
+        this->setScale(0.1f);
+        
+        this->delayTimer_.setTimer(0.1f, false, this, createExecutor(createFunctor(&MuzzleFlash::destroy)));
+
+    }
+
+    void MuzzleFlash::destroy()
+    {
+        delete this;
+    }
+ 
+}
Index: /code/branches/libraries2/src/modules/weapons/MuzzleFlash.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/MuzzleFlash.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/MuzzleFlash.h	(revision 5723)
@@ -0,0 +1,54 @@
+/*
+ *   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:
+ *      Hagen Seifert
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _MuzzleFlash_H__
+#define _MuzzleFlash_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+
+#include "tools/Timer.h"
+#include "objects/worldentities/Billboard.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport MuzzleFlash : public Billboard
+    {
+        public:
+            MuzzleFlash(BaseObject* creator);
+            virtual ~MuzzleFlash() {}
+
+
+
+        private:
+            void destroy();
+            Timer<MuzzleFlash> delayTimer_;
+
+    };
+}
+
+#endif /* _MuzzleFlash_H__ */
Index: /code/branches/libraries2/src/modules/weapons/munitions/CMakeLists.txt
===================================================================
--- /code/branches/libraries2/src/modules/weapons/munitions/CMakeLists.txt	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/munitions/CMakeLists.txt	(revision 5723)
@@ -0,0 +1,5 @@
+ADD_SOURCE_FILES(WEAPONSYSTEM_SRC_FILES
+  ReplenishingMunition.cc
+  LaserMunition.cc
+  FusionMunition.cc
+)
Index: /code/branches/libraries2/src/modules/weapons/munitions/FusionMunition.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/munitions/FusionMunition.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/munitions/FusionMunition.cc	(revision 5723)
@@ -0,0 +1,51 @@
+/*
+ *   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 "FusionMunition.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(FusionMunition);
+
+    FusionMunition::FusionMunition(BaseObject* creator) : Munition(creator)
+    {
+        RegisterObject(FusionMunition);
+
+        this->maxMunitionPerMagazine_ = 10;
+        this->maxMagazines_ = 10;
+        this->magazines_ = 10;
+
+        this->bUseSeparateMagazines_ = true;
+        this->bStackMunition_ = false;
+        this->reloadTime_ = 1.0f;
+
+        this->bAllowMunitionRefilling_ = true;
+        this->bAllowMultiMunitionRemovementUnderflow_ = true;
+    }
+}
Index: /code/branches/libraries2/src/modules/weapons/munitions/FusionMunition.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/munitions/FusionMunition.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/munitions/FusionMunition.h	(revision 5723)
@@ -0,0 +1,45 @@
+/*
+ *   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 _FusionMunition_H__
+#define _FusionMunition_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+#include "objects/weaponsystem/Munition.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport FusionMunition : public Munition
+    {
+        public:
+            FusionMunition(BaseObject* creator);
+            virtual ~FusionMunition() {}
+    };
+}
+
+#endif /* _FusionMunition_H__ */
Index: /code/branches/libraries2/src/modules/weapons/munitions/LaserMunition.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/munitions/LaserMunition.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/munitions/LaserMunition.cc	(revision 5723)
@@ -0,0 +1,53 @@
+/*
+ *   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 "LaserMunition.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(LaserMunition);
+
+    LaserMunition::LaserMunition(BaseObject* creator) : ReplenishingMunition(creator)
+    {
+        RegisterObject(LaserMunition);
+
+        this->maxMunitionPerMagazine_ = 20;
+        this->maxMagazines_ = 1;
+        this->magazines_ = 1;
+
+        this->bUseSeparateMagazines_ = false;
+        this->bStackMunition_ = true;
+
+        this->bAllowMunitionRefilling_ = true;
+        this->bAllowMultiMunitionRemovementUnderflow_ = true;
+
+        this->replenishIntervall_ = 0.5f;
+        this->replenishMunitionAmount_ = 1;
+    }
+}
Index: /code/branches/libraries2/src/modules/weapons/munitions/LaserMunition.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/munitions/LaserMunition.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/munitions/LaserMunition.h	(revision 5723)
@@ -0,0 +1,45 @@
+/*
+ *   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 _LaserMunition_H__
+#define _LaserMunition_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+#include "ReplenishingMunition.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport LaserMunition : public ReplenishingMunition
+    {
+        public:
+            LaserMunition(BaseObject* creator);
+            virtual ~LaserMunition() {}
+    };
+}
+
+#endif /* _LaserMunition_H__ */
Index: /code/branches/libraries2/src/modules/weapons/munitions/ReplenishingMunition.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/munitions/ReplenishingMunition.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/munitions/ReplenishingMunition.cc	(revision 5723)
@@ -0,0 +1,68 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ReplenishingMunition.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(ReplenishingMunition);
+
+    ReplenishingMunition::ReplenishingMunition(BaseObject* creator) : Munition(creator)
+    {
+        RegisterObject(ReplenishingMunition);
+
+        this->replenishIntervall_ = 1.0f;
+        this->replenishMunitionAmount_ = 1;
+
+        // Use the timer to initialize itself after the first tick (because the real values for
+        // replenishIntervall_ and replenishMunitionAmount_ will be set in the constructor of the
+        // inheriting class, which comes after this constructor)
+        this->replenishingTimer_.setTimer(0.0f, false, this, createExecutor(createFunctor(&ReplenishingMunition::initializeTimer)));
+    }
+
+    void ReplenishingMunition::initializeTimer()
+    {
+        // Initialize the timer
+        this->replenishingTimer_.setTimer(this->replenishIntervall_, true, this, createExecutor(createFunctor(&ReplenishingMunition::replenish)));
+    }
+
+    void ReplenishingMunition::replenish()
+    {
+        // Make a temporary copy of bAllowMunitionRefilling_, because this might be disallowed in every
+        // case except the internal munition replenishing
+        bool temp = this->bAllowMunitionRefilling_;
+        this->bAllowMunitionRefilling_ = true;
+
+        // Replenish munition
+        this->addMunition(this->replenishMunitionAmount_);
+
+        // Write back the temporary value
+        this->bAllowMunitionRefilling_ = temp;
+    }
+}
Index: /code/branches/libraries2/src/modules/weapons/munitions/ReplenishingMunition.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/munitions/ReplenishingMunition.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/munitions/ReplenishingMunition.h	(revision 5723)
@@ -0,0 +1,57 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ReplenishingMunition_H__
+#define _ReplenishingMunition_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+
+#include "tools/Timer.h"
+#include "objects/weaponsystem/Munition.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport ReplenishingMunition : public Munition
+    {
+        public:
+            ReplenishingMunition(BaseObject* creator);
+            virtual ~ReplenishingMunition() {}
+
+        protected:
+            float replenishIntervall_;
+            unsigned int replenishMunitionAmount_;
+
+        private:
+            void replenish();
+            void initializeTimer();
+
+            Timer<ReplenishingMunition> replenishingTimer_;
+    };
+}
+
+#endif /* _ReplenishingMunition_H__ */
Index: /code/branches/libraries2/src/modules/weapons/projectiles/BillboardProjectile.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/projectiles/BillboardProjectile.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/projectiles/BillboardProjectile.cc	(revision 5723)
@@ -0,0 +1,75 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "BillboardProjectile.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "objects/Scene.h"
+
+namespace orxonox
+{
+    CreateFactory(BillboardProjectile);
+
+    BillboardProjectile::BillboardProjectile(BaseObject* creator) : Projectile(creator)
+    {
+        RegisterObject(BillboardProjectile);
+
+        if (GameMode::showsGraphics())
+        {
+            assert(this->getScene()->getSceneManager()); // getScene() was already checked by WorldEntity
+            this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5f, 0.5f, 0.7f, 0.8f), 1);
+            this->attachOgreObject(this->billboard_.getBillboardSet());
+        }
+
+        this->setScale(0.2);
+    }
+
+    BillboardProjectile::~BillboardProjectile()
+    {
+        if (this->isInitialized() && GameMode::showsGraphics() && this->billboard_.getBillboardSet())
+            this->detachOgreObject(this->billboard_.getBillboardSet());
+    }
+
+    void BillboardProjectile::setColour(const ColourValue& colour)
+    {
+        this->billboard_.setColour(colour);
+    }
+    
+    void BillboardProjectile::setMaterial(const std::string& material)
+    {
+        this->billboard_.setMaterial(material);
+    }
+
+    void BillboardProjectile::changedVisibility()
+    {
+        SUPER(BillboardProjectile, changedVisibility);
+
+        this->billboard_.setVisible(this->isVisible());
+    }
+}
Index: /code/branches/libraries2/src/modules/weapons/projectiles/BillboardProjectile.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/projectiles/BillboardProjectile.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/projectiles/BillboardProjectile.h	(revision 5723)
@@ -0,0 +1,55 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _BillboardProjectile_H__
+#define _BillboardProjectile_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+
+#include "util/Math.h"
+#include "tools/BillboardSet.h"
+#include "Projectile.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport BillboardProjectile : public Projectile
+    {
+        public:
+            BillboardProjectile(BaseObject* creator);
+            virtual ~BillboardProjectile();
+
+            virtual void setColour(const ColourValue& colour);
+            virtual void setMaterial(const std::string& material);
+            virtual void changedVisibility();
+
+        private:
+            BillboardSet billboard_;
+    };
+}
+
+#endif /* _BillboardProjectile_H__ */
Index: /code/branches/libraries2/src/modules/weapons/projectiles/CMakeLists.txt
===================================================================
--- /code/branches/libraries2/src/modules/weapons/projectiles/CMakeLists.txt	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/projectiles/CMakeLists.txt	(revision 5723)
@@ -0,0 +1,6 @@
+ADD_SOURCE_FILES(WEAPONSYSTEM_SRC_FILES
+  BillboardProjectile.cc
+  ParticleProjectile.cc
+  Projectile.cc
+  LightningGunProjectile.cc
+)
Index: /code/branches/libraries2/src/modules/weapons/projectiles/LightningGunProjectile.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/projectiles/LightningGunProjectile.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/projectiles/LightningGunProjectile.cc	(revision 5723)
@@ -0,0 +1,69 @@
+/*
+ *   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:
+ *      Joel Smely
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "LightningGunProjectile.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(LightningGunProjectile);
+
+    LightningGunProjectile::LightningGunProjectile(BaseObject* creator) : BillboardProjectile(creator)
+    {
+        RegisterObject(LightningGunProjectile);
+
+        this->textureIndex_ = 1;
+        this->maxTextureIndex_ = 8;
+        this->textureTimer_.setTimer(0.01f, true, this, createExecutor(createFunctor(&LightningGunProjectile::changeTexture)));
+        
+        registerVariables();
+    }
+    
+    void LightningGunProjectile::registerVariables()
+    {
+        registerVariable(this->materialBase_);
+    }
+    
+    void LightningGunProjectile::setMaterial(const std::string& material)
+    {
+        this->materialBase_ = material;    
+    
+        BillboardProjectile::setMaterial(material + multi_cast<std::string>(this->textureIndex_));
+    }
+
+    void LightningGunProjectile::changeTexture()
+    {
+        this->textureIndex_++;
+        if (this->textureIndex_ > this->maxTextureIndex_)
+            this->textureIndex_ = 1;
+        
+        this->setMaterial(this->materialBase_);
+    }
+}
Index: /code/branches/libraries2/src/modules/weapons/projectiles/LightningGunProjectile.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/projectiles/LightningGunProjectile.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/projectiles/LightningGunProjectile.h	(revision 5723)
@@ -0,0 +1,59 @@
+/*
+ *   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:
+ *      Joel Smely
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _LightningGunProjectile_H__
+#define _LightningGunProjectile_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+
+#include <string>
+#include "tools/Timer.h"
+#include "BillboardProjectile.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport LightningGunProjectile : public BillboardProjectile
+    {
+        public:
+            LightningGunProjectile(BaseObject* creator);
+            virtual ~LightningGunProjectile() {}
+
+            virtual void setMaterial(const std::string& material);
+
+        protected:
+            void changeTexture();
+            unsigned int textureIndex_;
+            unsigned int maxTextureIndex_;
+            Timer<LightningGunProjectile> textureTimer_;
+            std::string materialBase_;
+      private:
+            void registerVariables();
+    };
+}
+
+#endif /* _LightningGunProjectile_H__ */
Index: /code/branches/libraries2/src/modules/weapons/projectiles/ParticleProjectile.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/projectiles/ParticleProjectile.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/projectiles/ParticleProjectile.cc	(revision 5723)
@@ -0,0 +1,72 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ParticleProjectile.h"
+
+#include <OgreParticleEmitter.h>
+#include "tools/ParticleInterface.h"
+#include "core/CoreIncludes.h"
+#include "objects/Scene.h"
+
+namespace orxonox
+{
+    CreateFactory(ParticleProjectile);
+
+    ParticleProjectile::ParticleProjectile(BaseObject* creator) : BillboardProjectile(creator)
+    {
+        RegisterObject(ParticleProjectile);
+
+        if (GameMode::showsGraphics())
+        {
+            this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/shot3_small", LODParticle::Normal);
+            this->attachOgreObject(this->particles_->getParticleSystem());
+            this->particles_->setKeepParticlesInLocalSpace(0);
+
+            this->particles_->getAllEmitters()->setDirection(-WorldEntity::FRONT);
+        }
+        else
+            this->particles_ = 0;
+    }
+
+    ParticleProjectile::~ParticleProjectile()
+    {
+        if (this->isInitialized() && this->particles_)
+        {
+            this->detachOgreObject(this->particles_->getParticleSystem());
+            delete this->particles_;
+        }
+    }
+
+    void ParticleProjectile::changedVisibility()
+    {
+        SUPER(ParticleProjectile, changedVisibility);
+
+        if (this->particles_)
+            this->particles_->setEnabled(this->isVisible());
+    }
+}
Index: /code/branches/libraries2/src/modules/weapons/projectiles/ParticleProjectile.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/projectiles/ParticleProjectile.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/projectiles/ParticleProjectile.h	(revision 5723)
@@ -0,0 +1,49 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ParticleProjectile_H__
+#define _ParticleProjectile_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+#include "BillboardProjectile.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport ParticleProjectile : public BillboardProjectile
+    {
+        public:
+            ParticleProjectile(BaseObject* creator);
+            virtual ~ParticleProjectile();
+            virtual void changedVisibility();
+
+        private:
+            ParticleInterface* particles_;
+    };
+}
+
+#endif /* _ParticleProjectile_H__ */
Index: /code/branches/libraries2/src/modules/weapons/projectiles/Projectile.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/projectiles/Projectile.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/projectiles/Projectile.cc	(revision 5723)
@@ -0,0 +1,140 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Projectile.h"
+
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+#include "core/Executor.h"
+#include "core/GameMode.h"
+#include "objects/collisionshapes/SphereCollisionShape.h"
+#include "objects/worldentities/pawns/Pawn.h"
+#include "objects/worldentities/ParticleSpawner.h"
+
+namespace orxonox
+{
+    CreateFactory(Projectile);
+
+    Projectile::Projectile(BaseObject* creator) : MovableEntity(creator)
+    {
+        RegisterObject(Projectile);
+
+        this->setConfigValues();
+        this->bDestroy_ = false;
+        this->owner_ = 0;
+
+        // Get notification about collisions
+
+        if (GameMode::isMaster())
+        {
+            this->enableCollisionCallback();
+            this->setCollisionResponse(false);
+            this->setCollisionType(Kinematic);
+
+            SphereCollisionShape* shape = new SphereCollisionShape(this);
+            shape->setRadius(20);
+            this->attachCollisionShape(shape);
+
+            this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject)));
+        }
+    }
+
+    Projectile::~Projectile()
+    {
+    }
+
+    void Projectile::setConfigValues()
+    {
+        SetConfigValue(damage_, 15.0).description("The damage caused by the projectile");
+        SetConfigValue(lifetime_, 4.0).description("The time in seconds a projectile stays alive");
+    }
+
+
+    void Projectile::tick(float dt)
+    {
+        SUPER(Projectile, tick, dt);
+
+        if (!this->isActive())
+            return;
+
+        if (this->bDestroy_)
+            delete this;
+    }
+
+    void Projectile::destroyObject()
+    {
+        if (GameMode::isMaster())
+            delete this;
+    }
+
+    bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
+    {
+        if (!this->bDestroy_ && GameMode::isMaster())
+        {
+            if (otherObject == this->owner_)
+                return false;
+
+            this->bDestroy_ = true;
+
+            if (this->owner_)
+            {
+                {
+                    ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
+                    effect->setPosition(this->getPosition());
+                    effect->setOrientation(this->getOrientation());
+                    effect->setDestroyAfterLife(true);
+                    effect->setSource("Orxonox/explosion3");
+                    effect->setLifetime(2.0f);
+                }
+                {
+                    ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
+                    effect->setPosition(this->getPosition());
+                    effect->setOrientation(this->getOrientation());
+                    effect->setDestroyAfterLife(true);
+                    effect->setSource("Orxonox/smoke4");
+                    effect->setLifetime(3.0f);
+                }
+            }
+
+            float dmg = this->damage_;
+            if (this->owner_)
+                dmg = this->owner_->getPickups().processModifiers(ModifierType::Damage, dmg, false);
+
+            Pawn* victim = orxonox_cast<Pawn*>(otherObject);
+            if (victim)
+                victim->damage(dmg, this->owner_);
+        }
+        return false;
+    }
+
+    void Projectile::destroyedPawn(Pawn* pawn)
+    {
+        if (this->owner_ == pawn)
+            this->owner_ = 0;
+    }
+}
Index: /code/branches/libraries2/src/modules/weapons/projectiles/Projectile.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/projectiles/Projectile.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/projectiles/Projectile.h	(revision 5723)
@@ -0,0 +1,72 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Projectile_H__
+#define _Projectile_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+
+#include "tools/Timer.h"
+#include "interfaces/PawnListener.h"
+#include "objects/worldentities/MovableEntity.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport Projectile : public MovableEntity, public PawnListener
+    {
+        public:
+            Projectile(BaseObject* creator);
+            virtual ~Projectile();
+
+            void setConfigValues();
+            void destroyObject();
+
+            virtual void tick(float dt);
+            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
+            virtual void destroyedPawn(Pawn* pawn);
+
+            inline void setDamage(float damage)
+                { this->damage_ = damage; }
+            inline float getDamage() const
+                { return this->damage_; }
+
+            inline void setOwner(Pawn* owner)
+                { this->owner_ = owner; }
+            inline Pawn* getOwner() const
+                { return this->owner_; }
+
+        private:
+            Pawn* owner_;
+            float lifetime_;
+            float damage_;
+            bool bDestroy_;
+            Timer<Projectile> destroyTimer_;
+    };
+}
+
+#endif /* _Projectile_H__ */
Index: /code/branches/libraries2/src/modules/weapons/weaponmodes/CMakeLists.txt
===================================================================
--- /code/branches/libraries2/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 5723)
@@ -0,0 +1,7 @@
+ADD_SOURCE_FILES(WEAPONSYSTEM_SRC_FILES
+  EnergyDrink.cc
+  FusionFire.cc
+  LaserFire.cc
+  HsW01.cc
+  LightningGun.cc
+)
Index: /code/branches/libraries2/src/modules/weapons/weaponmodes/EnergyDrink.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/weaponmodes/EnergyDrink.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/weaponmodes/EnergyDrink.cc	(revision 5723)
@@ -0,0 +1,116 @@
+/*
+ *   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:
+ *      Hagen Seifert
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "EnergyDrink.h"
+
+#include "core/CoreIncludes.h"
+#include "core/Executor.h"
+#include "core/XMLPort.h"
+#include "objects/worldentities/Model.h"
+
+#include "objects/weaponsystem/projectiles/Projectile.h"
+#include "objects/weaponsystem/MuzzleFlash.h"
+#include "objects/weaponsystem/Weapon.h"
+#include "objects/weaponsystem/WeaponPack.h"
+#include "objects/weaponsystem/WeaponSystem.h"
+
+namespace orxonox
+{
+    CreateFactory(EnergyDrink);
+
+    EnergyDrink::EnergyDrink(BaseObject* creator) : WeaponMode(creator)
+    {
+        RegisterObject(EnergyDrink);
+
+        this->reloadTime_ = 0.25;
+        this->damage_ = 15;
+        this->speed_ = 2500;
+        this->delay_ = 0;
+        this->setMunitionName("FusionMunition");
+
+        this->delayTimer_.setTimer(1.0f, false, this, createExecutor(createFunctor(&EnergyDrink::shot)));
+        this->delayTimer_.stopTimer();
+    }
+
+    void EnergyDrink::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(EnergyDrink, XMLPort, xmlelement, mode);
+
+        XMLPortParam(EnergyDrink, "delay", setDelay, getDelay, xmlelement, mode);
+        XMLPortParam(EnergyDrink, "material", setMaterial, getMaterial, xmlelement, mode);
+
+    }
+
+    void EnergyDrink::setMaterial(const std::string& material)
+    {
+        this->material_ = material;
+    }
+
+    void EnergyDrink::setDelay(float d)
+    {
+        this->delay_ = d;
+        this->delayTimer_.setInterval(this->delay_);
+    }
+
+    float EnergyDrink::getDelay() const
+    {
+        return this->delay_;
+    }
+
+    void EnergyDrink::fire()
+    {
+        this->delayTimer_.startTimer();
+    }
+
+    void EnergyDrink::muendungsfeuer()
+    {
+        MuzzleFlash *muzzleFlash = new MuzzleFlash(this);
+        this->getWeapon()->attach(muzzleFlash);
+        muzzleFlash->setPosition(this->getMuzzleOffset());
+        muzzleFlash->setMaterial(this->material_);
+    }
+
+    void EnergyDrink::shot()
+    {
+        Projectile* projectile = new Projectile(this);
+        Model* model = new Model(projectile);
+        model->setMeshSource("can.mesh");
+        model->setCastShadows(false);
+        projectile->attach(model);
+        model->setScale(5);
+
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+
+        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+
+        EnergyDrink::muendungsfeuer();
+    }
+}
Index: /code/branches/libraries2/src/modules/weapons/weaponmodes/EnergyDrink.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/weaponmodes/EnergyDrink.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/weaponmodes/EnergyDrink.h	(revision 5723)
@@ -0,0 +1,65 @@
+/*
+ *   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:
+ *      Hagen Seifert
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _EnergyDrink_H__
+#define _EnergyDrink_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+
+#include <string>
+#include "tools/Timer.h"
+#include "objects/weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport EnergyDrink : public WeaponMode
+    {
+        public:
+            EnergyDrink(BaseObject* creator);
+            virtual ~EnergyDrink() {}
+
+            virtual void fire();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+        private:
+            void setMaterial(const std::string& material);
+            inline const std::string& getMaterial()
+                { return this->material_; }
+            void setDelay(float d);
+            float getDelay() const;
+            void shot();
+            void muendungsfeuer();
+
+            std::string material_;
+            float speed_;
+            float delay_;
+            Timer<EnergyDrink> delayTimer_;
+    };
+}
+
+#endif /* _EnergyDrink_H__ */
Index: /code/branches/libraries2/src/modules/weapons/weaponmodes/FusionFire.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/weaponmodes/FusionFire.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/weaponmodes/FusionFire.cc	(revision 5723)
@@ -0,0 +1,68 @@
+/*
+ *   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 "FusionFire.h"
+
+#include "util/Math.h"
+#include "core/CoreIncludes.h"
+#include "objects/weaponsystem/projectiles/BillboardProjectile.h"
+
+#include "objects/weaponsystem/Weapon.h"
+#include "objects/weaponsystem/WeaponPack.h"
+#include "objects/weaponsystem/WeaponSystem.h"
+
+namespace orxonox
+{
+    CreateFactory(FusionFire);
+
+    FusionFire::FusionFire(BaseObject* creator) : WeaponMode(creator)
+    {
+        RegisterObject(FusionFire);
+
+        this->reloadTime_ = 1.0;
+        this->bParallelReload_ = false;
+        this->damage_ = 40;
+        this->speed_ = 1250;
+
+        this->setMunitionName("FusionMunition");
+    }
+
+    void FusionFire::fire()
+    {
+        BillboardProjectile* projectile = new BillboardProjectile(this);
+
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+        projectile->scale(5);
+
+        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+        projectile->setColour(ColourValue(1.0f, 0.7f, 0.3f, 1.0f));
+    }
+}
Index: /code/branches/libraries2/src/modules/weapons/weaponmodes/FusionFire.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/weaponmodes/FusionFire.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/weaponmodes/FusionFire.h	(revision 5723)
@@ -0,0 +1,50 @@
+/*
+ *   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 _FusionFire_H__
+#define _FusionFire_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+#include "objects/weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport FusionFire : public WeaponMode
+    {
+        public:
+            FusionFire(BaseObject* creator);
+            virtual ~FusionFire() {}
+
+            virtual void fire();
+
+        private:
+            float speed_;
+    };
+}
+
+#endif /* _FusionFire_H__ */
Index: /code/branches/libraries2/src/modules/weapons/weaponmodes/HsW01.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/weaponmodes/HsW01.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/weaponmodes/HsW01.cc	(revision 5723)
@@ -0,0 +1,121 @@
+/*
+ *   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:
+ *      Hagen Seifert
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "HsW01.h"
+
+#include "core/CoreIncludes.h"
+#include "core/Executor.h"
+#include "core/XMLPort.h"
+#include "objects/worldentities/Model.h"
+
+#include "objects/weaponsystem/projectiles/Projectile.h"
+#include "objects/weaponsystem/MuzzleFlash.h"
+#include "objects/weaponsystem/Weapon.h"
+#include "objects/weaponsystem/WeaponPack.h"
+#include "objects/weaponsystem/WeaponSystem.h"
+
+namespace orxonox
+{
+    CreateFactory(HsW01);
+
+    HsW01::HsW01(BaseObject* creator) : WeaponMode(creator)
+    {
+        RegisterObject(HsW01);
+
+        this->reloadTime_ = 0.25;
+        this->damage_ = 15;
+        this->speed_ = 2500;
+        this->delay_ = 0;
+        this->setMunitionName("LaserMunition");
+
+        this->delayTimer_.setTimer(1.0f, false, this, createExecutor(createFunctor(&HsW01::shot)));
+        this->delayTimer_.stopTimer();
+    }
+
+    void HsW01::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(HsW01, XMLPort, xmlelement, mode);
+
+        XMLPortParam(HsW01, "delay", setDelay, getDelay, xmlelement, mode);
+        XMLPortParam(HsW01, "material", setMaterial, getMaterial, xmlelement, mode);
+
+    }
+
+    void HsW01::setMaterial(const std::string& material)
+    {
+        this->material_ = material;
+    }
+
+    std::string& HsW01::getMaterial()
+    {
+        return this->material_;
+    }
+
+    void HsW01::setDelay(float d)
+    {
+        this->delay_ = d;
+        this->delayTimer_.setInterval(this->delay_);
+    }
+
+    float HsW01::getDelay() const
+    {
+        return this->delay_;
+    }
+
+    void HsW01::fire()
+    {
+        this->delayTimer_.startTimer();
+    }
+
+    void HsW01::muendungsfeuer()
+    {
+        MuzzleFlash *muzzleFlash = new MuzzleFlash(this);
+        this->getWeapon()->attach(muzzleFlash);
+        muzzleFlash->setPosition(this->getMuzzleOffset());
+        muzzleFlash->setMaterial(this->material_);
+    }
+
+    void HsW01::shot()
+    {
+        Projectile* projectile = new Projectile(this);
+        Model* model = new Model(projectile);
+        model->setMeshSource("laserbeam.mesh");
+        model->setCastShadows(false);
+        projectile->attach(model);
+        model->setScale(5);
+
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+
+        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+
+        HsW01::muendungsfeuer();
+    }
+}
Index: /code/branches/libraries2/src/modules/weapons/weaponmodes/HsW01.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/weaponmodes/HsW01.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/weaponmodes/HsW01.h	(revision 5723)
@@ -0,0 +1,63 @@
+/*
+ *   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:
+ *      Hagen Seifert
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _HsW01_H__
+#define _HsW01_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+
+#include "tools/Timer.h"
+#include "objects/weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport HsW01 : public WeaponMode
+    {
+        public:
+            HsW01(BaseObject* creator);
+            virtual ~HsW01() {}
+
+            virtual void fire();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+        private:
+            void setMaterial(const std::string& material);
+            std::string& getMaterial();
+            void setDelay(float d);
+            float getDelay() const;
+            void shot();
+            void muendungsfeuer();
+
+            std::string material_;
+            float speed_;
+            float delay_;
+            Timer<HsW01> delayTimer_;
+    };
+}
+
+#endif /* _HsW01_H__ */
Index: /code/branches/libraries2/src/modules/weapons/weaponmodes/LaserFire.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/weaponmodes/LaserFire.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/weaponmodes/LaserFire.cc	(revision 5723)
@@ -0,0 +1,63 @@
+/*
+ *   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 "LaserFire.h"
+
+#include "core/CoreIncludes.h"
+#include "objects/weaponsystem/projectiles/ParticleProjectile.h"
+#include "objects/weaponsystem/Weapon.h"
+#include "objects/weaponsystem/WeaponPack.h"
+#include "objects/weaponsystem/WeaponSystem.h"
+
+namespace orxonox
+{
+    CreateFactory(LaserFire);
+
+    LaserFire::LaserFire(BaseObject* creator) : WeaponMode(creator)
+    {
+        RegisterObject(LaserFire);
+
+        this->reloadTime_ = 0.25;
+        this->damage_ = 15;
+        this->speed_ = 1250;
+
+        this->setMunitionName("LaserMunition");
+    }
+
+    void LaserFire::fire()
+    {
+        ParticleProjectile* projectile = new ParticleProjectile(this);
+
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+
+        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+    }
+}
Index: /code/branches/libraries2/src/modules/weapons/weaponmodes/LaserFire.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/weaponmodes/LaserFire.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/weaponmodes/LaserFire.h	(revision 5723)
@@ -0,0 +1,50 @@
+/*
+ *   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 _LaserFire_H__
+#define _LaserFire_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+#include "objects/weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport LaserFire : public WeaponMode
+    {
+        public:
+            LaserFire(BaseObject* creator);
+            virtual ~LaserFire() {}
+
+            virtual void fire();
+
+        private:
+            float speed_;
+    };
+}
+
+#endif /* _LaserFire_H__ */
Index: /code/branches/libraries2/src/modules/weapons/weaponmodes/LightningGun.cc
===================================================================
--- /code/branches/libraries2/src/modules/weapons/weaponmodes/LightningGun.cc	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/weaponmodes/LightningGun.cc	(revision 5723)
@@ -0,0 +1,69 @@
+/*
+ *   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:
+ *      Joel Smely
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "LightningGun.h"
+
+#include "core/CoreIncludes.h"
+#include "objects/weaponsystem/projectiles/LightningGunProjectile.h"
+#include "objects/weaponsystem/Weapon.h"
+#include "objects/weaponsystem/WeaponPack.h"
+#include "objects/weaponsystem/WeaponSystem.h"
+
+namespace orxonox
+{
+    CreateFactory(LightningGun);
+
+    LightningGun::LightningGun(BaseObject* creator) : WeaponMode(creator)
+    {
+        RegisterObject(LightningGun);
+
+        this->reloadTime_ = 1;
+        this->damage_ = 100;
+        this->speed_ = 150;
+
+        this->setMunitionName("LaserMunition");
+    }
+
+    LightningGun::~LightningGun()
+    {
+    }
+
+    void LightningGun::fire()
+    {
+        LightningGunProjectile* projectile = new LightningGunProjectile(this);
+        projectile->setMaterial("Flares/LightningBall_");
+
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+        projectile->setAcceleration(this->getMuzzleDirection() * 1000);
+
+        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+    }
+}
Index: /code/branches/libraries2/src/modules/weapons/weaponmodes/LightningGun.h
===================================================================
--- /code/branches/libraries2/src/modules/weapons/weaponmodes/LightningGun.h	(revision 5723)
+++ /code/branches/libraries2/src/modules/weapons/weaponmodes/LightningGun.h	(revision 5723)
@@ -0,0 +1,49 @@
+/*
+ *   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:
+ *      Joel Smely
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _LightningGun_H__
+#define _LightningGun_H__
+
+#include "objects/weaponsystem/WeaponsystemPrereqs.h"
+#include "objects/weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+    class _WeaponsystemExport LightningGun : public WeaponMode
+    {
+        public:
+            LightningGun(BaseObject* creator);
+            virtual ~LightningGun();
+
+            virtual void fire();
+       private:
+            float speed_;
+    };
+}
+
+#endif /* _LightningGun_H__ */
Index: de/branches/libraries2/src/orxonox/objects/weaponsystem/MuzzleFlash.cc
===================================================================
--- /code/branches/libraries2/src/orxonox/objects/weaponsystem/MuzzleFlash.cc	(revision 5722)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
- *   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:
- *      Hagen Seifert
- *   Co-authors:
- *      Ich
- *      Dini Mueter
- *
- */
-
-#include "MuzzleFlash.h"
-
-#include "core/CoreIncludes.h"
-#include "core/Executor.h"
-
-namespace orxonox
-{
-    CreateFactory(MuzzleFlash);
-
-    MuzzleFlash::MuzzleFlash(BaseObject* creator) : Billboard(creator)
-    {
-        RegisterObject(MuzzleFlash);
-        this->setScale(0.1f);
-        
-        this->delayTimer_.setTimer(0.1f, false, this, createExecutor(createFunctor(&MuzzleFlash::destroy)));
-
-    }
-
-    void MuzzleFlash::destroy()
-    {
-        delete this;
-    }
- 
-}
Index: de/branches/libraries2/src/orxonox/objects/weaponsystem/MuzzleFlash.h
===================================================================
--- /code/branches/libraries2/src/orxonox/objects/weaponsystem/MuzzleFlash.h	(revision 5722)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/*
- *   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:
- *      Hagen Seifert
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _MuzzleFlash_H__
-#define _MuzzleFlash_H__
-
-#include "objects/weaponsystem/WeaponsystemPrereqs.h"
-
-#include "tools/Timer.h"
-#include "objects/worldentities/Billboard.h"
-
-namespace orxonox
-{
-    class _WeaponsystemExport MuzzleFlash : public Billboard
-    {
-        public:
-            MuzzleFlash(BaseObject* creator);
-            virtual ~MuzzleFlash() {}
-
-
-
-        private:
-            void destroy();
-            Timer<MuzzleFlash> delayTimer_;
-
-    };
-}
-
-#endif /* _MuzzleFlash_H__ */
