Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (9 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
55 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/weapons/IceGunFreezer.cc

    r11052 r11071  
    6363    /**
    6464    @brief
    65         The controlling happens here. This method defines what the controller has to do each tick.
    66     @param dt
    67         The duration of the tick.
    68     */
    69     void IceGunFreezer::tick(float dt)
    70     {
    71         SUPER(IceGunFreezer, tick, dt);
    72 
    73 
    74     }
    75 
    76     /**
    77     @brief
    7865        Sets the freeze time variable to the passed value.
    7966    */
     
    10188
    10289        // 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)))
    10491        {
    10592            freezedSpaceShip_ = orxonox_cast<SpaceShip*>(parent);
     
    118105    void IceGunFreezer::stopFreezing()
    119106    {
    120         if (freezedSpaceShip_ != NULL && freezeFactor_ != 0.0)
     107        if (freezedSpaceShip_ != nullptr && freezeFactor_ != 0.0)
    121108        {
    122109            freezedSpaceShip_->addSpeedFactor(1/freezeFactor_);
  • code/trunk/src/modules/weapons/IceGunFreezer.h

    r11052 r11071  
    3737#include "weapons/WeaponsPrereqs.h"
    3838
    39 #include "tools/interfaces/Tickable.h"
    4039#include "worldentities/StaticEntity.h"
    4140#include "graphics/Model.h"
     
    5049    @ingroup Weapons
    5150    */
    52     class _WeaponsExport IceGunFreezer : public StaticEntity, public Tickable
     51    class _WeaponsExport IceGunFreezer : public StaticEntity
    5352    {
    5453        public:
    5554            IceGunFreezer(Context* context);
    5655            virtual ~IceGunFreezer();
    57             virtual void tick(float dt);
    5856            virtual void startFreezing();
    5957            virtual void stopFreezing();
  • code/trunk/src/modules/weapons/RocketController.cc

    r10258 r11071  
    3838#include "projectiles/SimpleRocket.h"
    3939#include "weaponmodes/SimpleRocketFire.h"
     40#include "core/CoreIncludes.h"
    4041
    4142namespace orxonox
  • code/trunk/src/modules/weapons/RocketController.h

    r9667 r11071  
    5555            virtual ~RocketController();
    5656
    57             virtual void tick(float dt);
     57            virtual void tick(float dt) override;
    5858            /**
    5959            @brief Get the rocket that is controlled by this controller.
  • code/trunk/src/modules/weapons/munitions/FusionMunition.cc

    r11052 r11071  
    3434#include "FusionMunition.h"
    3535#include "core/CoreIncludes.h"
    36 #include "core/XMLPort.h"
    3736
    3837namespace orxonox
     
    5756        this->reloadTime_ = 0.5f;
    5857    }
    59 
    60     void FusionMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    61     {
    62         SUPER(FusionMunition, XMLPort, xmlelement, mode);
    63     }
    6458}
  • code/trunk/src/modules/weapons/munitions/FusionMunition.h

    r11052 r11071  
    5252        public:
    5353            FusionMunition(Context* context);
    54             virtual ~FusionMunition() {}
    55             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     54            virtual ~FusionMunition() = default;
    5655    };
    5756}
  • code/trunk/src/modules/weapons/munitions/GravityBombMunition.cc

    r11052 r11071  
    77#include "GravityBombMunition.h"
    88#include "core/CoreIncludes.h"
    9 #include "core/XMLPort.h"
    109
    1110namespace orxonox
     
    2726        this->reloadTime_ = 0.0f;
    2827    }
    29 
    30     void GravityBombMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    31     {
    32         SUPER(GravityBombMunition, XMLPort, xmlelement, mode);
    33     }
    3428}
    3529
  • code/trunk/src/modules/weapons/munitions/GravityBombMunition.h

    r11052 r11071  
    2727        public:
    2828            GravityBombMunition(Context* context);
    29             virtual ~GravityBombMunition() {}
    30             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     29            virtual ~GravityBombMunition() = default;
    3130    };
    3231
  • code/trunk/src/modules/weapons/munitions/IceMunition.cc

    r11052 r11071  
    3434#include "IceMunition.h"
    3535#include "core/CoreIncludes.h"
    36 #include "core/XMLPort.h"
    3736
    3837namespace orxonox
     
    5554        this->reloadTime_ = 0.5f;
    5655    }
    57 
    58     void IceMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    59     {
    60         SUPER(IceMunition, XMLPort, xmlelement, mode);
    61     }
    6256}
  • code/trunk/src/modules/weapons/munitions/IceMunition.h

    r11052 r11071  
    5252        public:
    5353            IceMunition(Context* context);
    54             virtual ~IceMunition() {}
    55             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     54            virtual ~IceMunition() = default;
    5655    };
    5756}
  • code/trunk/src/modules/weapons/munitions/LaserMunition.cc

    r11052 r11071  
    3434#include "LaserMunition.h"
    3535#include "core/CoreIncludes.h"
    36 #include "core/XMLPort.h"
    3736
    3837namespace orxonox
     
    5857        this->reloadTime_ = 0.5f;
    5958    }
    60 
    61     void LaserMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    62     {
    63         SUPER(LaserMunition, XMLPort, xmlelement, mode);
    64     }
    6559}
  • code/trunk/src/modules/weapons/munitions/LaserMunition.h

    r11052 r11071  
    5252        public:
    5353            LaserMunition(Context* context);
    54             virtual ~LaserMunition() {}
    55             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     54            virtual ~LaserMunition() = default;
    5655    };
    5756}
  • code/trunk/src/modules/weapons/munitions/LightningMunition.cc

    r11052 r11071  
    3434#include "LightningMunition.h"
    3535#include "core/CoreIncludes.h"
    36 #include "core/XMLPort.h"
    3736
    3837namespace orxonox
     
    5554        this->reloadTime_ = 0.5f;   
    5655    }
    57 
    58     void LightningMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    59     {
    60         SUPER(LightningMunition, XMLPort, xmlelement, mode);
    61     }
    6256}
  • code/trunk/src/modules/weapons/munitions/LightningMunition.h

    r11052 r11071  
    5252        public:
    5353            LightningMunition(Context* context);
    54             virtual ~LightningMunition() {}
    55             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     54            virtual ~LightningMunition() = default;
    5655    };
    5756}
  • code/trunk/src/modules/weapons/munitions/MineMunition.cc

    r11052 r11071  
    5454        this->reloadTime_ = 0.5f;
    5555    }
    56 
    57     void MineMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    58     {
    59         SUPER(MineMunition, XMLPort, xmlelement, mode);
    60     }
    6156}
  • code/trunk/src/modules/weapons/munitions/MineMunition.h

    r11052 r11071  
    5252        public:
    5353            MineMunition(Context* context);
    54             virtual ~MineMunition() {}
    55             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     54            virtual ~MineMunition() = default;
    5655    };
    5756}
  • code/trunk/src/modules/weapons/munitions/RocketMunition.cc

    r11052 r11071  
    3434#include "RocketMunition.h"
    3535#include "core/CoreIncludes.h"
    36 #include "core/XMLPort.h"
    3736
    3837namespace orxonox
     
    5554        this->reloadTime_ = 0.5f;
    5655    }
    57 
    58     void RocketMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    59     {
    60         SUPER(RocketMunition, XMLPort, xmlelement, mode);
    61     }
    6256}
  • code/trunk/src/modules/weapons/munitions/RocketMunition.h

    r11052 r11071  
    5252        public:
    5353            RocketMunition(Context* context);
    54             virtual ~RocketMunition() {}
    55             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     54            virtual ~RocketMunition() = default;
    5655    };
    5756}
  • code/trunk/src/modules/weapons/munitions/SplitMunition.cc

    r11052 r11071  
    3434#include "SplitMunition.h"
    3535#include "core/CoreIncludes.h"
    36 #include "core/XMLPort.h"
    3736
    3837namespace orxonox
     
    5554        this->reloadTime_ = 0.5f;
    5655    }
    57 
    58     void SplitMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    59     {
    60         SUPER(SplitMunition, XMLPort, xmlelement, mode);
    61     }
    6256}
  • code/trunk/src/modules/weapons/munitions/SplitMunition.h

    r11052 r11071  
    5252        public:
    5353            SplitMunition(Context* context);
    54             virtual ~SplitMunition() {}
    55             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     54            virtual ~SplitMunition() = default;
    5655    };
    5756}
  • code/trunk/src/modules/weapons/projectiles/BasicProjectile.cc

    r11052 r11071  
    8888                                    // The projectile is destroyed by its tick()-function (in the following tick).
    8989
    90             Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is NULL
     90            Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is nullptr
    9191
    9292            WorldEntity* entity = orxonox_cast<WorldEntity*>(this);
     
    146146    bool BasicProjectile::isObjectRelatedToShooter(WorldEntity* otherObject)
    147147    {
    148         for (WorldEntity* shooter = this->getShooter(); shooter != NULL; shooter = shooter->getParent())
     148        for (WorldEntity* shooter = this->getShooter(); shooter != nullptr; shooter = shooter->getParent())
    149149            if (otherObject == shooter)
    150150                return true;
    151         for (WorldEntity* object = otherObject; object != NULL; object = object->getParent())
     151        for (WorldEntity* object = otherObject; object != nullptr; object = object->getParent())
    152152            if (otherObject == this->getShooter())
    153153                return true;
  • code/trunk/src/modules/weapons/projectiles/BillboardProjectile.h

    r10629 r11071  
    6161            virtual void setMaterial(const std::string& material);
    6262            virtual const std::string& getMaterial();
    63             virtual void changedVisibility();
     63            virtual void changedVisibility() override;
    6464
    6565        private:
  • code/trunk/src/modules/weapons/projectiles/GravityBomb.cc

    r10622 r11071  
    2828                this->timeToLife_= LIFETIME;
    2929                this->setCollisionResponse(false);
    30                 this->setCollisionType(WorldEntity::Dynamic);
     30                this->setCollisionType(WorldEntity::CollisionType::Dynamic);
    3131                this->enableCollisionCallback();
    3232
  • code/trunk/src/modules/weapons/projectiles/GravityBomb.h

    r10622 r11071  
    4141            GravityBomb(Context* context);
    4242            virtual ~GravityBomb();
    43             virtual void tick(float dt);
     43            virtual void tick(float dt) override;
    4444
    45             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
     45            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
    4646            void detonate();
    4747        private:
  • code/trunk/src/modules/weapons/projectiles/GravityBombField.cc

    r11052 r11071  
    4141        //Make the Field visible on Radar and minimap.
    4242        this->setRadarObjectColour(ColourValue(1.0, 0.0, 0.2,1)); // Red
    43         this->setRadarObjectShape(RadarViewable::Dot);
     43        this->setRadarObjectShape(RadarViewable::Shape::Dot);
    4444        this->setRadarObjectScale(1.0f);
    4545       
     
    125125
    126126            //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>())
    128128            {
    129                 Vector3 distanceVector = it->getWorldPosition()-this->getWorldPosition();
     129                Vector3 distanceVector = pawn->getWorldPosition()-this->getWorldPosition();
    130130                 //orxout(debug_output) << "Found Pawn:" << it->getWorldPosition() << endl;
    131131                if(distanceVector.length()< forceSphereRadius_)
    132132                {
    133133                    //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())
    135135                    {
    136136                        //orxout(debug_output) << "Found Pawn to damage: " << it->getWorldPosition() << endl;
    137137                        float damage = FORCE_FIELD_EXPLOSION_DAMMAGE*(1-distanceVector.length()/EXPLOSION_RADIUS);
    138138                        //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);
    141141                    }
    142142                }
  • code/trunk/src/modules/weapons/projectiles/GravityBombField.h

    r10622 r11071  
    3939    GravityBombField(Context* context);
    4040    virtual ~GravityBombField();
    41     virtual void tick(float dt);
     41    virtual void tick(float dt) override;
    4242    virtual void destroy();
    4343
  • code/trunk/src/modules/weapons/projectiles/IceGunProjectile.cc

    r11052 r11071  
    120120            Vector3 offset = this->getWorldPosition() - otherObject->getWorldPosition();
    121121            freezer->setPosition(Vector3(0,0,0));
    122             freezer->translate(offset, WorldEntity::World);
     122            freezer->translate(offset, WorldEntity::TransformSpace::World);
    123123            // Start the freezing effect.
    124124            freezer->startFreezing();
  • code/trunk/src/modules/weapons/projectiles/IceGunProjectile.h

    r11052 r11071  
    6262
    6363        protected:
    64             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
     64            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
    6565            static const float particleDestructionDelay_;
    6666        private:
  • code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.cc

    r10622 r11071  
    4848        this->textureIndex_ = 1;
    4949        this->setMass(2);
    50         this->setCollisionType(Dynamic);
     50        this->setCollisionType(CollisionType::Dynamic);
    5151        this->maxTextureIndex_ = 8;
    5252        this->textureTimer_.setTimer(0.01f, true, createExecutor(createFunctor(&LightningGunProjectile::changeTexture, this)));
  • code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.h

    r9667 r11071  
    5858            virtual ~LightningGunProjectile() {}
    5959
    60             virtual void setMaterial(const std::string& material);
     60            virtual void setMaterial(const std::string& material) override;
    6161
    6262        private:
  • code/trunk/src/modules/weapons/projectiles/MineProjectile.cc

    r11052 r11071  
    112112        modelRing4_->yaw(Degree(270));
    113113
    114         emitter_ = NULL;
     114        emitter_ = nullptr;
    115115
    116116        if (GameMode::isMaster())
     
    121121            this->enableCollisionCallback();
    122122            this->setCollisionResponse(true);
    123             this->setCollisionType(Dynamic);
     123            this->setCollisionType(CollisionType::Dynamic);
    124124
    125125            // Create a sphere collision shape and attach it to the projectile.
     
    217217            {
    218218                // 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>())
    220220                {
    221                     Vector3 distanceVector = it->getWorldPosition()-this->getWorldPosition();
     221                    Vector3 distanceVector = pawn->getWorldPosition()-this->getWorldPosition();
    222222                    if(distanceVector.length()< damageRadius_)
    223223                    {
    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());
    225225                    }
    226226                }
  • code/trunk/src/modules/weapons/projectiles/MineProjectile.h

    r11052 r11071  
    5757            virtual ~MineProjectile();
    5858
    59             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
     59            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
    6060
    61             virtual void setMaxTimeUntilExplosion(float maxTimeUntilExplosion);
    62             virtual void setTimeUntilActivation(float timeUntilActivation);
     61            void setMaxTimeUntilExplosion(float maxTimeUntilExplosion);
     62            void setTimeUntilActivation(float timeUntilActivation);
    6363        protected:
    6464            static const float triggerRadius_;
     
    8484            WeakPtr<DistanceTrigger> distanceTrigger_;
    8585
    86             virtual void destructionEffect();
    87             virtual void allowExplosion();
    88             virtual void explode();
     86            void destructionEffect();
     87            void allowExplosion();
     88            void explode();
    8989    };
    9090}
  • code/trunk/src/modules/weapons/projectiles/ParticleProjectile.cc

    r10624 r11071  
    5858        }
    5959        else
    60             this->particles_ = 0;
     60            this->particles_ = nullptr;
    6161    }
    6262
  • code/trunk/src/modules/weapons/projectiles/ParticleProjectile.h

    r9667 r11071  
    5353            ParticleProjectile(Context* context);
    5454            virtual ~ParticleProjectile();
    55             virtual void changedVisibility();
     55            virtual void changedVisibility() override;
    5656
    5757        private:
  • code/trunk/src/modules/weapons/projectiles/Projectile.cc

    r10629 r11071  
    5757            this->enableCollisionCallback();
    5858            this->setCollisionResponse(false);
    59             this->setCollisionType(Dynamic);
     59            this->setCollisionType(CollisionType::Dynamic);
    6060
    6161            // Create a sphere collision shape and attach it to the projectile.
     
    9494    void Projectile::setCollisionShapeRadius(float radius)
    9595    {
    96         if (collisionShape_ != NULL && radius > 0)
     96        if (collisionShape_ != nullptr && radius > 0)
    9797        {
    9898            collisionShape_->setRadius(radius);
  • code/trunk/src/modules/weapons/projectiles/Projectile.h

    r11052 r11071  
    6464            void setConfigValues();
    6565
    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;
    6868
    6969        protected:
  • code/trunk/src/modules/weapons/projectiles/Rocket.cc

    r11052 r11071  
    7070        if (GameMode::isMaster())
    7171        {
    72             this->setCollisionType(WorldEntity::Kinematic);
     72            this->setCollisionType(WorldEntity::CollisionType::Kinematic);
    7373            this->setVelocity(0,0,-100);
    7474
     
    9292            this->enableCollisionCallback();
    9393            this->setCollisionResponse(false);
    94             this->setCollisionType(Kinematic);
     94            this->setCollisionType(CollisionType::Kinematic);
    9595
    9696            // Add collision shape
     
    117117        else
    118118        {
    119             this->defSndWpnEngine_ = 0;
    120             this->defSndWpnLaunch_ = 0;
     119            this->defSndWpnEngine_ = nullptr;
     120            this->defSndWpnLaunch_ = nullptr;
    121121        }
    122122
     
    128128
    129129        this->setRadarObjectColour(ColourValue(1.0, 0.5, 0.0)); // orange
    130         this->setRadarObjectShape(RadarViewable::Triangle);
     130        this->setRadarObjectShape(RadarViewable::Shape::Triangle);
    131131        this->setRadarObjectScale(0.5f);
    132132    }
  • code/trunk/src/modules/weapons/projectiles/Rocket.h

    r11052 r11071  
    6262            virtual ~Rocket();
    6363
    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.
    6565
    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;
    6868            void destructionEffect();
    6969
    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 {}
    7373
    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;
    7777
    7878            /**
     
    114114                { this->rotateRoll(Vector2(value, 0)); }
    115115
    116             virtual void setShooter(Pawn* shooter);
     116            virtual void setShooter(Pawn* shooter) override;
    117117
    118             virtual void fired(unsigned int firemode);
     118            virtual void fired(unsigned int firemode) override;
    119119
    120120            /**
    121121            @brief Set the maximum lifetime of the rocket.
    122122            */
    123             virtual void setMaxFuel(float fuel);
     123            void setMaxFuel(float fuel);
    124124            /**
    125125            @brief Get the maximum lifetime of the rocket.
     
    127127            inline float getMaxFuel() const
    128128                { return lifetime_; }
    129             virtual float getFuel() const;
     129            float getFuel() const;
    130130
    131131        private:
  • code/trunk/src/modules/weapons/projectiles/RocketOld.cc

    r10622 r11071  
    7070        if (GameMode::isMaster())
    7171        {
    72             this->setCollisionType(WorldEntity::Kinematic);
     72            this->setCollisionType(WorldEntity::CollisionType::Kinematic);
    7373            this->setVelocity(0,0,-100);
    7474
     
    9292            this->enableCollisionCallback();
    9393            this->setCollisionResponse(false);
    94             this->setCollisionType(Kinematic);
     94            this->setCollisionType(CollisionType::Kinematic);
    9595
    9696            // Add collision shape
     
    117117        else
    118118        {
    119             this->defSndWpnEngine_ = 0;
    120             this->defSndWpnLaunch_ = 0;
     119            this->defSndWpnEngine_ = nullptr;
     120            this->defSndWpnLaunch_ = nullptr;
    121121        }
    122122
     
    128128
    129129        this->setRadarObjectColour(ColourValue(1.0, 0.5, 0.0)); // orange
    130         this->setRadarObjectShape(RadarViewable::Triangle);
     130        this->setRadarObjectShape(RadarViewable::Shape::Triangle);
    131131        this->setRadarObjectScale(0.5f);
    132132    }
  • code/trunk/src/modules/weapons/projectiles/RocketOld.h

    r10622 r11071  
    6262            virtual ~RocketOld();
    6363
    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.
    6565
    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;
    6868            void destructionEffect();
    6969
    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 {}
    7373
    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;
    7777
    7878            /**
     
    114114                { this->rotateRoll(Vector2(value, 0)); }
    115115
    116             virtual void setShooter(Pawn* shooter);
     116            virtual void setShooter(Pawn* shooter) override;
    117117
    118             virtual void fired(unsigned int firemode);
     118            virtual void fired(unsigned int firemode) override;
    119119
    120120        private:
  • code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc

    r11052 r11071  
    7070        if (GameMode::isMaster())
    7171        {
    72             this->setCollisionType(WorldEntity::Kinematic);
     72            this->setCollisionType(WorldEntity::CollisionType::Kinematic);
    7373            this->fuel_ = true;
    7474
     
    8787            this->enableCollisionCallback();
    8888            this->setCollisionResponse(false);
    89             this->setCollisionType(Kinematic);
     89            this->setCollisionType(CollisionType::Kinematic);
    9090
    9191            // Add collision shape.
     
    101101
    102102        this->setRadarObjectColour(ColourValue(1.0, 1.0, 0.0)); // yellow
    103         this->setRadarObjectShape(RadarViewable::Triangle);
     103        this->setRadarObjectShape(RadarViewable::Shape::Triangle);
    104104        this->setRadarObjectScale(0.5f);
    105105    }
  • code/trunk/src/modules/weapons/projectiles/SimpleRocket.h

    r10216 r11071  
    6262            SimpleRocket(Context* context);
    6363            virtual ~SimpleRocket();
    64             virtual void tick(float dt);
     64            virtual void tick(float dt) override;
    6565
    66             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
     66            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
    6767
    6868            void disableFire(); //!< Method to disable the fire and stop all acceleration
    6969
    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{}
    7373
    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;
    7777            void setDestroy();
    7878
     
    115115                { this->rotateRoll(Vector2(value, 0)); }
    116116
    117             virtual void setShooter(Pawn* shooter);
     117            virtual void setShooter(Pawn* shooter) override;
    118118
    119119            inline bool hasFuel() const
  • code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.h

    r9667 r11071  
    5757            virtual ~EnergyDrink() {}
    5858
    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;
    6161
    6262        private:
  • code/trunk/src/modules/weapons/weaponmodes/FusionFire.h

    r9667 r11071  
    5454            virtual ~FusionFire() {}
    5555
    56             virtual void fire();
     56            virtual void fire() override;
    5757
    5858        private:
  • code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.h

    r10622 r11071  
    3434            virtual ~GravityBombFire();
    3535
    36             virtual void fire();
     36            virtual void fire() override;
    3737
    3838        private:
  • code/trunk/src/modules/weapons/weaponmodes/HsW01.h

    r9945 r11071  
    5656            virtual ~HsW01();
    5757
    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;
    6060
    6161        protected:
  • code/trunk/src/modules/weapons/weaponmodes/IceGun.h

    r11052 r11071  
    5454            virtual ~IceGun();
    5555
    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;
    5858           
    5959            inline void setFreezeTime(float freezeTime)
  • code/trunk/src/modules/weapons/weaponmodes/LaserFire.h

    r9667 r11071  
    5454            virtual ~LaserFire() {}
    5555
    56             virtual void fire();
     56            virtual void fire() override;
    5757
    5858        private:
  • code/trunk/src/modules/weapons/weaponmodes/LightningGun.h

    r9667 r11071  
    5454            virtual ~LightningGun();
    5555
    56             virtual void fire();
     56            virtual void fire() override;
    5757
    5858       private:
  • code/trunk/src/modules/weapons/weaponmodes/MineGun.h

    r11052 r11071  
    5959            virtual ~MineGun();
    6060
    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;
    6363
    6464            inline float getMaxTimeUntilExplosion() const
  • code/trunk/src/modules/weapons/weaponmodes/RocketFire.h

    r11052 r11071  
    5454            virtual ~RocketFire();
    5555
    56             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     56            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5757
    58             virtual void fire();
     58            virtual void fire() override;
    5959            inline void setFuel(float fuel)
    6060                { this->fuel_ = fuel; }
  • code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.h

    r10622 r11071  
    5454            virtual ~RocketFireOld();
    5555
    56             virtual void fire();
     56            virtual void fire() override;
    5757
    5858        private:
  • code/trunk/src/modules/weapons/weaponmodes/SimpleRocketFire.h

    r9667 r11071  
    5353            virtual ~SimpleRocketFire();
    5454            void deactivateFire();
    55             virtual void fire();
     55            virtual void fire() override;
    5656
    5757        private:
  • code/trunk/src/modules/weapons/weaponmodes/SplitGun.h

    r11052 r11071  
    5454            virtual ~SplitGun();
    5555
    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;
    5858
    5959            inline void setNumberOfSplits(int numberOfSplits)
Note: See TracChangeset for help on using the changeset viewer.