[Orxonox-commit 7661] r12254 - in code/branches/OrxoBlox_FS19/src/modules/OrxoBlox: . BallGun

pomselj at orxonox.net pomselj at orxonox.net
Thu Mar 28 15:35:22 CET 2019


Author: pomselj
Date: 2019-03-28 15:35:22 +0100 (Thu, 28 Mar 2019)
New Revision: 12254

Added:
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGun.cc
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGun.h
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGunShooter.cc
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGunShooter.h
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallMunition.cc
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallMunition.h
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallProjectile.cc
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallProjectile.h
Modified:
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/CMakeLists.txt
Log:
Added Folder BallGun, in it are the BallGun Files, the files are not yet correctly documented, the build DOES compile

Added: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGun.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGun.cc	                        (rev 0)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGun.cc	2019-03-28 14:35:22 UTC (rev 12254)
@@ -0,0 +1,88 @@
+/*
+ *   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 "BallGun.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 "BallProjectile.h"
+
+namespace orxonox
+{
+    RegisterClass(BallGun);
+
+    BallGun::BallGun(Context* context) : WeaponMode(context)
+    {
+        RegisterObject(BallGun);
+
+        // Default values
+        this->reloadTime_ = 1.0f;
+        this->damage_ = 0.0f;
+        this->speed_ = 1200.0f;
+
+
+        this->setMunitionName("BallMunition");
+        this->setFireSound("sounds/Weapon_LightningGun.ogg");
+        this->setReloadSound("sounds/Reload_IceGun.ogg", 0.4);
+
+        hudImageString_ = "Orxonox/WSHUD_WM_IceGun";
+    }
+
+    BallGun::~BallGun()
+    {
+    }
+
+    /**
+    @brief
+        Fires the weapon. Creates a projectile and fires it.
+    */
+    void BallGun::fire()
+    {
+        BallProjectile* projectile = new BallProjectile(this->getContext());
+
+        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());
+    }
+}

Added: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGun.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGun.h	                        (rev 0)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGun.h	2019-03-28 14:35:22 UTC (rev 12254)
@@ -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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file IceGun.h
+    @brief Definition of the IceGun class.
+*/
+
+#ifndef _BallGun_H__
+#define _BallGun_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 BallGun : public WeaponMode
+    {
+        public:
+            BallGun(Context* context);
+            virtual ~BallGun();
+
+            virtual void fire() override;
+            
+       private:
+            float speed_; //The speed of the fired projectile.
+    };
+}
+
+#endif /* _IceGun_H__ */

Added: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGunShooter.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGunShooter.cc	                        (rev 0)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGunShooter.cc	2019-03-28 14:35:22 UTC (rev 12254)
@@ -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 BallGunShooter.h
+    @brief Implementation of the BallGunShooter class.
+*/
+
+#include "core/CoreIncludes.h"
+#include "core/command/Executor.h"
+
+#include "BallGunShooter.h"
+
+namespace orxonox
+{
+    RegisterClass(BallGunShooter);
+
+    /**
+    @brief
+        Constructor.
+    */
+    BallGunShooter::BallGunShooter(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(BallGunShooter);
+
+        model = new Model(this->getContext());
+        model->setMeshSource("IceStar.mesh");
+        model->setScale(4.0);
+        this->attach(model);
+        model->setPosition(Vector3(0,0,0));
+    }
+
+    BallGunShooter::~BallGunShooter() {}
+}

Added: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGunShooter.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGunShooter.h	                        (rev 0)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallGunShooter.h	2019-03-28 14:35:22 UTC (rev 12254)
@@ -0,0 +1,62 @@
+/*
+ *   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 BallGunShooter.h
+    @brief Definition of the BallGunShooter class.
+*/
+
+#ifndef _BallGunShooter_H__
+#define _BallGunShooter_H__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "worldentities/StaticEntity.h"
+#include "graphics/Model.h"
+#include "tools/Timer.h"  
+#include "worldentities/pawns/SpaceShip.h"  
+
+namespace orxonox
+{
+    /**
+    @brief
+        This is the WorldEntity that gets attached to a victim hit by a IceGunProjectile. It slows down the hit SpaceShip by a defined amount and time.
+    @ingroup Weapons
+    */
+    class _WeaponsExport BallGunShooter : public StaticEntity
+    {
+        public:
+            BallGunShooter(Context* context);
+            virtual ~BallGunShooter();
+
+        private:     
+            Model* model;
+    };
+}
+
+#endif /* _IceGunFreezer_H__ */

Added: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallMunition.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallMunition.cc	                        (rev 0)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallMunition.cc	2019-03-28 14:35:22 UTC (rev 12254)
@@ -0,0 +1,56 @@
+/*
+ *   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) : Munition(context)
+    {
+        RegisterObject(BallMunition);
+
+        this->maxMunitionPerMagazine_ = 1;
+        this->maxMagazines_ = 50;
+        this->unassignedMagazines_ = 25;
+
+        this->deployment_ = MunitionDeployment::Stack;
+
+        this->bAllowMunitionRefilling_ = true;
+        this->bAllowMultiMunitionRemovementUnderflow_ = false;
+
+        this->reloadTime_ = 0.5f;
+    }
+}

Added: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallMunition.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallMunition.h	                        (rev 0)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallMunition.h	2019-03-28 14:35:22 UTC (rev 12254)
@@ -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/Munition.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        IceMunition.
+    @author
+        Fabien Vultier
+    @ingroup WeaponsMunitions
+    */
+    class _WeaponsExport BallMunition : public Munition
+    {
+        public:
+            BallMunition(Context* context);
+            virtual ~BallMunition() = default;
+    };
+}
+
+#endif /* _SplitMunition_H__ */

Added: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallProjectile.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallProjectile.cc	                        (rev 0)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallProjectile.cc	2019-03-28 14:35:22 UTC (rev 12254)
@@ -0,0 +1,173 @@
+/*
+ *   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"
+
+namespace orxonox
+{
+    RegisterClass(BallProjectile);
+
+    BallProjectile::BallProjectile(Context* context) : Projectile(context)
+    {
+        RegisterObject(BallProjectile);
+
+        this->particles_ = nullptr;
+        this->setDestroyAfterCollision(false); //I want the ball to bounce, not to be destroyed
+
+        //setEffect("Orxonox/sparks2");
+    }
+
+    BallProjectile::~BallProjectile()
+    {
+        if (this->isInitialized() && this->particles_)
+        {
+            this->detachOgreObject(this->particles_->getParticleSystem());
+            delete this->particles_;
+        }
+    }
+
+    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;
+
+            if (distance_X < 0)
+                distance_X = -distance_X;
+
+            int distance_Y = positionOtherObject.y - contactPosition.y;    
+
+            if (distance_Y < 0)
+                distance_Y = -distance_Y;
+
+            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)
+    {
+        if (GameMode::isMaster())
+        {
+
+            Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is nullptr
+
+            WorldEntity* entity = orxonox_cast<WorldEntity*>(this);
+            assert(entity); // The projectile must not be a WorldEntity.
+
+            // If visual effects after destruction cause problems, put this block below the effects code block
+            if (victim)
+            {
+                victim->hit(this->getShooter(), contactPoint, cs, this->getDamage(), this->getHealthDamage(), this->getShieldDamage());
+                victim->startShieldRechargeCountdown();
+            }
+
+            // Visual effects for being hit, depending on whether the shield is hit or not
+            if (this->getShooter()) // If the owner does not exist (anymore?), no effects are displayed.
+            {
+                // Damping and explosion effect is only played if the victim is no Pawn (see cast above)
+                // or if the victim is a Pawn, has no shield left, is still alive and any damage goes to the health
+                if (!victim || (victim && !victim->hasShield() && victim->getHealth() > 0.0f && (this->getDamage() > 0.0f || this->getHealthDamage() > 0.0f)))
+                {
+                    {
+                        ParticleSpawner* effect = new ParticleSpawner(this->getShooter()->getContext());
+                        effect->setPosition(entity->getPosition());
+                        effect->setOrientation(entity->getOrientation());
+                        effect->setDestroyAfterLife(true);
+                        effect->setSource("Orxonox/explosion3");
+                        effect->setLifetime(2.0f);
+                    }
+                    // Second effect with same condition
+                    {
+                        ParticleSpawner* effect = new ParticleSpawner(this->getShooter()->getContext());
+                        effect->setPosition(entity->getPosition());
+                        effect->setOrientation(entity->getOrientation());
+                        effect->setDestroyAfterLife(true);
+                        effect->setSource("Orxonox/smoke4");
+                        effect->setLifetime(3.0f);
+                    }
+                }
+
+                // victim->isAlive() is not false until the next tick, so getHealth() > 0 is used instead
+                if (victim && victim->hasShield() && (this->getDamage() > 0.0f || this->getShieldDamage() > 0.0f) && victim->getHealth() > 0.0f)
+                {
+                    ParticleSpawner* effect = new ParticleSpawner(this->getShooter()->getContext());
+                    effect->setDestroyAfterLife(true);
+                    effect->setSource("Orxonox/Shield");
+                    effect->setLifetime(0.5f);
+                    victim->attach(effect);
+                }
+            }
+
+            Bounce(otherObject, contactPoint, cs);
+
+            return true;
+        }
+        return false;
+    }
+}

Added: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallProjectile.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallProjectile.h	                        (rev 0)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/BallGun/BallProjectile.h	2019-03-28 14:35:22 UTC (rev 12254)
@@ -0,0 +1,62 @@
+/*
+ *   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 Projectile
+    {
+        public:
+            BallProjectile(Context* context);
+            virtual ~BallProjectile();
+            virtual void Bounce(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs);
+            virtual bool processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs);
+        private:
+            ParticleInterface* particles_; //!< The particles.
+    };
+}
+
+#endif /* _ParticleProjectile_H__ */

Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/CMakeLists.txt
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/CMakeLists.txt	2019-03-28 14:32:09 UTC (rev 12253)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/CMakeLists.txt	2019-03-28 14:35:22 UTC (rev 12254)
@@ -1,5 +1,9 @@
 SET_SOURCE_FILES(OrxoBlox_FS19_SRC_FILES
 BUILD_UNIT OrxoBloxBuildUnit.cc
+  BallGun/BallGun.cc
+  BallGun/BallGunShooter.cc
+  BallGun/BallMunition.cc
+  BallGun/BallProjectile.cc
   OrxoBlox.cc
   OrxoBloxAI.cc
   OrxoBloxBall.cc



More information about the Orxonox-commit mailing list