Changeset 11052 for code/trunk/src/modules/weapons
- Timestamp:
- Jan 9, 2016, 6:26:20 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 2 deleted
- 43 edited
- 8 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/weapons/IceGunFreezer.cc
- Property svn:eol-style set to native
-
code/trunk/src/modules/weapons/IceGunFreezer.h
- Property svn:eol-style set to native
-
code/trunk/src/modules/weapons/WeaponsPrereqs.h
r10622 r11052 69 69 { 70 70 class MuzzleFlash; 71 class IceGunFreezer; 72 class RocketController; 71 73 72 74 // munitions 73 75 class FusionMunition; 74 76 class LaserMunition; 75 class ReplenishingMunition;76 77 class RocketMunition; 77 78 class GravityBombMuntion; 79 class IceMunition; 80 class LightningMunition; 81 class SplitMunition; 78 82 79 83 // projectiles … … 81 85 class LightningGunProjectile; 82 86 class ParticleProjectile; 87 class IceProjectile; 88 class SplitProjectile; 83 89 class Projectile; 90 class BasicProjectile; 84 91 class Rocket; 85 92 class RocketOld; … … 91 98 class FusionFire; 92 99 class HsW01; 100 class IceGun; 101 class SplitGun; 93 102 class LaserFire; 94 103 class LightningGun; 104 class MineGun; 95 105 class RocketFire; 96 106 class RocketFireOld; -
code/trunk/src/modules/weapons/munitions/CMakeLists.txt
r10629 r11052 1 1 ADD_SOURCE_FILES(WEAPONS_SRC_FILES 2 ReplenishingMunition.cc3 2 LaserMunition.cc 3 LightningMunition.cc 4 4 FusionMunition.cc 5 5 RocketMunition.cc … … 7 7 IceMunition.cc 8 8 SplitMunition.cc 9 MineMunition.cc 9 10 ) -
code/trunk/src/modules/weapons/munitions/FusionMunition.cc
r9667 r11052 28 28 29 29 /** 30 @file FusionMunition. h30 @file FusionMunition.cc 31 31 @brief Implementation of the FusionMunition class. 32 32 */ … … 34 34 #include "FusionMunition.h" 35 35 #include "core/CoreIncludes.h" 36 #include "core/XMLPort.h" 36 37 37 38 namespace orxonox … … 45 46 this->maxMunitionPerMagazine_ = 10; 46 47 this->maxMagazines_ = 10; 47 this-> magazines_ = 10;48 this->unassignedMagazines_ = 10; 48 49 49 this-> bUseSeparateMagazines_ = true;50 this->bStackMunition_ = false; 50 this->deployment_ = MunitionDeployment::Separate; 51 51 52 this->reloadTime_ = 1.0f; 52 53 53 54 this->bAllowMunitionRefilling_ = true; 54 55 this->bAllowMultiMunitionRemovementUnderflow_ = true; 56 57 this->reloadTime_ = 0.5f; 58 } 59 60 void FusionMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode) 61 { 62 SUPER(FusionMunition, XMLPort, xmlelement, mode); 55 63 } 56 64 } -
code/trunk/src/modules/weapons/munitions/FusionMunition.h
r9667 r11052 53 53 FusionMunition(Context* context); 54 54 virtual ~FusionMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 55 56 }; 56 57 } -
code/trunk/src/modules/weapons/munitions/GravityBombMunition.cc
r10622 r11052 7 7 #include "GravityBombMunition.h" 8 8 #include "core/CoreIncludes.h" 9 #include "core/XMLPort.h" 9 10 10 11 namespace orxonox … … 17 18 this->maxMunitionPerMagazine_ = 1; 18 19 this->maxMagazines_ = 30; 19 this-> magazines_ = 15;20 this->unassignedMagazines_ = 15; 20 21 21 this->bUseSeparateMagazines_ = false; 22 this->bStackMunition_ = true; 22 this->deployment_ = MunitionDeployment::Stack; 23 23 24 24 this->bAllowMunitionRefilling_ = true; 25 25 this->bAllowMultiMunitionRemovementUnderflow_ = false; 26 27 this->reloadTime_ = 0.0f; 26 28 } 27 29 30 void GravityBombMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode) 31 { 32 SUPER(GravityBombMunition, XMLPort, xmlelement, mode); 33 } 28 34 } 29 35 -
code/trunk/src/modules/weapons/munitions/GravityBombMunition.h
r10622 r11052 28 28 GravityBombMunition(Context* context); 29 29 virtual ~GravityBombMunition() {} 30 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 30 31 }; 31 32 -
code/trunk/src/modules/weapons/munitions/IceMunition.cc
- Property svn:eol-style set to native
r10629 r11052 28 28 29 29 /** 30 @file IceMunition. h30 @file IceMunition.cc 31 31 @brief Implementation of the IceMunition class. 32 32 */ … … 34 34 #include "IceMunition.h" 35 35 #include "core/CoreIncludes.h" 36 #include "core/XMLPort.h" 36 37 37 38 namespace orxonox … … 45 46 this->maxMunitionPerMagazine_ = 1; 46 47 this->maxMagazines_ = 50; 47 this-> magazines_ = 25;48 this->unassignedMagazines_ = 25; 48 49 49 this->bUseSeparateMagazines_ = false; 50 this->bStackMunition_ = true; 50 this->deployment_ = MunitionDeployment::Stack; 51 51 52 this->bAllowMunitionRefilling_ = false;52 this->bAllowMunitionRefilling_ = true; 53 53 this->bAllowMultiMunitionRemovementUnderflow_ = false; 54 55 this->reloadTime_ = 0.5f; 56 } 57 58 void IceMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode) 59 { 60 SUPER(IceMunition, XMLPort, xmlelement, mode); 54 61 } 55 62 } -
code/trunk/src/modules/weapons/munitions/IceMunition.h
- Property svn:eol-style set to native
r10629 r11052 53 53 IceMunition(Context* context); 54 54 virtual ~IceMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 55 56 }; 56 57 } -
code/trunk/src/modules/weapons/munitions/LaserMunition.cc
r9667 r11052 28 28 29 29 /** 30 @file LaserMunition. h30 @file LaserMunition.cc 31 31 @brief Implementation of the LaserMunition class. 32 32 */ … … 34 34 #include "LaserMunition.h" 35 35 #include "core/CoreIncludes.h" 36 #include "core/XMLPort.h" 36 37 37 38 namespace orxonox … … 44 45 45 46 this->maxMunitionPerMagazine_ = 20; 46 this->maxMagazines_ = 1 ;47 this-> magazines_ = 1;47 this->maxMagazines_ = 10; 48 this->unassignedMagazines_ = 10; 48 49 49 this->bUseSeparateMagazines_ = false; 50 this->bStackMunition_ = true; 50 this->deployment_ = MunitionDeployment::Separate; 51 51 52 52 this->bAllowMunitionRefilling_ = true; 53 53 this->bAllowMultiMunitionRemovementUnderflow_ = true; 54 54 55 this->replenishInterval_ = 0.5f; 56 this->replenishMunitionAmount_ = 1; 55 this->replenishInterval_ = 7.0f; 56 this->replenishAmount_ = 1; 57 58 this->reloadTime_ = 0.5f; 59 } 60 61 void LaserMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode) 62 { 63 SUPER(LaserMunition, XMLPort, xmlelement, mode); 57 64 } 58 65 } -
code/trunk/src/modules/weapons/munitions/LaserMunition.h
r9667 r11052 36 36 37 37 #include "weapons/WeaponsPrereqs.h" 38 #include " ReplenishingMunition.h"38 #include "weaponsystem/ReplenishingMunition.h" 39 39 40 40 namespace orxonox … … 53 53 LaserMunition(Context* context); 54 54 virtual ~LaserMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 55 56 }; 56 57 } -
code/trunk/src/modules/weapons/munitions/RocketMunition.cc
r9667 r11052 28 28 29 29 /** 30 @file RocketMunition. h30 @file RocketMunition.cc 31 31 @brief Implementation of the RocketMunition class. 32 32 */ … … 34 34 #include "RocketMunition.h" 35 35 #include "core/CoreIncludes.h" 36 #include "core/XMLPort.h" 36 37 37 38 namespace orxonox … … 45 46 this->maxMunitionPerMagazine_ = 1; 46 47 this->maxMagazines_ = 30; 47 this-> magazines_ = 10;48 this->unassignedMagazines_ = 10; 48 49 49 this->bUseSeparateMagazines_ = false; 50 this->bStackMunition_ = true; 50 this->deployment_ = MunitionDeployment::Stack; 51 51 52 this->bAllowMunitionRefilling_ = false;52 this->bAllowMunitionRefilling_ = true; 53 53 this->bAllowMultiMunitionRemovementUnderflow_ = false; 54 55 this->reloadTime_ = 0.5f; 56 } 57 58 void RocketMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode) 59 { 60 SUPER(RocketMunition, XMLPort, xmlelement, mode); 54 61 } 55 62 } -
code/trunk/src/modules/weapons/munitions/RocketMunition.h
r9667 r11052 53 53 RocketMunition(Context* context); 54 54 virtual ~RocketMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 55 56 }; 56 57 } -
code/trunk/src/modules/weapons/munitions/SplitMunition.cc
- Property svn:eol-style set to native
r10629 r11052 28 28 29 29 /** 30 @file SplitMunition. h30 @file SplitMunition.cc 31 31 @brief Implementation of the SplitMunition class. 32 32 */ … … 34 34 #include "SplitMunition.h" 35 35 #include "core/CoreIncludes.h" 36 #include "core/XMLPort.h" 36 37 37 38 namespace orxonox … … 43 44 RegisterObject(SplitMunition); 44 45 45 this->maxMunitionPerMagazine_ = 1;46 this->maxMagazines_ = 10 0;47 this-> magazines_ = 25;46 this->maxMunitionPerMagazine_ = 5; 47 this->maxMagazines_ = 10; 48 this->unassignedMagazines_ = 5; 48 49 49 this->bUseSeparateMagazines_ = false; 50 this->bStackMunition_ = true; 50 this->deployment_ = MunitionDeployment::Share; 51 51 52 52 this->bAllowMunitionRefilling_ = true; 53 53 this->bAllowMultiMunitionRemovementUnderflow_ = false; 54 55 this->reloadTime_ = 0.5f; 56 } 57 58 void SplitMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode) 59 { 60 SUPER(SplitMunition, XMLPort, xmlelement, mode); 54 61 } 55 62 } -
code/trunk/src/modules/weapons/munitions/SplitMunition.h
- Property svn:eol-style set to native
r10629 r11052 53 53 SplitMunition(Context* context); 54 54 virtual ~SplitMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 55 56 }; 56 57 } -
code/trunk/src/modules/weapons/projectiles/BasicProjectile.cc
r10293 r11052 68 68 @brief 69 69 The function called when a projectile hits another thing. 70 Calls the hit-function, starts the reloadcountdown, displays visual hit effects defined in Pawn.70 Calls the hit-function, starts the shield recharge countdown, displays visual hit effects defined in Pawn. 71 71 Needs to be called in the collidesAgainst() function by every Class directly inheriting from BasicProjectile. 72 72 @param otherObject … … 97 97 { 98 98 victim->hit(this->getShooter(), contactPoint, cs, this->getDamage(), this->getHealthDamage(), this->getShieldDamage()); 99 victim->start ReloadCountdown();99 victim->startShieldRechargeCountdown(); 100 100 } 101 101 -
code/trunk/src/modules/weapons/projectiles/CMakeLists.txt
r10629 r11052 12 12 GravityBomb.cc 13 13 GravityBombField.cc 14 MineProjectile.cc 14 15 ) -
code/trunk/src/modules/weapons/projectiles/GravityBombField.cc
r10622 r11052 164 164 if (lifetime_ <= -4) 165 165 { 166 orxout(debug_output) << "Timeout. Destroying field." << endl;167 166 this->destroy(); 168 167 } -
code/trunk/src/modules/weapons/projectiles/IceGunProjectile.cc
- Property svn:eol-style set to native
r10629 r11052 34 34 #include "IceGunProjectile.h" 35 35 36 #include <OgreSceneManager.h> 37 #include <OgreSceneNode.h> 38 36 39 #include "core/CoreIncludes.h" 37 40 #include "graphics/Model.h" 41 #include "graphics/ParticleSpawner.h" 42 #include "Scene.h" 43 #include "core/command/Executor.h" 44 #include "tools/ParticleInterface.h" 38 45 39 46 namespace orxonox 40 47 { 41 48 RegisterClass(IceGunProjectile); 49 50 const float IceGunProjectile::particleDestructionDelay_ = 15.0f; 42 51 43 52 IceGunProjectile::IceGunProjectile(Context* context) : Projectile(context) … … 55 64 this->attach(model); 56 65 model->setPosition(Vector3(0,0,0)); 66 67 // Add effect. 68 spawner_ = new ParticleSpawner(this->getContext()); 69 this->attach(spawner_); 70 spawner_->setOrientation(this->getOrientation()); 71 spawner_->setSource("Orxonox/ice"); 72 spawner_->setDeleteWithParent(false); 73 spawner_->setDestroydelay(particleDestructionDelay_); 74 } 75 76 IceGunProjectile::~IceGunProjectile() 77 { 78 if (this->isInitialized()) 79 { 80 const Vector3& pos = spawner_->getWorldPosition(); 81 const Quaternion& rot = spawner_->getWorldOrientation(); 82 this->detach(spawner_); 83 spawner_->setPosition(pos); 84 spawner_->setOrientation(rot); 85 this->getScene()->getRootSceneNode()->addChild(const_cast<Ogre::SceneNode*>(spawner_->getNode())); 86 this->spawner_->stop(true); 87 } 57 88 } 58 89 -
code/trunk/src/modules/weapons/projectiles/IceGunProjectile.h
- Property svn:eol-style set to native
r10629 r11052 56 56 public: 57 57 IceGunProjectile(Context* context); 58 virtual ~IceGunProjectile() {}58 virtual ~IceGunProjectile(); 59 59 60 60 virtual void setFreezeTime(float freezeTime); … … 63 63 protected: 64 64 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint); 65 private: 65 static const float particleDestructionDelay_; 66 private: 67 ParticleSpawner* spawner_; 66 68 float freezeTime_; //The duration of the freezing effect on a target 67 69 float freezeFactor_; //The strength of the freezing effect -
code/trunk/src/modules/weapons/projectiles/Projectile.h
r10629 r11052 69 69 protected: 70 70 virtual void setCollisionShapeRadius(float radius); 71 float lifetime_; //!< The time the projectile exists. 71 72 72 73 private: 73 float lifetime_; //!< The time the projectile exists.74 74 Timer destroyTimer_; //!< Timer to destroy the projectile after its lifetime has run out. 75 WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile. 75 WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile. 76 76 }; 77 77 } -
code/trunk/src/modules/weapons/projectiles/Rocket.cc
r10622 r11052 66 66 67 67 this->localAngularVelocity_ = 0; 68 this->lifetime_ = 100.0f;68 this->lifetime_ = 20.0f; 69 69 70 70 if (GameMode::isMaster()) … … 76 76 Model* model = new Model(this->getContext()); 77 77 model->setMeshSource("rocket.mesh"); 78 model->scale( 0.7f);78 model->scale(1.0f); 79 79 this->attach(model); 80 80 … … 100 100 this->attachCollisionShape(collisionShape); 101 101 102 this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&BasicProjectile::destroyObject, this)));103 104 102 // Add sound 105 103 this->defSndWpnEngine_ = new WorldSound(this->getContext()); … … 114 112 this->defSndWpnLaunch_->setVolume(1.0f); 115 113 this->attach(defSndWpnLaunch_); 114 115 this->setHudTemplate("rockethud"); 116 116 } 117 117 else … … 320 320 } 321 321 322 float Rocket::getFuel() const 323 { 324 return this->destroyTimer_.getRemainingTime(); 325 } 326 327 void Rocket::setMaxFuel(float fuel) 328 { 329 this->lifetime_ = fuel; 330 this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&BasicProjectile::destroyObject, this))); 331 } 322 332 } -
code/trunk/src/modules/weapons/projectiles/Rocket.h
r10216 r11052 118 118 virtual void fired(unsigned int firemode); 119 119 120 /** 121 @brief Set the maximum lifetime of the rocket. 122 */ 123 virtual void setMaxFuel(float fuel); 124 /** 125 @brief Get the maximum lifetime of the rocket. 126 */ 127 inline float getMaxFuel() const 128 { return lifetime_; } 129 virtual float getFuel() const; 130 120 131 private: 121 132 Vector3 localAngularVelocity_; //!< Variable to temporarily store accumulated steering command input. -
code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc
r10299 r11052 76 76 Model* model = new Model(this->getContext()); 77 77 model->setMeshSource("rocket.mesh"); 78 model->scale( 0.7f);78 model->scale(1.0f); 79 79 this->attach(model); 80 80 -
code/trunk/src/modules/weapons/projectiles/SplitGunProjectile.cc
- Property svn:eol-style set to native
-
code/trunk/src/modules/weapons/projectiles/SplitGunProjectile.h
- Property svn:eol-style set to native
-
code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt
r10629 r11052 11 11 SimpleRocketFire.cc 12 12 GravityBombFire.cc 13 MineGun.cc 13 14 ) -
code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc
r10622 r11052 63 63 this->delayTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&EnergyDrink::shot, this))); 64 64 this->delayTimer_.stopTimer(); 65 66 hudImageString_ = "Orxonox/WSHUD_WM_EnergyDrink"; 65 67 } 66 68 -
code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc
r10622 r11052 58 58 59 59 this->setMunitionName("FusionMunition"); 60 61 hudImageString_ = "Orxonox/WSHUD_WM_FusionFire"; 60 62 } 61 63 -
code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.cc
r10622 r11052 31 31 this->setMunitionName("GravityBombMunition"); 32 32 this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.8); ///< sets sound of the bomb as it is fired. 33 34 hudImageString_ = "Orxonox/WSHUD_WM_GravityBombFire"; 33 35 } 34 36 -
code/trunk/src/modules/weapons/weaponmodes/HsW01.cc
r10296 r11052 69 69 70 70 this->setDefaultSound(this->sound_); 71 72 hudImageString_ = "Orxonox/WSHUD_WM_HsW01"; 71 73 } 72 74 -
code/trunk/src/modules/weapons/weaponmodes/IceGun.cc
- Property svn:eol-style set to native
r10629 r11052 59 59 this->setFreezeFactor(0.5); 60 60 61 this->setMunitionName(" LaserMunition");61 this->setMunitionName("IceMunition"); 62 62 this->setDefaultSound("sounds/Weapon_LightningGun.ogg"); 63 64 hudImageString_ = "Orxonox/WSHUD_WM_IceGun"; 63 65 } 64 66 -
code/trunk/src/modules/weapons/weaponmodes/IceGun.h
- Property svn:eol-style set to native
-
code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc
r10622 r11052 56 56 57 57 this->setMunitionName("LaserMunition"); 58 59 hudImageString_ = "Orxonox/WSHUD_WM_LaserFire"; 58 60 } 59 61 -
code/trunk/src/modules/weapons/weaponmodes/LightningGun.cc
r10296 r11052 54 54 this->speed_ = 750.0f; 55 55 56 this->setMunitionName("L aserMunition");56 this->setMunitionName("LightningMunition"); 57 57 this->setDefaultSound("sounds/Weapon_LightningGun.ogg"); 58 59 hudImageString_ = "Orxonox/WSHUD_WM_LightningGun"; 58 60 } 59 61 -
code/trunk/src/modules/weapons/weaponmodes/RocketFire.cc
r10296 r11052 41 41 #include "weaponsystem/WeaponSystem.h" 42 42 #include "worldentities/pawns/Pawn.h" 43 43 #include "core/XMLPort.h" 44 44 #include "weapons/projectiles/Rocket.h" 45 45 … … 56 56 this->damage_ = 0.0f; 57 57 this->speed_ = 500.0f; 58 this->fuel_ = 10.0f; 58 59 59 60 this->setMunitionName("RocketMunition"); 60 61 // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning) 62 63 hudImageString_ = "Orxonox/WSHUD_WM_RocketFire"; 61 64 } 62 65 63 66 RocketFire::~RocketFire() 64 67 { 68 } 69 70 /** 71 @brief 72 XMLPort for the RocketFire. You can define the maximum lifetime of the rockets 73 */ 74 void RocketFire::XMLPort(Element& xmlelement, XMLPort::Mode mode) 75 { 76 SUPER(RocketFire, XMLPort, xmlelement, mode); 77 78 XMLPortParam(RocketFire, "fuel", setFuel, getFuel, xmlelement, mode); 65 79 } 66 80 … … 77 91 rocket->setPosition(this->getMuzzlePosition()); 78 92 rocket->setVelocity(this->getMuzzleDirection() * this->speed_); 79 rocket->scale( 2);93 rocket->scale(1.0f); 80 94 81 95 rocket->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); … … 83 97 rocket->setShieldDamage(this->getShieldDamage()); 84 98 rocket->setHealthDamage(this->getHealthDamage()); 99 rocket->setMaxFuel(this->fuel_); 85 100 } 86 101 } -
code/trunk/src/modules/weapons/weaponmodes/RocketFire.h
r9667 r11052 54 54 virtual ~RocketFire(); 55 55 56 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 57 56 58 virtual void fire(); 59 inline void setFuel(float fuel) 60 { this->fuel_ = fuel; } 61 inline float getFuel() const 62 { return this->fuel_; } 57 63 58 64 private: 59 65 float speed_; //!< The speed of the Rocket. 66 float fuel_; //!< The maximum lifetime of the rocket 60 67 }; 61 68 } -
code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.cc
r10622 r11052 59 59 this->setMunitionName("RocketMunition"); 60 60 // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning) 61 62 hudImageString_ = "Orxonox/WSHUD_WM_SimpleRocketFire"; 61 63 } 62 64 -
code/trunk/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
r9667 r11052 64 64 this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.4f); 65 65 // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning) 66 67 hudImageString_ = "Orxonox/WSHUD_WM_SimpleRocketFire"; 66 68 } 67 69 … … 83 85 rocket->setVelocity(this->getMuzzleDirection()*this->speed_); 84 86 rocket->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 87 rocket->scale(1.0f); 85 88 86 89 rocket->setDamage(this->damage_); … … 89 92 90 93 WorldEntity* pawn = static_cast<ControllableEntity*>(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn())->getTarget(); 91 if (pawn) controller->setTarget(pawn); 94 if (pawn) 95 controller->setTarget(pawn); 92 96 } 93 97 } -
code/trunk/src/modules/weapons/weaponmodes/SplitGun.cc
- Property svn:eol-style set to native
r10629 r11052 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "core/XMLPort.h" 37 #include "core/XMLPort.h" 38 38 #include "weaponsystem/Weapon.h" 39 39 #include "weaponsystem/WeaponPack.h" … … 62 62 this->setMunitionName("SplitMunition"); 63 63 this->setDefaultSound("sounds/Weapon_LightningGun.ogg"); 64 65 hudImageString_ = "Orxonox/WSHUD_WM_SplitGun"; 64 66 } 65 67 -
code/trunk/src/modules/weapons/weaponmodes/SplitGun.h
- Property svn:eol-style set to native
Note: See TracChangeset
for help on using the changeset viewer.