- Timestamp:
- Nov 29, 2015, 9:05:26 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/particleEffectsHS15/src/modules/weapons/weaponmodes/MineGun.cc
r10836 r10889 51 51 RegisterObject(MineGun); 52 52 53 this->speed_ = 0.0f; 53 54 this->reloadTime_ = 1.0f; 54 55 this->damage_ = 0.0f; 55 this->speed_ = 0.0f; 56 this->lifeTime_ = 7500.0f; 56 this->maxTimeUntilExplosion_ = 0.0f; 57 57 58 58 this->setMunitionName("MineMunition"); … … 66 66 /** 67 67 @brief 68 XMLPort for the MineGun. You can define how often the projectiles Mine, how many childs should be created per Mine, the spread and the time between two Mines.68 XMLPort for the MineGun. 69 69 */ 70 70 void MineGun::XMLPort(Element& xmlelement, XMLPort::Mode mode) 71 71 { 72 72 SUPER(MineGun, XMLPort, xmlelement, mode); 73 XMLPortParam(MineGun, "Lifetime", setLifeTime, getLifeTime, xmlelement, mode); 73 74 XMLPortParam(MineGun, "maxtimeuntilexplosion", setMaxTimeUntilExplosion, getMaxTimeUntilExplosion, xmlelement, mode).defaultValues(10.0f); 75 XMLPortParam(MineGun, "timeuntilactivation", setTimeUntilActivation, getTimeUntilActivation, xmlelement, mode).defaultValues(3.0f); 74 76 } 75 77 … … 81 83 { 82 84 MineProjectile* projectile = new MineProjectile(this->getContext()); 83 //projectile->setMaterial("Flares/energyflare");84 85 85 86 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); … … 88 89 projectile->setVelocity(this->getMuzzleDirection() * this->speed_); 89 90 90 // Pass important information to the projectile: Number of Mines, Number of childs, Mine time, spread and the damage reduction 91 /*projectile->setNumberOfMines(getNumberOfMines()); 92 projectile->setNumberOfChilds(getNumberOfChilds());*/ 93 projectile->setLifeTime(getLifeTime()); 94 /*projectile->setSpread(getSpread()); 95 projectile->setDamageReduction(getDamageReduction());*/ 91 projectile->setMaxTimeUntilExplosion(getMaxTimeUntilExplosion()); 92 projectile->setTimeUntilActivation(getTimeUntilActivation()); 96 93 97 94 projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
Note: See TracChangeset
for help on using the changeset viewer.