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