Changeset 12402 for code/branches/OrxoBlox_FS19/src/modules/weapons
- Timestamp:
- May 20, 2019, 3:09:55 PM (6 years ago)
- 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 1 34 #include "BallProjectile.h" 2 35 #include "gametypes/Gametype.h" 36 #include <OrxoBlox/OrxoBloxStones.h> 3 37 4 38 … … 27 61 this->orxoblox_ = this->getOrxoBlox(); 28 62 this->setCollisionShapeRadius(2.5); 29 this->setDamage(1000);30 63 64 //setEffect("Orxonox/sparks2"); 31 65 } 32 66 … … 81 115 distance_Z = -distance_Z; 82 116 117 //orxout() << distance_X << endl; 118 //orxout() << distance_Z << endl; 119 83 120 if (distance_X < distance_Z) { 84 121 velocity.z = -velocity.z; 122 //orxout() << "z" << endl; 85 123 } 86 124 if (distance_Z < distance_X) { 87 125 velocity.x = -velocity.x; 126 //orxout() << "x" << endl; 88 127 } 89 128 else { 90 129 velocity.x = -velocity.x; 91 130 velocity.z = -velocity.z; 131 //orxout() << "both" << endl; 92 132 } 93 133 this->setVelocity(velocity); 134 //} 94 135 } 95 136 … … 101 142 if (otherObject->isA(Class(OrxoBloxStones))) { 102 143 Bounce(otherObject, contactPoint, cs); 144 (orxonox_cast<OrxoBloxStones*>(otherObject))->gotHit(); 103 145 104 146 } … … 145 187 position.z = this-> fieldHeight_; 146 188 orxoblox_->count(); 147 148 189 suicidal = true; 149 190 … … 215 256 } 216 257 217 218 //This is an override to prevent getting killed by the program219 258 void BallProjectile::destroyObject(void) 220 259 { -
code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.h
r12396 r12402 38 38 std::string materialBase_; //!< The base name of the material. 39 39 OrxoBlox* orxoblox_; 40 OrxoBloxStones* stone_; 40 41 }; 41 42 }
Note: See TracChangeset
for help on using the changeset viewer.