- Timestamp:
- May 23, 2011, 3:54:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gameimmersion/src/modules/weapons/projectiles/Rocket.cc
r8538 r8542 23 23 * Oliver Scheuss 24 24 * Co-authors: 25 * ...25 * simonmie 26 26 * 27 27 */ … … 43 43 #include "Scene.h" 44 44 45 #include "BasicProjectile.h"46 47 45 namespace orxonox 48 46 { … … 59 57 60 58 this->localAngularVelocity_ = 0; 61 // this->bDestroy_ = false;62 59 this->lifetime_ = 100; 63 60 … … 183 180 } 184 181 182 /* Calls the collidesAgainst function of BasicProjectile 183 */ 185 184 bool Rocket::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint) 186 185 { 187 186 return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->getOwner(),this); 188 189 /* * / if (!this->bDestroy_ && GameMode::isMaster())190 {191 if (otherObject == this->owner_)192 return false;193 194 this->bDestroy_ = true;195 196 if (this->owner_)197 {198 {199 ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());200 effect->setPosition(this->getPosition());201 effect->setOrientation(this->getOrientation());202 effect->setDestroyAfterLife(true);203 effect->setSource("Orxonox/explosion4");204 effect->setLifetime(2.0f);205 }206 207 {208 ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());209 effect->setPosition(this->getPosition());210 effect->setOrientation(this->getOrientation());211 effect->setDestroyAfterLife(true);212 effect->setSource("Orxonox/smoke4");213 effect->setLifetime(3.0f);214 }215 }216 217 Pawn* victim = orxonox_cast<Pawn*>(otherObject);218 if (victim)219 victim->hit(this->owner_, contactPoint, this->damage_);220 // this->destroy();221 }222 / * */ return false;223 187 } 224 188 … … 237 201 void Rocket::fired(unsigned int firemode) 238 202 { 239 // if (this->owner_) 240 // { 241 this->destroy(); 242 // } 203 this->destroy(); 243 204 } 244 205
Note: See TracChangeset
for help on using the changeset viewer.