Changeset 11108 for code/trunk/src/modules/weapons/weaponmodes
- Timestamp:
- Feb 4, 2016, 11:54:04 PM (9 years ago)
- Location:
- code/trunk/src/modules/weapons/weaponmodes
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt
r11052 r11108 7 7 SplitGun.cc 8 8 IceGun.cc 9 FlameGun.cc 9 10 RocketFire.cc 10 11 RocketFireOld.cc -
code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc
r11052 r11108 59 59 this->speed_ = 750.0f; 60 60 this->delay_ = 0.0f; 61 this->timerStarted_ = false; 61 62 this->setMunitionName("FusionMunition"); 63 this->setFireSound("sounds/Weapon_EnergyDrink.ogg"); 62 64 63 65 this->delayTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&EnergyDrink::shot, this))); … … 93 95 void EnergyDrink::fire() 94 96 { 95 this->delayTimer_.startTimer(); 97 if (!timerStarted_) 98 { 99 this->delayTimer_.startTimer(); 100 this->timerStarted_ = true; 101 } 102 } 103 104 bool EnergyDrink::fire(float* reloadTime) 105 { 106 if (!timerStarted_) 107 { 108 return WeaponMode::fire(reloadTime); 109 } 110 111 return false; 96 112 } 97 113 … … 102 118 void EnergyDrink::shot() 103 119 { 120 this->timerStarted_ = false; 121 104 122 // Create the projectile 105 123 Projectile* projectile = new Projectile(this->getContext()); -
code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.h
r11071 r11108 57 57 virtual ~EnergyDrink() {} 58 58 59 virtual bool fire(float* reloadTime) override; 59 60 virtual void fire() override; 60 61 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; … … 89 90 float delay_; //!< The firing delay. 90 91 Timer delayTimer_; //!< The timer to delay the firing. 92 bool timerStarted_; 91 93 }; 92 94 } -
code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc
r11052 r11108 58 58 59 59 this->setMunitionName("FusionMunition"); 60 this->setFireSound("sounds/Weapon_FusionFire.ogg"); 60 61 61 62 hudImageString_ = "Orxonox/WSHUD_WM_FusionFire"; -
code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.cc
r11052 r11108 30 30 31 31 this->setMunitionName("GravityBombMunition"); 32 this->set DefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.8); ///< sets sound of the bomb as it is fired.32 this->setFireSound("sounds/Rocket_launch.ogg",0.8); ///< sets sound of the bomb as it is fired. 33 33 34 34 hudImageString_ = "Orxonox/WSHUD_WM_GravityBombFire"; -
code/trunk/src/modules/weapons/weaponmodes/HsW01.cc
r11052 r11108 62 62 this->setMunitionName("LaserMunition"); 63 63 this->mesh_ = "laserbeam.mesh"; 64 this->sound_ = "sounds/Weapon_HsW01.ogg";65 64 66 65 … … 68 67 this->delayTimer_.stopTimer(); 69 68 70 this->setDefaultSound(this->sound_); 69 this->setFireSound("sounds/Weapon_HsW01.ogg"); 70 this->setReloadSound("sounds/Reload_HsW01.ogg", 0.5); 71 71 72 72 hudImageString_ = "Orxonox/WSHUD_WM_HsW01"; -
code/trunk/src/modules/weapons/weaponmodes/IceGun.cc
r11052 r11108 60 60 61 61 this->setMunitionName("IceMunition"); 62 this->setDefaultSound("sounds/Weapon_LightningGun.ogg"); 62 this->setFireSound("sounds/Weapon_LightningGun.ogg"); 63 this->setReloadSound("sounds/Reload_IceGun.ogg", 0.4); 63 64 64 65 hudImageString_ = "Orxonox/WSHUD_WM_IceGun"; -
code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc
r11052 r11108 41 41 #include "worldentities/pawns/Pawn.h" 42 42 43 #include "weapons/projectiles/ ParticleProjectile.h"43 #include "weapons/projectiles/BillboardProjectile.h" 44 44 45 45 namespace orxonox … … 56 56 57 57 this->setMunitionName("LaserMunition"); 58 this->setFireSound("sounds/Weapon_LaserFire.ogg"); 59 this->setReloadSound("sounds/Reload_LaserFire.ogg", 0.8); 58 60 59 61 hudImageString_ = "Orxonox/WSHUD_WM_LaserFire"; … … 66 68 void LaserFire::fire() 67 69 { 68 ParticleProjectile* projectile = new ParticleProjectile(this->getContext());70 BillboardProjectile* projectile = new BillboardProjectile(this->getContext()); 69 71 70 72 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); -
code/trunk/src/modules/weapons/weaponmodes/LightningGun.cc
r11052 r11108 55 55 56 56 this->setMunitionName("LightningMunition"); 57 this->set DefaultSound("sounds/Weapon_LightningGun.ogg");57 this->setFireSound("sounds/Weapon_LightningGun.ogg"); 58 58 59 59 hudImageString_ = "Orxonox/WSHUD_WM_LightningGun"; -
code/trunk/src/modules/weapons/weaponmodes/MineGun.cc
r11052 r11108 57 57 58 58 this->setMunitionName("MineMunition"); 59 this->set DefaultSound("sounds/mineactivate.ogg");59 this->setFireSound("sounds/mineactivate.ogg"); 60 60 61 61 hudImageString_ = "Orxonox/WSHUD_WM_MineGun"; -
code/trunk/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
r11052 r11108 62 62 63 63 this->setMunitionName("RocketMunition"); 64 this->set DefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.4f);64 this->setFireSound("sounds/Rocket_launch.ogg",0.4f); 65 65 // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning) 66 66 -
code/trunk/src/modules/weapons/weaponmodes/SplitGun.cc
r11052 r11108 61 61 62 62 this->setMunitionName("SplitMunition"); 63 this->setDefaultSound("sounds/Weapon_LightningGun.ogg"); 63 this->setFireSound("sounds/Weapon_SplitGun.ogg", 0.5); 64 this->setReloadSound("sounds/Reload_SplitGun.ogg", 0.8); 64 65 65 66 hudImageString_ = "Orxonox/WSHUD_WM_SplitGun";
Note: See TracChangeset
for help on using the changeset viewer.