Changeset 6834 for code/branches/rocket/src/modules/weapons/weaponmodes
- Timestamp:
- May 3, 2010, 1:40:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
r6827 r6834 45 45 { 46 46 RegisterObject(SimpleRocketFire); 47 47 48 48 49 /* this->reloadTime_ = 0.20f; … … 61 62 void SimpleRocketFire::fire() 62 63 { 63 SimpleRocket* rocket = new SimpleRocket(this); 64 RocketController* con = new RocketController(this); 64 //SimpleRocket* rocket = new SimpleRocket(this); 65 RocketController* con = new RocketController(this); 66 SimpleRocket* rocket = con->getRocket(); 67 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); 68 rocket->setOrientation(this->getMuzzleOrientation()); 69 rocket->setPosition(this->getMuzzlePosition()); 70 rocket->setVelocity(this->getMuzzleDirection() * rocket->getVelocity()); 71 rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 72 //con->getRocket()->setPosition(this->getMuzzlePosition()); 73 //con->setControllableEntity(dynamic_cast<ControllableEntity*>(rocket)); 74 //con->getControllableEntity()->setPosition(this->getMuzzlePosition()); 65 75 66 67 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); 76 /* this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); 68 77 rocket->setOrientation(this->getMuzzleOrientation()); 69 78 rocket->setPosition(this->getMuzzlePosition()); 70 rocket->scale(10);79 rocket->scale(10); 71 80 rocket->setVelocity(this->getMuzzleDirection() * this->speed_); 72 81 rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 73 rocket->setDamage(this->getDamage()); 74 //rocket->scale(2);75 82 rocket->setDamage(this->getDamage()); 83 rocket->scale(2); 84 */ 76 85 } 77 86 }
Note: See TracChangeset
for help on using the changeset viewer.