Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 13, 2016, 10:40:06 PM (9 years ago)
Author:
landauf
Message:

made some functions non-virtual

Location:
code/branches/cpp11_v3/src/orxonox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v3/src/orxonox/items/ShipPart.cc

    r11054 r11060  
    182182    }
    183183
    184     void ShipPart::setDamageAbsorption(float value)
    185     {
    186         this->damageAbsorption_ = value;
    187     }
    188 
    189184    void ShipPart::setParent(ModularSpaceShip* ship)
    190185    {
    191186        this->parent_ = ship;
    192     }
    193 
    194     /**
    195     @brief
    196         Sets the health of the ShipPart.
    197     */
    198     void ShipPart::setHealth(float health)
    199     {
    200         this->health_ = health;
    201187    }
    202188
  • code/branches/cpp11_v3/src/orxonox/items/ShipPart.h

    r11054 r11060  
    6464            PartDestructionEvent* getDestructionEvent(unsigned int index);
    6565
    66             virtual void setDamageAbsorption(float value);
    67             inline float getDamageAbsorption()
     66            inline void setDamageAbsorption(float value)
     67                { this->damageAbsorption_ = value; }
     68            inline float getDamageAbsorption() const
    6869                { return this->damageAbsorption_; }
    6970
    7071            void setParent(ModularSpaceShip* ship);
    71             inline ModularSpaceShip* getParent()
     72            inline ModularSpaceShip* getParent() const
    7273                { return this->parent_; }
    7374
    7475            inline void setEventExecution(bool var)
    7576                { this->eventExecution_ = var; }
    76             inline bool isEventExecution()
     77            inline bool isEventExecution() const
    7778                { return this->eventExecution_; }
    7879
    79             virtual void setHealth(float health);
     80            inline void setHealth(float health)
     81                { this->health_ = health; }
    8082            inline void addHealth(float health)
    8183                { this->setHealth(this->health_ + health); }
  • code/branches/cpp11_v3/src/orxonox/worldentities/pawns/Pawn.h

    r11059 r11060  
    7171
    7272
    73             virtual void setHealth(float health);
     73            void setHealth(float health);
    7474            inline void addHealth(float health)
    7575                { this->setHealth(this->health_ + health); }
     
    8989                { return this->initialHealth_; }
    9090
    91             virtual void setShieldHealth(float shieldHealth);
     91            void setShieldHealth(float shieldHealth);
    9292
    9393            inline float getShieldHealth()
     
    100100                { return (this->getShieldHealth() > 0); }
    101101
    102             virtual void setMaxShieldHealth(float maxshieldhealth);
     102            void setMaxShieldHealth(float maxshieldhealth);
    103103            inline float getMaxShieldHealth() const
    104104                { return this->maxShieldHealth_; }
     
    119119                { return this->shieldAbsorption_; }
    120120
    121             virtual void setShieldRechargeRate(float shieldRechargeRate);
     121            void setShieldRechargeRate(float shieldRechargeRate);
    122122            inline float getShieldRechargeRate() const
    123123                { return this->shieldRechargeRate_; }
    124124
    125             virtual void setShieldRechargeWaitTime(float shieldRechargeWaitTime);
     125            void setShieldRechargeWaitTime(float shieldRechargeWaitTime);
    126126            inline float getShieldRechargeWaitTime() const
    127127                { return this->shieldRechargeWaitTime_; }
     
    133133                { this->shieldRechargeWaitCountdown_ = this->getShieldRechargeWaitTime(); } // TODO: Implement in Projectile.cc
    134134
    135             virtual void decreaseShieldRechargeCountdownTime(float dt);
     135            void decreaseShieldRechargeCountdownTime(float dt);
    136136
    137137            /** @brief Sets the state of the pawns vulnerability. @param bVulnerable */
     
    215215            const std::string& getExplosionSound();
    216216
    217             virtual const WeaponSystem* getWeaponSystem() const
     217            inline const WeaponSystem* getWeaponSystem() const
    218218                { return this->weaponSystem_; }
    219219
Note: See TracChangeset for help on using the changeset viewer.