Index: code/branches/OrxoBlox_FS19/src/modules/weapons/munitions/BallMunition.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/weapons/munitions/BallMunition.cc	(revision 12281)
+++ code/branches/OrxoBlox_FS19/src/modules/weapons/munitions/BallMunition.cc	(revision 12281)
@@ -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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file IceMunition.cc
+    @brief Implementation of the IceMunition class.
+*/
+
+#include "BallMunition.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    RegisterClass(BallMunition);
+
+    BallMunition::BallMunition(Context* context) : ReplenishingMunition(context)
+    {
+        RegisterObject(BallMunition);
+
+        this->maxMunitionPerMagazine_ = 20;
+        this->maxMagazines_ = 10;
+        this->unassignedMagazines_ = 10;
+
+        this->deployment_ = MunitionDeployment::Separate;
+
+        this->bAllowMunitionRefilling_ = true;
+        this->bAllowMultiMunitionRemovementUnderflow_ = true;
+
+        this->replenishInterval_ = 7.0f;
+        this->replenishAmount_ = 1;
+
+        this->reloadTime_ = 0.6f;
+    }
+}
Index: code/branches/OrxoBlox_FS19/src/modules/weapons/munitions/BallMunition.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/weapons/munitions/BallMunition.h	(revision 12281)
+++ code/branches/OrxoBlox_FS19/src/modules/weapons/munitions/BallMunition.h	(revision 12281)
@@ -0,0 +1,58 @@
+/*
+ *   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 IceMunition.h
+    @brief Definition of the IceMunition class.
+*/
+
+#ifndef _BallMunition_H__
+#define _BallMunition_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/ReplenishingMunition.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        IceMunition.
+    @author
+        Fabien Vultier
+    @ingroup WeaponsMunitions
+    */
+    class _WeaponsExport BallMunition : public ReplenishingMunition
+    {
+        public:
+            BallMunition(Context* context);
+            virtual ~BallMunition() = default;
+    };
+}
+
+#endif /* _SplitMunition_H__ */
Index: code/branches/OrxoBlox_FS19/src/modules/weapons/munitions/CMakeLists.txt
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/weapons/munitions/CMakeLists.txt	(revision 12208)
+++ code/branches/OrxoBlox_FS19/src/modules/weapons/munitions/CMakeLists.txt	(revision 12281)
@@ -9,3 +9,4 @@
   SplitMunition.cc
   MineMunition.cc
+  BallMunition.cc
 )
Index: code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.cc	(revision 12281)
+++ code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.cc	(revision 12281)
@@ -0,0 +1,147 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+    @file ParticleProjectile.h
+    @brief Implementation of the ParticleProjectile class.
+*/
+
+#include "BallProjectile.h"
+
+#include <OgreParticleEmitter.h>
+#include "core/CoreIncludes.h"
+#include "tools/ParticleInterface.h"
+#include "Scene.h"
+#include "core/command/Executor.h"
+#include "util/Convert.h"
+
+namespace orxonox
+{
+    RegisterClass(BallProjectile);
+
+    BallProjectile::BallProjectile(Context* context) : BillboardProjectile(context)
+    {
+        RegisterObject(BallProjectile);
+        this->textureIndex_ = 1;
+        this->setMass(0.1f);
+        this->maxTextureIndex_ = 8;
+        this->setDestroyAfterCollision(false); //I want the ball to bounce, not to be destroyed
+
+        //setEffect("Orxonox/sparks2");
+    }
+
+    void BallProjectile::registerVariables()
+    {
+        registerVariable(this->materialBase_);
+    }
+
+    /**
+    @brief
+        Set the material.
+    @param material
+        The name of the material. Material names with 1 to 8 appended must exist.
+    */
+    void BallProjectile::setMaterial(const std::string& material)
+    {
+        this->materialBase_ = material;
+
+        BillboardProjectile::setMaterial(material + multi_cast<std::string>(this->textureIndex_));
+    }
+
+    /**
+    @brief
+        Change the texture.
+    */
+    void BallProjectile::changeTexture()
+    {
+        this->textureIndex_++;
+        if (this->textureIndex_ > this->maxTextureIndex_)
+            this->textureIndex_ = 1;
+
+        this->setMaterial(this->materialBase_);
+    }
+
+    void BallProjectile::Bounce(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs) {
+
+        Vector3 velocity = this->getVelocity();
+        Vector3 positionOtherObject = otherObject->getPosition();
+        Vector3 contactPosition = this->getPosition();
+
+        //if (positionOtherObject.y < 0) {
+            //this.destroy()
+        //}
+        //else {
+        
+            int distance_X = positionOtherObject.x - contactPosition.x;
+            int distance_Y = positionOtherObject.y - contactPosition.y;
+
+            if (distance_X < 0)
+                distance_Y = -distance_Y;
+    
+
+            if (distance_Y < 0)
+                distance_X = -distance_X;
+
+            if (distance_X < distance_Y)
+                velocity.x = -velocity.x;
+            if (distance_Y < distance_X)
+                velocity.y = -velocity.y;
+            else {
+                velocity.x = -velocity.x;
+                velocity.y = -velocity.y;
+            }
+        //}
+    }
+
+/**
+    @brief
+        The function called when a projectile hits another thing.
+        Calls the hit-function, starts the shield recharge countdown, displays visual hit effects defined in Pawn.
+        Needs to be called in the collidesAgainst() function by every Class directly inheriting from BasicProjectile.
+    @param otherObject
+        A pointer to the object the Projectile has collided against.
+    @param contactPoint
+        A btManifoldPoint indicating the point of contact/impact.
+    @param cs
+        The btCollisionShape of the other object
+    @return
+        Returns true if the collision resulted in a successful hit.
+    @see Pawn.h
+    */
+    
+    bool BallProjectile::processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs)
+    {
+
+        orxout() << "wanna bounce..." << endl;
+        bool result = BasicProjectile::processCollision(otherObject, contactPoint, cs);
+        Bounce(otherObject, contactPoint, cs);
+        orxout() << "BOUNCED!" << endl;
+
+        return result;
+    }
+}
Index: code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.h	(revision 12281)
+++ code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.h	(revision 12281)
@@ -0,0 +1,71 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+    @file ParticleProjectile.h
+    @brief Definition of the ParticleProjectile class.
+*/
+
+#ifndef _BallProjectile_H__
+#define _BallProjectile_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weapons/projectiles/BillboardProjectile.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        A projectile that is represented by particles.
+    @author
+        Fabian 'x3n' Landau
+    @ingroup WeaponsProjectiles
+    */
+    class _WeaponsExport BallProjectile : public BillboardProjectile
+    {
+        public:
+            BallProjectile(Context* context);
+            void Bounce(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs);
+            virtual void setMaterial(const std::string& material) override;
+
+        protected:
+            bool processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs) override;
+
+        private:
+
+            void registerVariables();
+            void changeTexture();
+            
+            unsigned int textureIndex_; //!< The current index of the texture. (i.e. the index of the currently displayed texture)
+            unsigned int maxTextureIndex_; //!< The maximal index.
+            std::string materialBase_; //!< The base name of the material.
+    };
+}
+
+#endif /* _ParticleProjectile_H__ */
Index: code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BasicProjectile.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BasicProjectile.h	(revision 12208)
+++ code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BasicProjectile.h	(revision 12281)
@@ -117,5 +117,5 @@
 
         protected:
-            bool processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs);
+            virtual bool processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs);
             void destroyCheck(void);
             inline void setDestroyAfterCollision(bool destroyAfterCollision)
Index: code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/CMakeLists.txt
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/CMakeLists.txt	(revision 12208)
+++ code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/CMakeLists.txt	(revision 12281)
@@ -15,3 +15,4 @@
   MineProjectile.cc
   WagnisProjectile.cc
+  BallProjectile.cc
 )
Index: code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/BallGun.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/BallGun.cc	(revision 12281)
+++ code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/BallGun.cc	(revision 12281)
@@ -0,0 +1,150 @@
+/*
+ *   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:
+ *      simonmie
+ *
+ */
+
+/**
+    @file HsW01.h
+    @brief Implementation of the HsW01 class.
+*/
+
+#include "BallGun.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "core/command/Executor.h"
+
+#include "graphics/Model.h"
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+#include "worldentities/WorldEntity.h"
+#include "worldentities/pawns/Pawn.h"
+
+#include "weapons/projectiles/Projectile.h"
+#include "weapons/MuzzleFlash.h"
+#include "weapons/projectiles/BallProjectile.h"
+
+namespace orxonox
+{
+    RegisterClass(BallGun);
+
+    BallGun::BallGun(Context* context) : WeaponMode(context)
+    {
+        RegisterObject(BallGun);
+
+        this->reloadTime_ = 0.25f;
+        this->damage_ = 0.0f; //default 15
+        this->speed_ = 750.0f;
+        this->delay_ = 0.0f;
+        this->setMunitionName("BallMunition");
+        this->mesh_ = "laserbeam.mesh";
+
+
+        this->delayTimer_.setTimer(this->delay_, false, createExecutor(createFunctor(&BallGun::shot, this)));
+        this->delayTimer_.stopTimer();
+
+        this->setFireSound("sounds/Weapon_HsW01.ogg");
+        this->setReloadSound("sounds/Reload_HsW01.ogg", 0.5);
+
+        hudImageString_ = "Orxonox/WSHUD_WM_HsW01";
+    }
+
+    BallGun::~BallGun()
+    {
+    }
+
+    void BallGun::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(BallGun, XMLPort, xmlelement, mode);
+
+        XMLPortParam(BallGun, "delay", setDelay, getDelay, xmlelement, mode);
+        XMLPortParam(BallGun, "material", setMaterial, getMaterial, xmlelement, mode);
+        XMLPortParam(BallGun, "projectileMesh", setMesh, getMesh, xmlelement, mode);
+        XMLPortParam(BallGun, "sound", setSound, getSound, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Set the firing delay.
+    @param delay
+        The firing delay in seconds.
+    */
+    void BallGun::setDelay(float delay)
+    {
+        orxout() << "delay" << endl;
+        this->delay_ = delay;
+        this->delayTimer_.setInterval(this->delay_);
+    }
+
+    void BallGun::fire()
+    {
+        orxout() << "fire" << endl;
+        this->delayTimer_.startTimer();
+    }
+
+    /**
+    @brief
+        Fires the weapon. Creates a projectile and fires it.
+    */
+    void BallGun::shot()
+    {
+        assert( this->getWeapon() && this->getWeapon()->getWeaponPack() && this->getWeapon()->getWeaponPack()->getWeaponSystem() && this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn() );
+        orxout() << "SHOT!" << endl;
+        // Create the projectile.
+        Projectile* projectile = new BallProjectile(this->getContext());
+        Model* model = new Model(projectile->getContext());
+        model->setMeshSource(mesh_);
+        model->setCastShadows(false);
+        projectile->attach(model);
+        model->setScale(5);
+
+        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+
+        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+        projectile->setShieldDamage(this->getShieldDamage());
+        projectile->setHealthDamage(this->getHealthDamage());
+
+        // Display the muzzle flash.
+        this->BallGun::muzzleflash();
+    }
+
+    /**
+    @brief
+        Displays the muzzle flash.
+    */
+    void BallGun::muzzleflash()
+    {
+        MuzzleFlash *muzzleFlash = new MuzzleFlash(this->getContext());
+        this->getWeapon()->attach(muzzleFlash);
+        muzzleFlash->setPosition(this->getMuzzleOffset());
+        muzzleFlash->setMaterial(this->material_);
+    }
+}
Index: code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/BallGun.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/BallGun.h	(revision 12281)
+++ code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/BallGun.h	(revision 12281)
@@ -0,0 +1,126 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+    @file HsW01.h
+    @brief Definition of the HsW01 class.
+*/
+
+#ifndef _BallGun_H__
+#define _BallGun_H__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "tools/Timer.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        Shoots laser beams.
+    @author
+        Hagen Seifert
+    @ingroup WeaponsWeaponModes
+    */
+    class _WeaponsExport BallGun : public WeaponMode
+    {
+        public:
+            BallGun(Context* context);
+            virtual ~BallGun();
+
+            virtual void fire() override;
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+
+        protected:
+            /**
+            @brief Set the mesh.
+            @param mesh The mesh name.
+            */
+            void setMesh(const std::string& mesh)
+                { this->mesh_ = mesh; }
+
+            /**
+            @brief Get the mesh.
+            @return Returns the mesh name.
+            */
+            const std::string& getMesh() const
+                { return this->mesh_; }
+
+            /**
+            @brief Set the sound.
+            @param sound The Sound name.
+            */
+            void setSound(const std::string& sound)
+                { this->sound_ = sound; }
+
+            /**
+            @brief Get the sound.
+            @return Returns the sound name.
+            */
+            const std::string& getSound() const
+                { return this->sound_; }
+
+            /**
+            @brief Set the material.
+            @param material The material name.
+            */
+            void setMaterial(const std::string& material)
+                { this->material_ = material; }
+            /**
+            @brief Get the material.
+            @return Returns the material name.
+            */
+            const std::string& getMaterial() const
+                { return this->material_; }
+
+            void setDelay(float delay);
+            /**
+            @brief Get the firing delay.
+            @return Returns the firing delay in seconds.
+            */
+            float getDelay() const
+                { return this->delay_; }
+
+            virtual void shot();
+            void muzzleflash();
+
+            std::string material_; //!< The material.
+            std::string mesh_; //!< The mesh.
+            std::string sound_; //!< The sound.
+
+
+
+            float speed_; //!< The speed of the fired projectile.
+            float delay_; //!< The firing delay.
+            Timer delayTimer_; //!< A timer to delay the firing.
+    };
+}
+
+#endif /* _HsW01_H__ */
Index: code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/CMakeLists.txt
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 12208)
+++ code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 12281)
@@ -14,3 +14,4 @@
   MineGun.cc
   WagnisGun.cc
+  BallGun.cc
 )
