Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 25, 2006, 2:19:46 PM (18 years ago)
Author:
patrick
Message:

branches: removed spaceshipcontrol branche

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/world_entities/weapons/weapon.h

    r6512 r6693  
    1616
    1717#include "world_entity.h"
     18#include "count_pointer.h"
     19#include "ammo_container.h"
    1820
    1921// FORWARD DECLARATION
     
    105107    inline void setCapability(long capabilities) { this->capability = capabilities; };
    106108    /** @returns the Capabilities of this Weapon */
    107     inline long getCapability() { return this->capability; };
     109    inline long getCapability() const { return this->capability; };
    108110    void setProjectileType(ClassID projectile);
    109111    void setProjectileType(const char* projectile);
     
    135137    inline WeaponState getCurrentState() const { return this->currentState; };
    136138
    137     /** @param energyMax the maximum energy the Weapon can have @param energyLoadedMax the maximum energy in the weapon buffers */
    138     inline void setMaximumEnergy(float energyMax, float energyLoadedMax) { this->energyMax = energyMax; this->energyLoadedMax = energyLoadedMax; };
    139     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; };
    140142    inline float getEnergyMax() const { return this->energyMax; };
    141     inline float getEnergy() const { return this->energy; };
    142     inline float getLoadedEnergy() const { return this->energyLoaded; };
     143    inline void setAmmoContainer(const CountPointer<AmmoContainer>& ammoContainer) { this->ammoContainer = ammoContainer;}
    143144
    144145    void setActionSound(WeaponAction action, const char* soundFile);
     
    150151
    151152    GLGuiWidget* getEnergyWidget();
    152     GLGuiWidget* getLoadedEnergyWidget();
    153153
    154154    // FLOW
     
    198198
    199199    // it is all about energy
    200     float                energy;                           //!< The energy stored in the weapons secondary buffers (reserve)
    201     float                energyLoaded;                     //!< The energy stored in the weapons primary buffers (fire without reload)
     200    float                energy;                           //!< The energy stored in the weapons buffers
    202201    float                energyMax;                        //!< The maximal energy that can be stored in the secondary buffers (reserveMax)
    203     float                energyLoadedMax;                  //!< The maximal energy that can be stored in the primary buffers
     202    CountPointer<AmmoContainer> ammoContainer;             //!< Pointer to the AmmoContainer this weapon grabs Energy from.
    204203    //! @todo move this to projectile
    205204    float                minCharge;                        //!< The minimal energy to be loaded onto one projectile if chargeable otherwise the power consumed by one projectile
     
    207206
    208207    GLGuiBar*            energyWidget;
    209     GLGuiBar*            energyLoadedWidget;
    210208
    211209    ////////////
Note: See TracChangeset for help on using the changeset viewer.