Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6671 in orxonox.OLD for trunk/src/world_entities/weapons/weapon.h


Ignore:
Timestamp:
Jan 24, 2006, 2:52:25 PM (18 years ago)
Author:
bensch
Message:

WeaponManger now handles Ammo.
If a Weapon has NO ammo then the Ammo will be infinite

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/weapon.h

    r6669 r6671  
    137137    inline WeaponState getCurrentState() const { return this->currentState; };
    138138
    139     /** @param energyMax the maximum energy the Weapon can have @param energyLoadedMax the maximum energy in the weapon buffers */
    140     inline void setMaximumEnergy(float energyMax, float energyLoadedMax) { this->energyMax = energyMax; this->energyLoadedMax = energyLoadedMax; };
    141     inline float getLoadedEnergyMax() const { return this->energyLoadedMax; };
     139    /** @param energyMax the maximum energy the Weapon can have */
     140    inline void setEnergyMax(float energyMax) { this->energyMax = energyMax; };
     141    inline float getEnergy() const { return this->energy; };
    142142    inline float getEnergyMax() const { return this->energyMax; };
    143143    inline void setAmmoContainer(const CountPointer<AmmoContainer>& ammoContainer) { this->ammoContainer = ammoContainer;}
    144     inline float getEnergy() const { return this->energy; };
    145     inline float getLoadedEnergy() const { return this->energyLoaded; };
    146144
    147145    void setActionSound(WeaponAction action, const char* soundFile);
     
    153151
    154152    GLGuiWidget* getEnergyWidget();
    155     GLGuiWidget* getLoadedEnergyWidget();
    156153
    157154    // FLOW
     
    201198
    202199    // it is all about energy
    203     float                energy;                           //!< The energy stored in the weapons secondary buffers (reserve)
    204     float                energyLoaded;                     //!< The energy stored in the weapons primary buffers (fire without reload)
     200    float                energy;                           //!< The energy stored in the weapons buffers
     201    float                energyMax;                        //!< The maximal energy that can be stored in the secondary buffers (reserveMax)
    205202    CountPointer<AmmoContainer> ammoContainer;             //!< Pointer to the AmmoContainer this weapon grabs Energy from.
    206     float                energyMax;                        //!< The maximal energy that can be stored in the secondary buffers (reserveMax)
    207     float                energyLoadedMax;                  //!< The maximal energy that can be stored in the primary buffers
    208203    //! @todo move this to projectile
    209204    float                minCharge;                        //!< The minimal energy to be loaded onto one projectile if chargeable otherwise the power consumed by one projectile
     
    211206
    212207    GLGuiBar*            energyWidget;
    213     GLGuiBar*            energyLoadedWidget;
    214208
    215209    ////////////
Note: See TracChangeset for help on using the changeset viewer.