Changeset 8855 for code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc
- Timestamp:
- Aug 22, 2011, 3:05:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc
r8706 r8855 27 27 */ 28 28 29 /** 30 @file LaserFire.h 31 @brief Implementation of the LaserFire class. 32 */ 33 29 34 #include "LaserFire.h" 30 35 31 36 #include "core/CoreIncludes.h" 32 #include "weapons/projectiles/ParticleProjectile.h" 37 33 38 #include "weaponsystem/Weapon.h" 34 39 #include "weaponsystem/WeaponPack.h" 35 40 #include "weaponsystem/WeaponSystem.h" 36 41 #include "worldentities/pawns/Pawn.h" 42 43 #include "weapons/projectiles/ParticleProjectile.h" 37 44 38 45 namespace orxonox … … 44 51 RegisterObject(LaserFire); 45 52 46 this->reloadTime_ = 0.25 ;47 this->damage_ = 0 ; //default 1548 this->speed_ = 1250 ;53 this->reloadTime_ = 0.25f; 54 this->damage_ = 0.0f; 55 this->speed_ = 1250.0f; 49 56 50 57 this->setMunitionName("LaserMunition"); 51 58 } 52 59 53 /* Creates the projectile object, sets its properties to the LaserFire properties 54 */ 60 /** 61 @brief 62 Fires the weapon. Creates a projectile and fires it. 63 */ 55 64 void LaserFire::fire() 56 65 { … … 61 70 projectile->setVelocity(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getVelocity() + this->getMuzzleDirection() * this->speed_); 62 71 63 projectile->set Owner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());72 projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 64 73 projectile->setDamage(this->getDamage()); 65 74 projectile->setShieldDamage(this->getShieldDamage());
Note: See TracChangeset
for help on using the changeset viewer.