- Timestamp:
- May 7, 2010, 4:14:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
r6834 r6863 45 45 { 46 46 RegisterObject(SimpleRocketFire); 47 48 47 49 /*this->reloadTime_ = 0.20f;48 this->reloadTime_ = 0.20f; 50 49 this->bParallelReload_ = false; 51 50 this->damage_ = 100; 52 this->speed_ = 50 0;51 this->speed_ = 50; 53 52 54 this->setMunitionName("LaserMunition"); */53 this->setMunitionName("LaserMunition"); 55 54 // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning) 56 55 } … … 67 66 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); 68 67 rocket->setOrientation(this->getMuzzleOrientation()); 69 rocket->setPosition(this->getMuzzlePosition()); 70 rocket->setVelocity(this->getMuzzleDirection() * rocket->getVelocity()); 68 Vector3 pos = this->getMuzzlePosition() + (this->getMuzzleOrientation()* Vector3(-2, -3, -2)); 69 rocket->setPosition(pos); 70 rocket->setVelocity(this->getMuzzleDirection()*this->speed_); 71 //Ogre::Vector3 vec = this->getMuzzlePosition(); 72 //vec.normalise(); 73 //rocket->setAcceleration(100*vec); 71 74 rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 72 75 //con->getRocket()->setPosition(this->getMuzzlePosition()); 73 //con->setControllableEntity(dynamic_cast< ControllableEntity*>(rocket));76 //con->setControllableEntity(dynamic_cast<rocket*>(ControllableEntity)); 74 77 //con->getControllableEntity()->setPosition(this->getMuzzlePosition()); 75 78
Note: See TracChangeset
for help on using the changeset viewer.