Changeset 11052 for code/trunk/src/modules/weapons/weaponmodes
- Timestamp:
- Jan 9, 2016, 6:26:20 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 16 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt
r10629 r11052 11 11 SimpleRocketFire.cc 12 12 GravityBombFire.cc 13 MineGun.cc 13 14 ) -
code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc
r10622 r11052 63 63 this->delayTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&EnergyDrink::shot, this))); 64 64 this->delayTimer_.stopTimer(); 65 66 hudImageString_ = "Orxonox/WSHUD_WM_EnergyDrink"; 65 67 } 66 68 -
code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc
r10622 r11052 58 58 59 59 this->setMunitionName("FusionMunition"); 60 61 hudImageString_ = "Orxonox/WSHUD_WM_FusionFire"; 60 62 } 61 63 -
code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.cc
r10622 r11052 31 31 this->setMunitionName("GravityBombMunition"); 32 32 this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.8); ///< sets sound of the bomb as it is fired. 33 34 hudImageString_ = "Orxonox/WSHUD_WM_GravityBombFire"; 33 35 } 34 36 -
code/trunk/src/modules/weapons/weaponmodes/HsW01.cc
r10296 r11052 69 69 70 70 this->setDefaultSound(this->sound_); 71 72 hudImageString_ = "Orxonox/WSHUD_WM_HsW01"; 71 73 } 72 74 -
code/trunk/src/modules/weapons/weaponmodes/IceGun.cc
- Property svn:eol-style set to native
r10629 r11052 59 59 this->setFreezeFactor(0.5); 60 60 61 this->setMunitionName(" LaserMunition");61 this->setMunitionName("IceMunition"); 62 62 this->setDefaultSound("sounds/Weapon_LightningGun.ogg"); 63 64 hudImageString_ = "Orxonox/WSHUD_WM_IceGun"; 63 65 } 64 66 -
code/trunk/src/modules/weapons/weaponmodes/IceGun.h
- Property svn:eol-style set to native
-
code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc
r10622 r11052 56 56 57 57 this->setMunitionName("LaserMunition"); 58 59 hudImageString_ = "Orxonox/WSHUD_WM_LaserFire"; 58 60 } 59 61 -
code/trunk/src/modules/weapons/weaponmodes/LightningGun.cc
r10296 r11052 54 54 this->speed_ = 750.0f; 55 55 56 this->setMunitionName("L aserMunition");56 this->setMunitionName("LightningMunition"); 57 57 this->setDefaultSound("sounds/Weapon_LightningGun.ogg"); 58 59 hudImageString_ = "Orxonox/WSHUD_WM_LightningGun"; 58 60 } 59 61 -
code/trunk/src/modules/weapons/weaponmodes/RocketFire.cc
r10296 r11052 41 41 #include "weaponsystem/WeaponSystem.h" 42 42 #include "worldentities/pawns/Pawn.h" 43 43 #include "core/XMLPort.h" 44 44 #include "weapons/projectiles/Rocket.h" 45 45 … … 56 56 this->damage_ = 0.0f; 57 57 this->speed_ = 500.0f; 58 this->fuel_ = 10.0f; 58 59 59 60 this->setMunitionName("RocketMunition"); 60 61 // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning) 62 63 hudImageString_ = "Orxonox/WSHUD_WM_RocketFire"; 61 64 } 62 65 63 66 RocketFire::~RocketFire() 64 67 { 68 } 69 70 /** 71 @brief 72 XMLPort for the RocketFire. You can define the maximum lifetime of the rockets 73 */ 74 void RocketFire::XMLPort(Element& xmlelement, XMLPort::Mode mode) 75 { 76 SUPER(RocketFire, XMLPort, xmlelement, mode); 77 78 XMLPortParam(RocketFire, "fuel", setFuel, getFuel, xmlelement, mode); 65 79 } 66 80 … … 77 91 rocket->setPosition(this->getMuzzlePosition()); 78 92 rocket->setVelocity(this->getMuzzleDirection() * this->speed_); 79 rocket->scale( 2);93 rocket->scale(1.0f); 80 94 81 95 rocket->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); … … 83 97 rocket->setShieldDamage(this->getShieldDamage()); 84 98 rocket->setHealthDamage(this->getHealthDamage()); 99 rocket->setMaxFuel(this->fuel_); 85 100 } 86 101 } -
code/trunk/src/modules/weapons/weaponmodes/RocketFire.h
r9667 r11052 54 54 virtual ~RocketFire(); 55 55 56 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 57 56 58 virtual void fire(); 59 inline void setFuel(float fuel) 60 { this->fuel_ = fuel; } 61 inline float getFuel() const 62 { return this->fuel_; } 57 63 58 64 private: 59 65 float speed_; //!< The speed of the Rocket. 66 float fuel_; //!< The maximum lifetime of the rocket 60 67 }; 61 68 } -
code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.cc
r10622 r11052 59 59 this->setMunitionName("RocketMunition"); 60 60 // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning) 61 62 hudImageString_ = "Orxonox/WSHUD_WM_SimpleRocketFire"; 61 63 } 62 64 -
code/trunk/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
r9667 r11052 64 64 this->setDefaultSoundWithVolume("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 67 hudImageString_ = "Orxonox/WSHUD_WM_SimpleRocketFire"; 66 68 } 67 69 … … 83 85 rocket->setVelocity(this->getMuzzleDirection()*this->speed_); 84 86 rocket->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 87 rocket->scale(1.0f); 85 88 86 89 rocket->setDamage(this->damage_); … … 89 92 90 93 WorldEntity* pawn = static_cast<ControllableEntity*>(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn())->getTarget(); 91 if (pawn) controller->setTarget(pawn); 94 if (pawn) 95 controller->setTarget(pawn); 92 96 } 93 97 } -
code/trunk/src/modules/weapons/weaponmodes/SplitGun.cc
- Property svn:eol-style set to native
r10629 r11052 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "core/XMLPort.h" 37 #include "core/XMLPort.h" 38 38 #include "weaponsystem/Weapon.h" 39 39 #include "weaponsystem/WeaponPack.h" … … 62 62 this->setMunitionName("SplitMunition"); 63 63 this->setDefaultSound("sounds/Weapon_LightningGun.ogg"); 64 65 hudImageString_ = "Orxonox/WSHUD_WM_SplitGun"; 64 66 } 65 67 -
code/trunk/src/modules/weapons/weaponmodes/SplitGun.h
- Property svn:eol-style set to native
Note: See TracChangeset
for help on using the changeset viewer.