- Timestamp:
- May 30, 2010, 3:19:49 PM (14 years ago)
- Location:
- code/branches/presentation3/src/modules/weapons/weaponmodes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
r6951 r7018 46 46 RegisterObject(SimpleRocketFire); 47 47 48 this->reloadTime_ = 0.20f;48 this->reloadTime_ = 4; 49 49 this->bParallelReload_ = false; 50 50 this->damage_ = 100; 51 this->speed_ = 100;51 this->speed_ = 300; 52 52 53 53 this->setMunitionName("LaserMunition"); … … 64 64 SimpleRocket* rocket = con->getRocket(); 65 65 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); 66 // rocket->setOrientation(this->getMuzzleOrientation());67 66 rocket->setOrientation(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getWorldOrientation()); 68 Vector3 pos = this->getMuzzlePosition(); 69 rocket->setPosition(pos); 70 // rocket->setAcceleration(20*rocket->getOrientation() * WorldEntity::FRONT); 67 rocket->setPosition(this->getMuzzlePosition()); 71 68 rocket->setVelocity(this->getMuzzleDirection()*this->speed_); 72 69 rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 73 70 rocket->setDamage(this->damage_); 74 71 WorldEntity* pawnn=static_cast<ControllableEntity*>(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn())->getTarget(); 75 if (pawnn) 76 { 77 con->setTarget(pawnn); 78 } 72 if (pawnn) con->setTarget(pawnn); 79 73 } 80 74 } -
code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.h
r6951 r7018 40 40 SimpleRocketFire(BaseObject* creator); 41 41 virtual ~SimpleRocketFire(); 42 42 void deactivateFire(); 43 43 virtual void fire(); 44 44 45 45 private: 46 46 float speed_; 47 47 48 }; 48 49 }
Note: See TracChangeset
for help on using the changeset viewer.