- 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/Projectile.cc
r8538 r8542 23 23 * Fabian 'x3n' Landau 24 24 * Co-authors: 25 * ...25 * simonmie 26 26 * 27 27 */ … … 46 46 47 47 this->setConfigValues(); 48 // this->bDestroy_ = false; 49 // this->owner_ = 0; 50 // this->damage_ = 115; 51 ///////////////////me 52 // this->healthdamage_ = 0; 53 // this->shielddamage_ = 0; 54 ///////////////////end me 48 this->owner_ = 0; 55 49 56 50 // Get notification about collisions 57 58 51 if (GameMode::isMaster()) 59 52 { … … 98 91 } 99 92 93 /* Calls the collidesAgainst function of BasicProjectile 94 */ 100 95 bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint) 101 96 { … … 103 98 } 104 99 105 //////////////////////////me edit106 /* bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)107 {108 if (!this->bDestroy_ && GameMode::isMaster())109 {110 if (otherObject == this->owner_)111 return false;112 113 this->bDestroy_ = true;114 115 Pawn* victim = orxonox_cast<Pawn*>(otherObject); //if otherObject isn't a Pawn, then victim is NULL116 117 if (this->owner_)118 {119 if (!victim || (victim && !victim->hasShield())) //same like below120 {121 ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());122 effect->setPosition(this->getPosition());123 effect->setOrientation(this->getOrientation());124 effect->setDestroyAfterLife(true);125 effect->setSource("Orxonox/explosion3");126 effect->setLifetime(2.0f);127 }128 if (!victim || (victim && !victim->hasShield())) //same like above129 {130 ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());131 effect->setPosition(this->getPosition());132 effect->setOrientation(this->getOrientation());133 effect->setDestroyAfterLife(true);134 effect->setSource("Orxonox/smoke4");135 effect->setLifetime(3.0f);136 }137 if (victim && victim->hasShield())138 {139 ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());140 effect->setPosition(this->getPosition());141 effect->setOrientation(this->getOrientation());142 effect->setDestroyAfterLife(true);143 effect->setSource("Orxonox/engineglow");144 effect->setLifetime(0.5f);145 }146 }147 148 if (victim)149 {150 victim->hit(this->owner_, contactPoint, this->damage_, this->healthdamage_, this->shielddamage_);151 victim->startReloadCountdown();152 }153 }154 return false;155 }156 //////////////////////////////////////////////////////////////////////end edit157 */158 100 void Projectile::setOwner(Pawn* owner) 159 101 {
Note: See TracChangeset
for help on using the changeset viewer.