Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 25, 2005, 2:16:23 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: doxygen-tags (and flush)

File:
1 edited

Legend:

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

    r4953 r4954  
    203203
    204204/**
     205 * sets the capabilities of a Slot
     206 * @param slot the slot to set the capability
     207 * @param slotCapability the capability @see WM_SlotCapability
     208 */
     209void WeaponManager::setSlotCapability(int slot, long slotCapability)
     210{
     211  if (slot > slotCount)
     212    return;
     213  this->currentSlotConfig[slot].capability = slotCapability;
     214}
     215
     216
     217/**
    205218 * removes a Weapon from the WeaponManager
     219 *
     220 * !! The weapon must be inactive before you can delete it,    !!
     221 * !! because it will still be deactivated (if it is selected) !!
    206222 */
    207223void WeaponManager::removeWeapon(Weapon* weapon, int configID)
    208224{
    209   /* empty */
     225  if (weapon == NULL)
     226    return;
     227  if (configID < 0)
     228  {
     229    for (int j = 0; j < WM_MAX_SLOTS; j++)
     230    {
     231      for (int i = 0; i < WM_MAX_CONFIGS; i++)
     232      {
     233        if (this->configs[i][j] == weapon)
     234          this->configs[i][j] = NULL;
     235      }
     236      if (this->currentSlotConfig[j].currentWeapon == weapon)
     237      {
     238        this->currentSlotConfig[j].nextWeapon = NULL;
     239      }
     240    }
     241  }
    210242}
    211243
     
    214246 * changes to the next weapon configuration
    215247 */
    216 void WeaponManager::nextWeaponConf()
     248void WeaponManager::nextWeaponConfig()
    217249{
    218250  ++this->currentConfigID;
Note: See TracChangeset for help on using the changeset viewer.