Changeset 6412 for code/branches/pickup2/src/modules/weapons/projectiles
- Timestamp:
- Dec 25, 2009, 1:18:03 PM (15 years ago)
- Location:
- code/branches/pickup2
- Files:
-
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2
- Property svn:mergeinfo changed
-
code/branches/pickup2/src/modules/weapons/projectiles/CMakeLists.txt
r5781 r6412 4 4 Projectile.cc 5 5 LightningGunProjectile.cc 6 Rocket.cc 6 7 ) -
code/branches/pickup2/src/modules/weapons/projectiles/LightningGunProjectile.cc
r5929 r6412 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/branches/pickup2/src/modules/weapons/projectiles/Projectile.cc
r6405 r6412 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 } … … 129 130 Pawn* victim = orxonox_cast<Pawn*>(otherObject); 130 131 if (victim) 131 victim-> damage(dmg, this->owner_);132 victim->hit(this->owner_, contactPoint, dmg); 132 133 } 133 134 return false;
Note: See TracChangeset
for help on using the changeset viewer.