- Timestamp:
- May 21, 2010, 10:25:27 AM (15 years ago)
- Location:
- code/branches/presentation3
- Files:
-
- 2 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3
- Property svn:mergeinfo changed
/code/branches/rocket (added) merged: 6778-6781,6783-6785,6803,6809-6811,6813-6818,6827,6834,6863,6878,6900,6902-6905,6943,6948-6950
- Property svn:mergeinfo changed
-
code/branches/presentation3/src/modules/weapons/weaponmodes/CMakeLists.txt
r6417 r6951 6 6 LightningGun.cc 7 7 RocketFire.cc 8 SimpleRocketFire.cc 8 9 ) -
code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
r6950 r6951 61 61 void SimpleRocketFire::fire() 62 62 { 63 64 65 66 // 63 RocketController* con = new RocketController(this); 64 SimpleRocket* rocket = con->getRocket(); 65 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); 66 // rocket->setOrientation(this->getMuzzleOrientation()); 67 67 rocket->setOrientation(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getWorldOrientation()); 68 68 Vector3 pos = this->getMuzzlePosition(); 69 69 rocket->setPosition(pos); 70 // rocket->setAcceleration(20*rocket->getOrientation() * WorldEntity::FRONT); 71 rocket->setVelocity(this->getMuzzleDirection()*this->speed_); 72 rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 73 rocket->setDamage(this->damage_); 74 WorldEntity* pawnn=this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getTarget(); 75 if (pawnn) { 76 con->setTarget(pawnn); 77 } 70 // rocket->setAcceleration(20*rocket->getOrientation() * WorldEntity::FRONT); 71 rocket->setVelocity(this->getMuzzleDirection()*this->speed_); 72 rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 73 rocket->setDamage(this->damage_); 74 WorldEntity* pawnn=static_cast<ControllableEntity*>(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn())->getTarget(); 75 if (pawnn) 76 { 77 con->setTarget(pawnn); 78 } 78 79 } 79 80 }
Note: See TracChangeset
for help on using the changeset viewer.