Changeset 6065 for code/branches/particles2/src/modules/weapons/weaponmodes
- Timestamp:
- Nov 15, 2009, 1:15:42 PM (15 years ago)
- Location:
- code/branches/particles2/src/modules/weapons/weaponmodes
- Files:
-
- 1 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/particles2/src/modules/weapons/weaponmodes/CMakeLists.txt
r5781 r6065 5 5 HsW01.cc 6 6 LightningGun.cc 7 RocketFire.cc 7 8 ) -
code/branches/particles2/src/modules/weapons/weaponmodes/RocketFire.cc
r6059 r6065 27 27 */ 28 28 29 #include " FusionFire.h"29 #include "RocketFire.h" 30 30 31 31 #include "util/Math.h" 32 32 #include "core/CoreIncludes.h" 33 #include "weapons/projectiles/ BillboardProjectile.h"33 #include "weapons/projectiles/Rocket.h" 34 34 35 35 #include "weaponsystem/Weapon.h" … … 39 39 namespace orxonox 40 40 { 41 CreateFactory( FusionFire);41 CreateFactory(RocketFire); 42 42 43 FusionFire::FusionFire(BaseObject* creator) : WeaponMode(creator)43 RocketFire::RocketFire(BaseObject* creator) : WeaponMode(creator) 44 44 { 45 RegisterObject( FusionFire);45 RegisterObject(RocketFire); 46 46 47 this->reloadTime_ = 1.0;47 this->reloadTime_ = 0.20; 48 48 this->bParallelReload_ = false; 49 this->damage_ = 40;50 this->speed_ = 1250;49 this->damage_ = 100; 50 this->speed_ = 500; 51 51 52 this->setMunitionName(" FusionMunition");52 this->setMunitionName("RocketMunition"); 53 53 } 54 54 55 void FusionFire::fire()55 void RocketFire::fire() 56 56 { 57 BillboardProjectile* projectile = new BillboardProjectile(this);57 Rocket* rocket = new Rocket(this); 58 58 59 projectile->setOrientation(this->getMuzzleOrientation());60 projectile->setPosition(this->getMuzzlePosition());61 projectile->setVelocity(this->getMuzzleDirection() * this->speed_);62 projectile->scale(5);59 rocket->setOrientation(this->getMuzzleOrientation()); 60 rocket->setPosition(this->getMuzzlePosition()); 61 rocket->setVelocity(this->getMuzzleDirection() * this->speed_); 62 rocket->scale(2); 63 63 64 projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 65 projectile->setDamage(this->getDamage()); 66 projectile->setColour(ColourValue(1.0f, 0.7f, 0.3f, 1.0f)); 64 rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 65 rocket->setDamage(this->getDamage()); 67 66 } 68 67 } -
code/branches/particles2/src/modules/weapons/weaponmodes/RocketFire.h
r6059 r6065 27 27 */ 28 28 29 #ifndef _ FusionFire_H__30 #define _ FusionFire_H__29 #ifndef _RocketFire_H__ 30 #define _RocketFire_H__ 31 31 32 32 #include "weapons/WeaponsPrereqs.h" … … 35 35 namespace orxonox 36 36 { 37 class _WeaponsExport FusionFire : public WeaponMode37 class _WeaponsExport RocketFire : public WeaponMode 38 38 { 39 39 public: 40 FusionFire(BaseObject* creator);41 virtual ~ FusionFire() {}40 RocketFire(BaseObject* creator); 41 virtual ~RocketFire() {} 42 42 43 43 virtual void fire(); … … 48 48 } 49 49 50 #endif /* _ FusionFire_H__ */50 #endif /* _RocketFire_H__ */
Note: See TracChangeset
for help on using the changeset viewer.