- Timestamp:
- Nov 15, 2009, 1:15:42 PM (14 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.