Index: code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 10622)
+++ code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 10629)
@@ -5,4 +5,6 @@
   HsW01.cc
   LightningGun.cc
+  SplitGun.cc
+  IceGun.cc
   RocketFire.cc
   RocketFireOld.cc
Index: code/trunk/src/modules/weapons/weaponmodes/IceGun.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/IceGun.cc	(revision 10629)
+++ code/trunk/src/modules/weapons/weaponmodes/IceGun.cc	(revision 10629)
@@ -0,0 +1,103 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file IceGun.cc
+    @brief Implementation of the IceGun class.
+*/
+
+#include "IceGun.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/IceGunProjectile.h"
+
+namespace orxonox
+{
+    RegisterClass(IceGun);
+
+    IceGun::IceGun(Context* context) : WeaponMode(context)
+    {
+        RegisterObject(IceGun);
+
+        // Default values
+        this->reloadTime_ = 1.0f;
+        this->damage_ = 0.0f;
+        this->speed_ = 1200.0f;
+
+        this->setFreezeTime(3.0);
+        this->setFreezeFactor(0.5);
+
+        this->setMunitionName("LaserMunition");
+        this->setDefaultSound("sounds/Weapon_LightningGun.ogg");
+    }
+
+    IceGun::~IceGun()
+    {
+    }
+
+    /**
+    @brief
+        XMLPort for the IceGun. You can define how often the projectiles split, how many childs should be created per split, the spread and the time between two splits.
+    */
+    void IceGun::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(IceGun, XMLPort, xmlelement, mode);
+
+        XMLPortParam(IceGun, "freezetime", setFreezeTime, getFreezeTime, xmlelement, mode);
+        XMLPortParam(IceGun, "freezefactor", setFreezeFactor, getFreezeFactor, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Fires the weapon. Creates a projectile and fires it.
+    */
+    void IceGun::fire()
+    {
+        IceGunProjectile* projectile = new IceGunProjectile(this->getContext());
+
+        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+
+        // Pass important information to the projectile: Freeze time and freeze factor
+        projectile->setFreezeTime(getFreezeTime());
+        projectile->setFreezeFactor(getFreezeFactor());
+
+        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+        projectile->setShieldDamage(this->getShieldDamage());
+        projectile->setHealthDamage(this->getHealthDamage());
+    }
+}
Index: code/trunk/src/modules/weapons/weaponmodes/IceGun.h
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/IceGun.h	(revision 10629)
+++ code/trunk/src/modules/weapons/weaponmodes/IceGun.h	(revision 10629)
@@ -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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file IceGun.h
+    @brief Definition of the IceGun class.
+*/
+
+#ifndef _IceGun_H__
+#define _IceGun_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        A Gun that fires ice arrows that slow down any SpaceShip object that gets hit.
+    @author
+        Fabien Vultier
+    @ingroup WeaponsWeaponModes
+    */
+    class _WeaponsExport IceGun : public WeaponMode
+    {
+        public:
+            IceGun(Context* context);
+            virtual ~IceGun();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void fire();
+            
+            inline void setFreezeTime(float freezeTime)
+                { this->freezeTime_ = freezeTime; }
+            inline float getFreezeTime() const
+                { return this->freezeTime_; }
+            inline void setFreezeFactor(float freezeFactor)
+                { this->freezeFactor_ = freezeFactor; }
+            inline float getFreezeFactor() const
+                { return this->freezeFactor_; }
+
+       private:
+            float speed_; //The speed of the fired projectile.
+            float freezeTime_; //The duration of the freezing effect on a target
+            float freezeFactor_; //The strength of the freezing effect
+    };
+}
+
+#endif /* _IceGun_H__ */
Index: code/trunk/src/modules/weapons/weaponmodes/SplitGun.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/SplitGun.cc	(revision 10629)
+++ code/trunk/src/modules/weapons/weaponmodes/SplitGun.cc	(revision 10629)
@@ -0,0 +1,111 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file SplitGun.cc
+    @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.3f;
+        this->spread_ = 0.1f;
+        this->damageReduction_ = 1.0f;
+
+        this->setMunitionName("SplitMunition");
+        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, the spread 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);
+        XMLPortParam(SplitGun, "damagereduction", setDamageReduction, getDamageReduction, 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_);
+
+        // Pass important information to the projectile: Number of splits, Number of childs, split time, spread and the damage reduction
+        projectile->setNumberOfSplits(getNumberOfSplits());
+        projectile->setNumberOfChilds(getNumberOfChilds());
+        projectile->setSplitTime(getSplitTime());
+        projectile->setSpread(getSpread());
+        projectile->setDamageReduction(getDamageReduction());
+
+        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+        projectile->setShieldDamage(this->getShieldDamage());
+        projectile->setHealthDamage(this->getHealthDamage());
+    }
+}
Index: code/trunk/src/modules/weapons/weaponmodes/SplitGun.h
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/SplitGun.h	(revision 10629)
+++ code/trunk/src/modules/weapons/weaponmodes/SplitGun.h	(revision 10629)
@@ -0,0 +1,90 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   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 WeaponMode that fires projectiles that may split up into many other projectiles, that may again split up ...
+    @author
+        Fabien Vultier
+    @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_; }
+            inline void setDamageReduction(float damageReduction)
+                { this->damageReduction_ = (damageReduction >= 0.0f ? damageReduction : 1.0f); }
+            inline float getDamageReduction() const
+                { return this->damageReduction_; }
+
+       private:
+            float speed_; //The speed of the fired projectile.
+            int numberOfSplits_; //The number of times the projectile will split into child projectiles
+            int numberOfChilds_; //The number of child projectiles that are created if the projectile splits
+            float splitTime_; //The time between creation of the projectile and the split of the projectile
+            float spread_; //Low spread means that the child projectiles are concentrated in a small area
+            float damageReduction_; //The damage of a child projectile is reduced by this factor
+    };
+}
+
+#endif /* _SplitGun_H__ */
