Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2019, 3:09:55 PM (6 years ago)
Author:
ahuwyler
Message:

last commit

Location:
code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.cc

    r12401 r12402  
     1/*
     2 *   ORXONOX - the hottest 3D action shooter ever to exist
     3 *                    > www.orxonox.net <
     4 *
     5 *
     6 *   License notice:
     7 *
     8 *   This program is free software; you can redistribute it and/or
     9 *   modify it under the terms of the GNU General Public License
     10 *   as published by the Free Software Foundation; either version 2
     11 *   of the License, or (at your option) any later version.
     12 *
     13 *   This program is distributed in the hope that it will be useful,
     14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 *   GNU General Public License for more details.
     17 *
     18 *   You should have received a copy of the GNU General Public License
     19 *   along with this program; if not, write to the Free Software
     20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     21 *
     22 *   Author:
     23 *      Fabian 'x3n' Landau
     24 *   Co-authors:
     25 *      ...
     26 *
     27 */
     28
     29/**
     30    @file ParticleProjectile.h
     31    @brief Implementation of the ParticleProjectile class.
     32*/
     33
    134#include "BallProjectile.h"
    235#include "gametypes/Gametype.h"
     36#include <OrxoBlox/OrxoBloxStones.h>
    337
    438
     
    2761        this->orxoblox_ = this->getOrxoBlox();
    2862        this->setCollisionShapeRadius(2.5);
    29         this->setDamage(1000);
    30                 //setEffect("Orxonox/sparks2");
     63       
     64        //setEffect("Orxonox/sparks2");
    3165    }
    3266
     
    81115                distance_Z = -distance_Z;
    82116
     117            //orxout() << distance_X << endl;
     118            //orxout() << distance_Z << endl;
     119
    83120            if (distance_X < distance_Z) {
    84121                velocity.z = -velocity.z;
     122                //orxout() << "z" << endl;
    85123            }
    86124            if (distance_Z < distance_X) {
    87125                velocity.x = -velocity.x;
     126                //orxout() << "x" << endl;
    88127            }
    89128            else {
    90129                velocity.x = -velocity.x;
    91130                velocity.z = -velocity.z;
     131                //orxout() << "both" << endl;
    92132            }
    93133            this->setVelocity(velocity);
     134        //}
    94135    }
    95136
     
    101142            if (otherObject->isA(Class(OrxoBloxStones))) {
    102143                Bounce(otherObject, contactPoint, cs);
     144                (orxonox_cast<OrxoBloxStones*>(otherObject))->gotHit();
    103145               
    104146            }
     
    145187                position.z = this-> fieldHeight_;
    146188                orxoblox_->count();
    147 
    148189                suicidal = true;
    149190               
     
    215256    }
    216257
    217 
    218     //This is an override to prevent getting killed by the program
    219258    void BallProjectile::destroyObject(void)
    220259    {
  • code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.h

    r12396 r12402  
    3838            std::string materialBase_; //!< The base name of the material.
    3939            OrxoBlox* orxoblox_;
     40            OrxoBloxStones* stone_;
    4041    };
    4142}
Note: See TracChangeset for help on using the changeset viewer.