Changeset 11071 for code/trunk/src/modules/weapons
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 55 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/weapons/IceGunFreezer.cc
r11052 r11071 63 63 /** 64 64 @brief 65 The controlling happens here. This method defines what the controller has to do each tick.66 @param dt67 The duration of the tick.68 */69 void IceGunFreezer::tick(float dt)70 {71 SUPER(IceGunFreezer, tick, dt);72 73 74 }75 76 /**77 @brief78 65 Sets the freeze time variable to the passed value. 79 66 */ … … 101 88 102 89 // Check if the freezer is attached to a parent and check if the parent is a SpaceShip 103 if (parent != NULL&& parent->isA(Class(SpaceShip)))90 if (parent != nullptr && parent->isA(Class(SpaceShip))) 104 91 { 105 92 freezedSpaceShip_ = orxonox_cast<SpaceShip*>(parent); … … 118 105 void IceGunFreezer::stopFreezing() 119 106 { 120 if (freezedSpaceShip_ != NULL&& freezeFactor_ != 0.0)107 if (freezedSpaceShip_ != nullptr && freezeFactor_ != 0.0) 121 108 { 122 109 freezedSpaceShip_->addSpeedFactor(1/freezeFactor_); -
code/trunk/src/modules/weapons/IceGunFreezer.h
r11052 r11071 37 37 #include "weapons/WeaponsPrereqs.h" 38 38 39 #include "tools/interfaces/Tickable.h"40 39 #include "worldentities/StaticEntity.h" 41 40 #include "graphics/Model.h" … … 50 49 @ingroup Weapons 51 50 */ 52 class _WeaponsExport IceGunFreezer : public StaticEntity , public Tickable51 class _WeaponsExport IceGunFreezer : public StaticEntity 53 52 { 54 53 public: 55 54 IceGunFreezer(Context* context); 56 55 virtual ~IceGunFreezer(); 57 virtual void tick(float dt);58 56 virtual void startFreezing(); 59 57 virtual void stopFreezing(); -
code/trunk/src/modules/weapons/RocketController.cc
r10258 r11071 38 38 #include "projectiles/SimpleRocket.h" 39 39 #include "weaponmodes/SimpleRocketFire.h" 40 #include "core/CoreIncludes.h" 40 41 41 42 namespace orxonox -
code/trunk/src/modules/weapons/RocketController.h
r9667 r11071 55 55 virtual ~RocketController(); 56 56 57 virtual void tick(float dt) ;57 virtual void tick(float dt) override; 58 58 /** 59 59 @brief Get the rocket that is controlled by this controller. -
code/trunk/src/modules/weapons/munitions/FusionMunition.cc
r11052 r11071 34 34 #include "FusionMunition.h" 35 35 #include "core/CoreIncludes.h" 36 #include "core/XMLPort.h"37 36 38 37 namespace orxonox … … 57 56 this->reloadTime_ = 0.5f; 58 57 } 59 60 void FusionMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)61 {62 SUPER(FusionMunition, XMLPort, xmlelement, mode);63 }64 58 } -
code/trunk/src/modules/weapons/munitions/FusionMunition.h
r11052 r11071 52 52 public: 53 53 FusionMunition(Context* context); 54 virtual ~FusionMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 54 virtual ~FusionMunition() = default; 56 55 }; 57 56 } -
code/trunk/src/modules/weapons/munitions/GravityBombMunition.cc
r11052 r11071 7 7 #include "GravityBombMunition.h" 8 8 #include "core/CoreIncludes.h" 9 #include "core/XMLPort.h"10 9 11 10 namespace orxonox … … 27 26 this->reloadTime_ = 0.0f; 28 27 } 29 30 void GravityBombMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)31 {32 SUPER(GravityBombMunition, XMLPort, xmlelement, mode);33 }34 28 } 35 29 -
code/trunk/src/modules/weapons/munitions/GravityBombMunition.h
r11052 r11071 27 27 public: 28 28 GravityBombMunition(Context* context); 29 virtual ~GravityBombMunition() {} 30 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 29 virtual ~GravityBombMunition() = default; 31 30 }; 32 31 -
code/trunk/src/modules/weapons/munitions/IceMunition.cc
r11052 r11071 34 34 #include "IceMunition.h" 35 35 #include "core/CoreIncludes.h" 36 #include "core/XMLPort.h"37 36 38 37 namespace orxonox … … 55 54 this->reloadTime_ = 0.5f; 56 55 } 57 58 void IceMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)59 {60 SUPER(IceMunition, XMLPort, xmlelement, mode);61 }62 56 } -
code/trunk/src/modules/weapons/munitions/IceMunition.h
r11052 r11071 52 52 public: 53 53 IceMunition(Context* context); 54 virtual ~IceMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 54 virtual ~IceMunition() = default; 56 55 }; 57 56 } -
code/trunk/src/modules/weapons/munitions/LaserMunition.cc
r11052 r11071 34 34 #include "LaserMunition.h" 35 35 #include "core/CoreIncludes.h" 36 #include "core/XMLPort.h"37 36 38 37 namespace orxonox … … 58 57 this->reloadTime_ = 0.5f; 59 58 } 60 61 void LaserMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)62 {63 SUPER(LaserMunition, XMLPort, xmlelement, mode);64 }65 59 } -
code/trunk/src/modules/weapons/munitions/LaserMunition.h
r11052 r11071 52 52 public: 53 53 LaserMunition(Context* context); 54 virtual ~LaserMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 54 virtual ~LaserMunition() = default; 56 55 }; 57 56 } -
code/trunk/src/modules/weapons/munitions/LightningMunition.cc
r11052 r11071 34 34 #include "LightningMunition.h" 35 35 #include "core/CoreIncludes.h" 36 #include "core/XMLPort.h"37 36 38 37 namespace orxonox … … 55 54 this->reloadTime_ = 0.5f; 56 55 } 57 58 void LightningMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)59 {60 SUPER(LightningMunition, XMLPort, xmlelement, mode);61 }62 56 } -
code/trunk/src/modules/weapons/munitions/LightningMunition.h
r11052 r11071 52 52 public: 53 53 LightningMunition(Context* context); 54 virtual ~LightningMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 54 virtual ~LightningMunition() = default; 56 55 }; 57 56 } -
code/trunk/src/modules/weapons/munitions/MineMunition.cc
r11052 r11071 54 54 this->reloadTime_ = 0.5f; 55 55 } 56 57 void MineMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)58 {59 SUPER(MineMunition, XMLPort, xmlelement, mode);60 }61 56 } -
code/trunk/src/modules/weapons/munitions/MineMunition.h
r11052 r11071 52 52 public: 53 53 MineMunition(Context* context); 54 virtual ~MineMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 54 virtual ~MineMunition() = default; 56 55 }; 57 56 } -
code/trunk/src/modules/weapons/munitions/RocketMunition.cc
r11052 r11071 34 34 #include "RocketMunition.h" 35 35 #include "core/CoreIncludes.h" 36 #include "core/XMLPort.h"37 36 38 37 namespace orxonox … … 55 54 this->reloadTime_ = 0.5f; 56 55 } 57 58 void RocketMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)59 {60 SUPER(RocketMunition, XMLPort, xmlelement, mode);61 }62 56 } -
code/trunk/src/modules/weapons/munitions/RocketMunition.h
r11052 r11071 52 52 public: 53 53 RocketMunition(Context* context); 54 virtual ~RocketMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 54 virtual ~RocketMunition() = default; 56 55 }; 57 56 } -
code/trunk/src/modules/weapons/munitions/SplitMunition.cc
r11052 r11071 34 34 #include "SplitMunition.h" 35 35 #include "core/CoreIncludes.h" 36 #include "core/XMLPort.h"37 36 38 37 namespace orxonox … … 55 54 this->reloadTime_ = 0.5f; 56 55 } 57 58 void SplitMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)59 {60 SUPER(SplitMunition, XMLPort, xmlelement, mode);61 }62 56 } -
code/trunk/src/modules/weapons/munitions/SplitMunition.h
r11052 r11071 52 52 public: 53 53 SplitMunition(Context* context); 54 virtual ~SplitMunition() {} 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 54 virtual ~SplitMunition() = default; 56 55 }; 57 56 } -
code/trunk/src/modules/weapons/projectiles/BasicProjectile.cc
r11052 r11071 88 88 // The projectile is destroyed by its tick()-function (in the following tick). 89 89 90 Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is NULL90 Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is nullptr 91 91 92 92 WorldEntity* entity = orxonox_cast<WorldEntity*>(this); … … 146 146 bool BasicProjectile::isObjectRelatedToShooter(WorldEntity* otherObject) 147 147 { 148 for (WorldEntity* shooter = this->getShooter(); shooter != NULL; shooter = shooter->getParent())148 for (WorldEntity* shooter = this->getShooter(); shooter != nullptr; shooter = shooter->getParent()) 149 149 if (otherObject == shooter) 150 150 return true; 151 for (WorldEntity* object = otherObject; object != NULL; object = object->getParent())151 for (WorldEntity* object = otherObject; object != nullptr; object = object->getParent()) 152 152 if (otherObject == this->getShooter()) 153 153 return true; -
code/trunk/src/modules/weapons/projectiles/BillboardProjectile.h
r10629 r11071 61 61 virtual void setMaterial(const std::string& material); 62 62 virtual const std::string& getMaterial(); 63 virtual void changedVisibility() ;63 virtual void changedVisibility() override; 64 64 65 65 private: -
code/trunk/src/modules/weapons/projectiles/GravityBomb.cc
r10622 r11071 28 28 this->timeToLife_= LIFETIME; 29 29 this->setCollisionResponse(false); 30 this->setCollisionType(WorldEntity:: Dynamic);30 this->setCollisionType(WorldEntity::CollisionType::Dynamic); 31 31 this->enableCollisionCallback(); 32 32 -
code/trunk/src/modules/weapons/projectiles/GravityBomb.h
r10622 r11071 41 41 GravityBomb(Context* context); 42 42 virtual ~GravityBomb(); 43 virtual void tick(float dt) ;43 virtual void tick(float dt) override; 44 44 45 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) ;45 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override; 46 46 void detonate(); 47 47 private: -
code/trunk/src/modules/weapons/projectiles/GravityBombField.cc
r11052 r11071 41 41 //Make the Field visible on Radar and minimap. 42 42 this->setRadarObjectColour(ColourValue(1.0, 0.0, 0.2,1)); // Red 43 this->setRadarObjectShape(RadarViewable:: Dot);43 this->setRadarObjectShape(RadarViewable::Shape::Dot); 44 44 this->setRadarObjectScale(1.0f); 45 45 … … 125 125 126 126 //Check if any pawn is inside the shockwave and hit it with dammage proportional to the distance between explosion centre and pawn. Make sure, the same pawn is damaged only once. 127 for ( ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)127 for (Pawn* pawn : ObjectList<Pawn>()) 128 128 { 129 Vector3 distanceVector = it->getWorldPosition()-this->getWorldPosition();129 Vector3 distanceVector = pawn->getWorldPosition()-this->getWorldPosition(); 130 130 //orxout(debug_output) << "Found Pawn:" << it->getWorldPosition() << endl; 131 131 if(distanceVector.length()< forceSphereRadius_) 132 132 { 133 133 //orxout(debug_output) << "Force sphere radius is: " << forceSphereRadius_ << " Distance to Pawn is: " << distanceVector.length(); 134 if (std::find(victimsAlreadyDamaged_.begin(),victimsAlreadyDamaged_.end(), *it) == victimsAlreadyDamaged_.end())134 if (std::find(victimsAlreadyDamaged_.begin(),victimsAlreadyDamaged_.end(),pawn) == victimsAlreadyDamaged_.end()) 135 135 { 136 136 //orxout(debug_output) << "Found Pawn to damage: " << it->getWorldPosition() << endl; 137 137 float damage = FORCE_FIELD_EXPLOSION_DAMMAGE*(1-distanceVector.length()/EXPLOSION_RADIUS); 138 138 //orxout(debug_output) << "Damage: " << damage << endl; 139 it->hit(shooter_, it->getWorldPosition(), NULL, damage, 0,0);140 victimsAlreadyDamaged_.push_back( *it);139 pawn->hit(shooter_, pawn->getWorldPosition(), nullptr, damage, 0,0); 140 victimsAlreadyDamaged_.push_back(pawn); 141 141 } 142 142 } -
code/trunk/src/modules/weapons/projectiles/GravityBombField.h
r10622 r11071 39 39 GravityBombField(Context* context); 40 40 virtual ~GravityBombField(); 41 virtual void tick(float dt) ;41 virtual void tick(float dt) override; 42 42 virtual void destroy(); 43 43 -
code/trunk/src/modules/weapons/projectiles/IceGunProjectile.cc
r11052 r11071 120 120 Vector3 offset = this->getWorldPosition() - otherObject->getWorldPosition(); 121 121 freezer->setPosition(Vector3(0,0,0)); 122 freezer->translate(offset, WorldEntity:: World);122 freezer->translate(offset, WorldEntity::TransformSpace::World); 123 123 // Start the freezing effect. 124 124 freezer->startFreezing(); -
code/trunk/src/modules/weapons/projectiles/IceGunProjectile.h
r11052 r11071 62 62 63 63 protected: 64 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) ;64 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override; 65 65 static const float particleDestructionDelay_; 66 66 private: -
code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.cc
r10622 r11071 48 48 this->textureIndex_ = 1; 49 49 this->setMass(2); 50 this->setCollisionType( Dynamic);50 this->setCollisionType(CollisionType::Dynamic); 51 51 this->maxTextureIndex_ = 8; 52 52 this->textureTimer_.setTimer(0.01f, true, createExecutor(createFunctor(&LightningGunProjectile::changeTexture, this))); -
code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.h
r9667 r11071 58 58 virtual ~LightningGunProjectile() {} 59 59 60 virtual void setMaterial(const std::string& material) ;60 virtual void setMaterial(const std::string& material) override; 61 61 62 62 private: -
code/trunk/src/modules/weapons/projectiles/MineProjectile.cc
r11052 r11071 112 112 modelRing4_->yaw(Degree(270)); 113 113 114 emitter_ = NULL;114 emitter_ = nullptr; 115 115 116 116 if (GameMode::isMaster()) … … 121 121 this->enableCollisionCallback(); 122 122 this->setCollisionResponse(true); 123 this->setCollisionType( Dynamic);123 this->setCollisionType(CollisionType::Dynamic); 124 124 125 125 // Create a sphere collision shape and attach it to the projectile. … … 217 217 { 218 218 // Damage all pawns within the damage radius 219 for ( ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)219 for (Pawn* pawn : ObjectList<Pawn>()) 220 220 { 221 Vector3 distanceVector = it->getWorldPosition()-this->getWorldPosition();221 Vector3 distanceVector = pawn->getWorldPosition()-this->getWorldPosition(); 222 222 if(distanceVector.length()< damageRadius_) 223 223 { 224 it->hit(this->getShooter(), it->getWorldPosition(), NULL, this->getDamage(), this->getHealthDamage(), this->getShieldDamage());224 pawn->hit(this->getShooter(), pawn->getWorldPosition(), nullptr, this->getDamage(), this->getHealthDamage(), this->getShieldDamage()); 225 225 } 226 226 } -
code/trunk/src/modules/weapons/projectiles/MineProjectile.h
r11052 r11071 57 57 virtual ~MineProjectile(); 58 58 59 virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) ;59 virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override; 60 60 61 v irtual void setMaxTimeUntilExplosion(float maxTimeUntilExplosion);62 v irtual void setTimeUntilActivation(float timeUntilActivation);61 void setMaxTimeUntilExplosion(float maxTimeUntilExplosion); 62 void setTimeUntilActivation(float timeUntilActivation); 63 63 protected: 64 64 static const float triggerRadius_; … … 84 84 WeakPtr<DistanceTrigger> distanceTrigger_; 85 85 86 v irtual void destructionEffect();87 v irtual void allowExplosion();88 v irtual void explode();86 void destructionEffect(); 87 void allowExplosion(); 88 void explode(); 89 89 }; 90 90 } -
code/trunk/src/modules/weapons/projectiles/ParticleProjectile.cc
r10624 r11071 58 58 } 59 59 else 60 this->particles_ = 0;60 this->particles_ = nullptr; 61 61 } 62 62 -
code/trunk/src/modules/weapons/projectiles/ParticleProjectile.h
r9667 r11071 53 53 ParticleProjectile(Context* context); 54 54 virtual ~ParticleProjectile(); 55 virtual void changedVisibility() ;55 virtual void changedVisibility() override; 56 56 57 57 private: -
code/trunk/src/modules/weapons/projectiles/Projectile.cc
r10629 r11071 57 57 this->enableCollisionCallback(); 58 58 this->setCollisionResponse(false); 59 this->setCollisionType( Dynamic);59 this->setCollisionType(CollisionType::Dynamic); 60 60 61 61 // Create a sphere collision shape and attach it to the projectile. … … 94 94 void Projectile::setCollisionShapeRadius(float radius) 95 95 { 96 if (collisionShape_ != NULL&& radius > 0)96 if (collisionShape_ != nullptr && radius > 0) 97 97 { 98 98 collisionShape_->setRadius(radius); -
code/trunk/src/modules/weapons/projectiles/Projectile.h
r11052 r11071 64 64 void setConfigValues(); 65 65 66 virtual void tick(float dt) ;67 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) ;66 virtual void tick(float dt) override; 67 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override; 68 68 69 69 protected: -
code/trunk/src/modules/weapons/projectiles/Rocket.cc
r11052 r11071 70 70 if (GameMode::isMaster()) 71 71 { 72 this->setCollisionType(WorldEntity:: Kinematic);72 this->setCollisionType(WorldEntity::CollisionType::Kinematic); 73 73 this->setVelocity(0,0,-100); 74 74 … … 92 92 this->enableCollisionCallback(); 93 93 this->setCollisionResponse(false); 94 this->setCollisionType( Kinematic);94 this->setCollisionType(CollisionType::Kinematic); 95 95 96 96 // Add collision shape … … 117 117 else 118 118 { 119 this->defSndWpnEngine_ = 0;120 this->defSndWpnLaunch_ = 0;119 this->defSndWpnEngine_ = nullptr; 120 this->defSndWpnLaunch_ = nullptr; 121 121 } 122 122 … … 128 128 129 129 this->setRadarObjectColour(ColourValue(1.0, 0.5, 0.0)); // orange 130 this->setRadarObjectShape(RadarViewable:: Triangle);130 this->setRadarObjectShape(RadarViewable::Shape::Triangle); 131 131 this->setRadarObjectScale(0.5f); 132 132 } -
code/trunk/src/modules/weapons/projectiles/Rocket.h
r11052 r11071 62 62 virtual ~Rocket(); 63 63 64 virtual void tick(float dt) ; //!< Defines which actions the Rocket has to take in each tick.64 virtual void tick(float dt) override; //!< Defines which actions the Rocket has to take in each tick. 65 65 66 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) ;67 virtual void destroyObject(void) ;66 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override; 67 virtual void destroyObject(void) override; 68 68 void destructionEffect(); 69 69 70 virtual void moveFrontBack(const Vector2& value) {}71 virtual void moveRightLeft(const Vector2& value) {}72 virtual void moveUpDown(const Vector2& value) {}70 virtual void moveFrontBack(const Vector2& value) override {} 71 virtual void moveRightLeft(const Vector2& value) override {} 72 virtual void moveUpDown(const Vector2& value) override {} 73 73 74 virtual void rotateYaw(const Vector2& value) ;75 virtual void rotatePitch(const Vector2& value) ;76 virtual void rotateRoll(const Vector2& value) ;74 virtual void rotateYaw(const Vector2& value) override; 75 virtual void rotatePitch(const Vector2& value) override; 76 virtual void rotateRoll(const Vector2& value) override; 77 77 78 78 /** … … 114 114 { this->rotateRoll(Vector2(value, 0)); } 115 115 116 virtual void setShooter(Pawn* shooter) ;116 virtual void setShooter(Pawn* shooter) override; 117 117 118 virtual void fired(unsigned int firemode) ;118 virtual void fired(unsigned int firemode) override; 119 119 120 120 /** 121 121 @brief Set the maximum lifetime of the rocket. 122 122 */ 123 v irtual void setMaxFuel(float fuel);123 void setMaxFuel(float fuel); 124 124 /** 125 125 @brief Get the maximum lifetime of the rocket. … … 127 127 inline float getMaxFuel() const 128 128 { return lifetime_; } 129 virtualfloat getFuel() const;129 float getFuel() const; 130 130 131 131 private: -
code/trunk/src/modules/weapons/projectiles/RocketOld.cc
r10622 r11071 70 70 if (GameMode::isMaster()) 71 71 { 72 this->setCollisionType(WorldEntity:: Kinematic);72 this->setCollisionType(WorldEntity::CollisionType::Kinematic); 73 73 this->setVelocity(0,0,-100); 74 74 … … 92 92 this->enableCollisionCallback(); 93 93 this->setCollisionResponse(false); 94 this->setCollisionType( Kinematic);94 this->setCollisionType(CollisionType::Kinematic); 95 95 96 96 // Add collision shape … … 117 117 else 118 118 { 119 this->defSndWpnEngine_ = 0;120 this->defSndWpnLaunch_ = 0;119 this->defSndWpnEngine_ = nullptr; 120 this->defSndWpnLaunch_ = nullptr; 121 121 } 122 122 … … 128 128 129 129 this->setRadarObjectColour(ColourValue(1.0, 0.5, 0.0)); // orange 130 this->setRadarObjectShape(RadarViewable:: Triangle);130 this->setRadarObjectShape(RadarViewable::Shape::Triangle); 131 131 this->setRadarObjectScale(0.5f); 132 132 } -
code/trunk/src/modules/weapons/projectiles/RocketOld.h
r10622 r11071 62 62 virtual ~RocketOld(); 63 63 64 virtual void tick(float dt) ; //!< Defines which actions the RocketOld has to take in each tick.64 virtual void tick(float dt) override; //!< Defines which actions the RocketOld has to take in each tick. 65 65 66 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) ;67 virtual void destroyObject(void) ;66 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override; 67 virtual void destroyObject(void) override; 68 68 void destructionEffect(); 69 69 70 virtual void moveFrontBack(const Vector2& value) {}71 virtual void moveRightLeft(const Vector2& value) {}72 virtual void moveUpDown(const Vector2& value) {}70 virtual void moveFrontBack(const Vector2& value) override {} 71 virtual void moveRightLeft(const Vector2& value) override {} 72 virtual void moveUpDown(const Vector2& value) override {} 73 73 74 virtual void rotateYaw(const Vector2& value) ;75 virtual void rotatePitch(const Vector2& value) ;76 virtual void rotateRoll(const Vector2& value) ;74 virtual void rotateYaw(const Vector2& value) override; 75 virtual void rotatePitch(const Vector2& value) override; 76 virtual void rotateRoll(const Vector2& value) override; 77 77 78 78 /** … … 114 114 { this->rotateRoll(Vector2(value, 0)); } 115 115 116 virtual void setShooter(Pawn* shooter) ;116 virtual void setShooter(Pawn* shooter) override; 117 117 118 virtual void fired(unsigned int firemode) ;118 virtual void fired(unsigned int firemode) override; 119 119 120 120 private: -
code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc
r11052 r11071 70 70 if (GameMode::isMaster()) 71 71 { 72 this->setCollisionType(WorldEntity:: Kinematic);72 this->setCollisionType(WorldEntity::CollisionType::Kinematic); 73 73 this->fuel_ = true; 74 74 … … 87 87 this->enableCollisionCallback(); 88 88 this->setCollisionResponse(false); 89 this->setCollisionType( Kinematic);89 this->setCollisionType(CollisionType::Kinematic); 90 90 91 91 // Add collision shape. … … 101 101 102 102 this->setRadarObjectColour(ColourValue(1.0, 1.0, 0.0)); // yellow 103 this->setRadarObjectShape(RadarViewable:: Triangle);103 this->setRadarObjectShape(RadarViewable::Shape::Triangle); 104 104 this->setRadarObjectScale(0.5f); 105 105 } -
code/trunk/src/modules/weapons/projectiles/SimpleRocket.h
r10216 r11071 62 62 SimpleRocket(Context* context); 63 63 virtual ~SimpleRocket(); 64 virtual void tick(float dt) ;64 virtual void tick(float dt) override; 65 65 66 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) ;66 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override; 67 67 68 68 void disableFire(); //!< Method to disable the fire and stop all acceleration 69 69 70 virtual void moveFrontBack(const Vector2& value) {}71 virtual void moveRightLeft(const Vector2& value) {}72 virtual void moveUpDown(const Vector2& value) {}70 virtual void moveFrontBack(const Vector2& value) override{} 71 virtual void moveRightLeft(const Vector2& value) override{} 72 virtual void moveUpDown(const Vector2& value) override{} 73 73 74 virtual void rotateYaw(const Vector2& value) ;75 virtual void rotatePitch(const Vector2& value) ;76 virtual void rotateRoll(const Vector2& value) ;74 virtual void rotateYaw(const Vector2& value) override; 75 virtual void rotatePitch(const Vector2& value) override; 76 virtual void rotateRoll(const Vector2& value) override; 77 77 void setDestroy(); 78 78 … … 115 115 { this->rotateRoll(Vector2(value, 0)); } 116 116 117 virtual void setShooter(Pawn* shooter) ;117 virtual void setShooter(Pawn* shooter) override; 118 118 119 119 inline bool hasFuel() const -
code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.h
r9667 r11071 57 57 virtual ~EnergyDrink() {} 58 58 59 virtual void fire() ;60 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;59 virtual void fire() override; 60 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 61 61 62 62 private: -
code/trunk/src/modules/weapons/weaponmodes/FusionFire.h
r9667 r11071 54 54 virtual ~FusionFire() {} 55 55 56 virtual void fire() ;56 virtual void fire() override; 57 57 58 58 private: -
code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.h
r10622 r11071 34 34 virtual ~GravityBombFire(); 35 35 36 virtual void fire() ;36 virtual void fire() override; 37 37 38 38 private: -
code/trunk/src/modules/weapons/weaponmodes/HsW01.h
r9945 r11071 56 56 virtual ~HsW01(); 57 57 58 virtual void fire() ;59 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;58 virtual void fire() override; 59 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 60 60 61 61 protected: -
code/trunk/src/modules/weapons/weaponmodes/IceGun.h
r11052 r11071 54 54 virtual ~IceGun(); 55 55 56 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;57 virtual void fire() ;56 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 57 virtual void fire() override; 58 58 59 59 inline void setFreezeTime(float freezeTime) -
code/trunk/src/modules/weapons/weaponmodes/LaserFire.h
r9667 r11071 54 54 virtual ~LaserFire() {} 55 55 56 virtual void fire() ;56 virtual void fire() override; 57 57 58 58 private: -
code/trunk/src/modules/weapons/weaponmodes/LightningGun.h
r9667 r11071 54 54 virtual ~LightningGun(); 55 55 56 virtual void fire() ;56 virtual void fire() override; 57 57 58 58 private: -
code/trunk/src/modules/weapons/weaponmodes/MineGun.h
r11052 r11071 59 59 virtual ~MineGun(); 60 60 61 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;62 virtual void fire() ;61 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 62 virtual void fire() override; 63 63 64 64 inline float getMaxTimeUntilExplosion() const -
code/trunk/src/modules/weapons/weaponmodes/RocketFire.h
r11052 r11071 54 54 virtual ~RocketFire(); 55 55 56 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;56 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 57 57 58 virtual void fire() ;58 virtual void fire() override; 59 59 inline void setFuel(float fuel) 60 60 { this->fuel_ = fuel; } -
code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.h
r10622 r11071 54 54 virtual ~RocketFireOld(); 55 55 56 virtual void fire() ;56 virtual void fire() override; 57 57 58 58 private: -
code/trunk/src/modules/weapons/weaponmodes/SimpleRocketFire.h
r9667 r11071 53 53 virtual ~SimpleRocketFire(); 54 54 void deactivateFire(); 55 virtual void fire() ;55 virtual void fire() override; 56 56 57 57 private: -
code/trunk/src/modules/weapons/weaponmodes/SplitGun.h
r11052 r11071 54 54 virtual ~SplitGun(); 55 55 56 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;57 virtual void fire() ;56 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 57 virtual void fire() override; 58 58 59 59 inline void setNumberOfSplits(int numberOfSplits)
Note: See TracChangeset
for help on using the changeset viewer.