Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

some WeaponManager remake

File:
1 edited

Legend:

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

    r6561 r6669  
    1717#include "crosshair.h"
    1818#include "weapon.h"
     19
     20#include "count_pointer.h"
     21#include "ammo_container.h"
    1922
    2023// FORWARD DECLARATION
     
    7275
    7376    bool addWeapon(Weapon* weapon);
    74     bool addWeapon(Weapon* weapon, int configID = -1, int slotID = -1);
     77    bool addWeapon(Weapon* weapon, int configID, int slotID = -1);
    7578    void removeWeapon(Weapon* weapon, int configID = -1);
     79
    7680    Weapon* getWeapon(int slotID) const { return (slotID >= 0 && slotID < this->slotCount)? this->currentSlotConfig[slotID].nextWeapon: NULL; };
    7781
     
    8286    void previousWeaponConfig();
    8387    void changeWeaponConfig(int weaponConfig);
     88
     89    float addAmmunition(ClassID projectileType, float ammo);
     90
    8491
    8592    /** @returns a fixed target namely the Crosshair's 3D position */
     
    97104 // private:
    98105    int getNextFreeSlot(int configID, long capability = WTYPE_ALL);
     106    CountPointer<AmmoContainer>& getAmmoContainer(ClassID projectileType);
    99107
    100108  private:
     
    112120    Crosshair*              crosshair;                                //!< an aim.
    113121    tAnimation<Crosshair>*  crossHairSizeAnim;                        //!< An animation for the crosshair (scaling)
     122
     123    std::vector<CountPointer<AmmoContainer> > ammo;                   //!< Containers
    114124};
    115125
Note: See TracChangeset for help on using the changeset viewer.