Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6972 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Feb 2, 2006, 10:18:54 AM (19 years ago)
Author:
bensch
Message:

trunk: better functionality in the ammo-container functionality

Location:
trunk/src/world_entities/weapons
Files:
2 edited

Legend:

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

    r6931 r6972  
    297297}
    298298
     299/**
     300 * @brief does the same as the funtion inclreaseAmmunition, added four your convenience
     301 * @param weapon, the Weapon to read the ammo-info about.
     302 * @param ammo how much ammo to add.
     303 */
     304float WeaponManager::inclreaseAmmunition(const Weapon* weapon, float ammo)
     305{
     306  assert (weapon != NULL);
     307  return this->increaseAmmunition(weapon->getLeafClassID(), ammo);
     308
     309}
    299310
    300311
     
    503514}
    504515
     516CountPointer<AmmoContainer>& WeaponManager::getAmmoContainer(const Weapon* weapon)
     517{
     518  assert (weapon != NULL);
     519  return (this->getAmmoContainer(weapon->getLeafClassID()));
     520}
     521
    505522
    506523/**
  • trunk/src/world_entities/weapons/weapon_manager.h

    r6931 r6972  
    8787
    8888    float increaseAmmunition(ClassID projectileType, float ammo);
    89 
     89    float inclreaseAmmunition(const Weapon* weapon, float ammo);
    9090
    9191    /** @returns a fixed target namely the Crosshair's 3D position */
     
    104104    int getNextFreeSlot(int configID, long capability = WTYPE_ALL);
    105105    CountPointer<AmmoContainer>& getAmmoContainer(ClassID projectileType);
     106    CountPointer<AmmoContainer>& getAmmoContainer(const Weapon* weapon);
    106107
    107108  private:
Note: See TracChangeset for help on using the changeset viewer.