Changeset 6417 for code/trunk/src/modules/weapons/weaponmodes
- Timestamp:
- Dec 25, 2009, 10:23:58 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 6 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt
r5781 r6417 5 5 HsW01.cc 6 6 LightningGun.cc 7 RocketFire.cc 7 8 ) -
code/trunk/src/modules/weapons/weaponmodes/HsW01.cc
r5929 r6417 39 39 #include "weaponsystem/WeaponPack.h" 40 40 #include "weaponsystem/WeaponSystem.h" 41 #include "worldentities/WorldEntity.h" 42 #include "worldentities/pawns/Pawn.h" 41 43 42 44 namespace orxonox … … 56 58 this->delayTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&HsW01::shot, this))); 57 59 this->delayTimer_.stopTimer(); 60 61 this->setDefaultSound("sounds/Weapon_HsW01.ogg"); 62 } 63 64 HsW01::~HsW01() 65 { 58 66 } 59 67 … … 103 111 void HsW01::shot() 104 112 { 113 assert( this->getWeapon() && this->getWeapon()->getWeaponPack() && this->getWeapon()->getWeaponPack()->getWeaponSystem() && this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn() ); 105 114 Projectile* projectile = new Projectile(this); 106 115 Model* model = new Model(projectile); … … 110 119 model->setScale(5); 111 120 121 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); 112 122 projectile->setOrientation(this->getMuzzleOrientation()); 113 123 projectile->setPosition(this->getMuzzlePosition()); -
code/trunk/src/modules/weapons/weaponmodes/HsW01.h
r5929 r6417 41 41 public: 42 42 HsW01(BaseObject* creator); 43 virtual ~HsW01() {}43 virtual ~HsW01(); 44 44 45 45 virtual void fire(); -
code/trunk/src/modules/weapons/weaponmodes/LightningGun.cc
r5781 r6417 34 34 #include "weaponsystem/WeaponPack.h" 35 35 #include "weaponsystem/WeaponSystem.h" 36 #include "worldentities/pawns/Pawn.h" 36 37 37 38 namespace orxonox … … 48 49 49 50 this->setMunitionName("LaserMunition"); 51 this->setDefaultSound("sounds/Weapon_LightningGun.ogg"); 50 52 } 51 53 … … 59 61 projectile->setMaterial("Flares/LightningBall_"); 60 62 63 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); 61 64 projectile->setOrientation(this->getMuzzleOrientation()); 62 65 projectile->setPosition(this->getMuzzlePosition()); -
code/trunk/src/modules/weapons/weaponmodes/LightningGun.h
r5781 r6417 42 42 43 43 virtual void fire(); 44 44 45 private: 45 46 float speed_;
Note: See TracChangeset
for help on using the changeset viewer.