Changeset 1596 for code/branches/core3/src/orxonox/objects/Projectile.cc
- Timestamp:
- Jun 12, 2008, 10:53:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core3/src/orxonox/objects/Projectile.cc
r1592 r1596 44 44 namespace orxonox 45 45 { 46 float Projectile::speed_ = 5000;46 float Projectile::speed_s = 5000; 47 47 48 48 Projectile::Projectile(SpaceShip* owner) : owner_(owner) … … 74 74 SetConfigValue(damage_, 15.0).description("The damage caused by the projectile"); 75 75 SetConfigValue(lifetime_, 4.0).description("The time in seconds a projectile stays alive"); 76 SetConfigValue(speed_, 5000.0).description("The speed of a projectile in units per second"); 76 SetConfigValue(speed_, 5000.0).description("The speed of a projectile in units per second").callback(&Projectile::speedChanged); 77 } 77 78 79 void Projectile::speedChanged() 80 { 81 Projectile::speed_s = this->speed_; 78 82 if (this->owner_) 79 83 this->setVelocity(this->owner_->getInitialDir() * this->speed_);
Note: See TracChangeset
for help on using the changeset viewer.