- Timestamp:
- May 12, 2016, 4:03:47 PM (9 years ago)
- Location:
- code/branches/sagerjFS16/src/modules/weapons/weaponmodes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc
r11175 r11185 21 21 * 22 22 * Author: 23 * Martin Polak23 * God of everything 24 24 * Co-authors: 25 * simonmie25 * 26 26 * 27 27 */ … … 51 51 RegisterObject(Discharger); 52 52 53 this->reloadTime_ = 0.23f;54 this->damage_ = 90.01f;55 this->speed_ = 90.01f;53 this->reloadTime_ = 3.14159f; 54 this->damage_ = 0.0f; 55 this->speed_ = 100.0f; 56 56 this->chargeable_ = true; 57 57 … … 65 65 void Discharger::fire() 66 66 { 67 // orxout() << "release" << cTime_ << endl;68 67 BillboardProjectile* projectile = new BillboardProjectile(this->getContext()); 69 68 … … 71 70 projectile->setOrientation(this->getMuzzleOrientation()); 72 71 projectile->setPosition(this->getMuzzlePosition()); 73 projectile->setVelocity(this->getMuzzleDirection() * this->speed_ );72 projectile->setVelocity(this->getMuzzleDirection() * this->speed_ * this->charges_ / 5); 74 73 75 74 projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 76 projectile->setDamage(this->getDamage() * charges_);77 projectile->setShieldDamage(this->getShieldDamage() );78 projectile->setHealthDamage(this->getHealthDamage() );79 //this->charges_ = 0;75 projectile->setDamage(this->getDamage() * this->charges_); 76 projectile->setShieldDamage(this->getShieldDamage() * this->charges_); 77 projectile->setHealthDamage(this->getHealthDamage() * this->charges_); 78 this->charges_ = 0; 80 79 } 81 80 } -
code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h
r11175 r11185 21 21 * 22 22 * Author: 23 * Martin Polak23 * God of everything 24 24 * Co-authors: 25 * ...25 * 26 26 * 27 27 */ … … 58 58 59 59 private: 60 //bool chargeable_; // An indicator that this weapon type is chargeable.61 int charges_;62 60 float speed_; // The speed of the fired projectile. 63 float ctime_; // time the weapon has charged.61 64 62 }; 65 63 }
Note: See TracChangeset
for help on using the changeset viewer.