- Timestamp:
- Apr 14, 2016, 4:02:00 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc
r11153 r11166 51 51 RegisterObject(Discharger); 52 52 53 this->reloadTime_ = 0.1f; 54 this->damage_ = 9000.1f*loaded_; 55 this->speed_ = 9000.1f*loaded_; 56 57 this->setMunitionName("dEnergy"); 58 this->setFireSound("sounds/Weapon_Discharger.ogg"); 59 this->setReloadSound("sounds/Reload_Discharger.ogg", 0.8); 53 this->setMunitionName("LaserMunition"); 60 54 61 55 hudImageString_ = "Orxonox/WSHUD_WM_LaserFire"; 62 56 } 63 57 64 /**65 @brief66 Fires the weapon. Creates a projectile and fires it.67 */68 58 void Discharger::fire() 69 59 { 70 /*BillboardProjectile* projectile = new BillboardProjectile(this->getContext()); 71 72 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); 73 projectile->setOrientation(this->getMuzzleOrientation()); 74 projectile->setPosition(this->getMuzzlePosition()); 75 projectile->setVelocity(this->getMuzzleDirection() * this->speed_); 76 77 projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 78 projectile->setDamage(this->getDamage()); 79 projectile->setShieldDamage(this->getShieldDamage()); 80 projectile->setHealthDamage(this->getHealthDamage());*/ 81 extern unsigned int beginLoad_ = time; 60 orxout() << "fire dis " << endl; 82 61 } 83 void Discharger::release() 62 63 bool Discharger::fire(float* reloadTime) 84 64 { 85 extern unsigned int endLoad_ = time; 86 extern unsigned int loaded_ = endLoad_ - beginLoad_; 87 65 orxout() << "fire Discharger " << endl; 66 return false; 67 } 68 bool Discharger::release(float* reloadTime) 69 { 70 orxout() << "release Discharger " << endl; 71 return false; 88 72 } 89 73 }
Note: See TracChangeset
for help on using the changeset viewer.