Index: code/branches/towerdefenseFabien/src/modules/weapons/weaponmodes/CMakeLists.txt
===================================================================
--- code/branches/towerdefenseFabien/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 10585)
+++ code/branches/towerdefenseFabien/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 10592)
@@ -5,4 +5,5 @@
   HsW01.cc
   LightningGun.cc
+  SplitGun.cc
   RocketFire.cc
   SimpleRocketFire.cc
Index: code/branches/towerdefenseFabien/src/modules/weapons/weaponmodes/SplitGun.cc
===================================================================
--- code/branches/towerdefenseFabien/src/modules/weapons/weaponmodes/SplitGun.cc	(revision 10592)
+++ code/branches/towerdefenseFabien/src/modules/weapons/weaponmodes/SplitGun.cc	(revision 10592)
@@ -0,0 +1,107 @@
+/*
+ *   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:
+ *      simonmie
+ *
+ */
+
+/**
+    @file SplitGun.h
+    @brief Implementation of the SplitGun class.
+*/
+
+#include "SplitGun.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"    
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+#include "worldentities/pawns/Pawn.h"
+
+#include "weapons/projectiles/SplitGunProjectile.h"
+
+namespace orxonox
+{
+    RegisterClass(SplitGun);
+
+    SplitGun::SplitGun(Context* context) : WeaponMode(context)
+    {
+        RegisterObject(SplitGun);
+
+        this->reloadTime_ = 1.0f;
+        this->damage_ = 0.0f;
+        this->speed_ = 750.0f;
+        this->numberOfSplits_ = 2;
+        this->numberOfChilds_ = 3;
+        this->splitTime_ = 0.3;
+        this->spread_ = 0.1;
+
+        this->setMunitionName("LaserMunition");
+        this->setDefaultSound("sounds/Weapon_LightningGun.ogg");
+    }
+
+    SplitGun::~SplitGun()
+    {
+    }
+
+    /**
+    @brief
+        XMLPort for the SplitGun. You can define how often the projectiles split, how many childs should be created per split and the time between two splits.
+    */
+    void SplitGun::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SplitGun, XMLPort, xmlelement, mode);
+
+        XMLPortParam(SplitGun, "numberofsplits", setNumberOfSplits, getNumberOfSplits, xmlelement, mode);
+        XMLPortParam(SplitGun, "numberofchilds", setNumberOfChilds, getNumberOfChilds, xmlelement, mode);
+        XMLPortParam(SplitGun, "splittime", setSplitTime, getSplitTime, xmlelement, mode);
+        XMLPortParam(SplitGun, "spread", setSpread, getSpread, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Fires the weapon. Creates a projectile and fires it.
+    */
+    void SplitGun::fire()
+    {
+        SplitGunProjectile* projectile = new SplitGunProjectile(this->getContext());
+        projectile->setMaterial("Flares/energyflare");
+
+        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+
+        projectile->setNumberOfSplits(getNumberOfSplits());
+        projectile->setNumberOfChilds(getNumberOfChilds());
+        projectile->setSplitTime(getSplitTime());
+        projectile->setSpread(getSpread());
+
+        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+        projectile->setShieldDamage(this->getShieldDamage());
+        projectile->setHealthDamage(this->getHealthDamage());
+    }
+}
Index: code/branches/towerdefenseFabien/src/modules/weapons/weaponmodes/SplitGun.h
===================================================================
--- code/branches/towerdefenseFabien/src/modules/weapons/weaponmodes/SplitGun.h	(revision 10592)
+++ code/branches/towerdefenseFabien/src/modules/weapons/weaponmodes/SplitGun.h	(revision 10592)
@@ -0,0 +1,85 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+    @file SplitGun.h
+    @brief Definition of the SplitGun class.
+*/
+
+#ifndef _SplitGun_H__
+#define _SplitGun_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        A slow ball of lightning.
+    @author
+        Joel Smely
+    @ingroup WeaponsWeaponModes
+    */
+    class _WeaponsExport SplitGun : public WeaponMode
+    {
+        public:
+            SplitGun(Context* context);
+            virtual ~SplitGun();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void fire();
+
+            inline void setNumberOfSplits(int numberOfSplits)
+                { this->numberOfSplits_ = numberOfSplits; }
+            inline int getNumberOfSplits() const
+                { return this->numberOfSplits_; }
+            inline void setNumberOfChilds(int numberOfChilds)
+                { this->numberOfChilds_ = numberOfChilds; }
+            inline int getNumberOfChilds() const
+                { return this->numberOfChilds_; }
+            inline void setSplitTime(float splitTime)
+                { this->splitTime_ = splitTime; }
+            inline float getSplitTime() const
+                { return this->splitTime_; }
+            inline void setSpread(float spread)
+                { this->spread_ = spread; }
+            inline float getSpread() const
+                { return this->spread_; }
+
+       private:
+            float speed_; //!< The speed of the fired projectile.
+            int numberOfSplits_;
+            int numberOfChilds_;
+            float splitTime_;
+            float spread_;
+    };
+}
+
+#endif /* _SplitGun_H__ */
