Changeset 6417 for code/trunk/src/modules/weapons/projectiles
- Timestamp:
- Dec 25, 2009, 10:23:58 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/weapons/projectiles/CMakeLists.txt
r5781 r6417 4 4 Projectile.cc 5 5 LightningGunProjectile.cc 6 Rocket.cc 6 7 ) -
code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.cc
r5929 r6417 43 43 this->maxTextureIndex_ = 8; 44 44 this->textureTimer_.setTimer(0.01f, true, createExecutor(createFunctor(&LightningGunProjectile::changeTexture, this))); 45 45 46 46 registerVariables(); 47 47 } 48 48 49 49 void LightningGunProjectile::registerVariables() 50 50 { 51 51 registerVariable(this->materialBase_); 52 52 } 53 53 54 54 void LightningGunProjectile::setMaterial(const std::string& material) 55 55 { 56 this->materialBase_ = material; 57 56 this->materialBase_ = material; 57 58 58 BillboardProjectile::setMaterial(material + multi_cast<std::string>(this->textureIndex_)); 59 59 } … … 64 64 if (this->textureIndex_ > this->maxTextureIndex_) 65 65 this->textureIndex_ = 1; 66 66 67 67 this->setMaterial(this->materialBase_); 68 68 } -
code/trunk/src/modules/weapons/projectiles/Projectile.cc
r5929 r6417 48 48 this->bDestroy_ = false; 49 49 this->owner_ = 0; 50 this->damage_ = 15; 50 51 51 52 // Get notification about collisions … … 53 54 if (GameMode::isMaster()) 54 55 { 56 this->setMass(1.0); 55 57 this->enableCollisionCallback(); 56 58 this->setCollisionResponse(false); … … 71 73 void Projectile::setConfigValues() 72 74 { 73 SetConfigValue(damage_, 15.0).description("The damage caused by the projectile");74 75 SetConfigValue(lifetime_, 4.0).description("The time in seconds a projectile stays alive"); 75 76 } … … 128 129 Pawn* victim = orxonox_cast<Pawn*>(otherObject); 129 130 if (victim) 130 victim-> damage(dmg, this->owner_);131 victim->hit(this->owner_, contactPoint, dmg); 131 132 } 132 133 return false;
Note: See TracChangeset
for help on using the changeset viewer.