Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2015, 6:49:54 PM (8 years ago)
Author:
fvultier
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fabienHS15/src/orxonox/weaponsystem/Munition.h

    r10794 r10878  
    9797
    9898            bool canAddMagazines(unsigned int amount) const;
    99             bool addMagazines(unsigned int amount);
     99            /**
     100            @brief Try to add magazines.
     101            @param amount The amount of magazines tried to add.
     102            @return The amount of magazines sucessfully added.
     103            */
     104            unsigned int addMagazines(unsigned int amount);
    100105
    101106            bool canRemoveMagazines(unsigned int amount) const;
     
    107112            unsigned int maxMunitionPerMagazine_;
    108113            unsigned int maxMagazines_;
    109             unsigned int magazines_;
    110             std::map<WeaponMode*, Magazine*> currentMagazines_; // Maps weapon modes to magazines that are currently used.
     114            unsigned int unassignedMagazines_; // Number of magazines that are not assigned to a weapon mode. These are alway treated as full.
     115            std::map<WeaponMode*, Magazine*> assignedMagazines_; // Maps weapon modes to magazines that are currently used.
    111116
    112117            MunitionDeployment::Value deployment_; // Defines the behaviour how munition and magazines are distributed to the consuming weapon modes.
     
    115120            bool bAllowMultiMunitionRemovementUnderflow_;
    116121
    117             float reloadTime_;
     122            float reloadTime_; // The time needed to replace a magazine by a new one.
    118123            WeaponMode* lastFilledWeaponMode_; // Pointer to the weapon mode that got the last munition during the last call of addMunition.
    119124
Note: See TracChangeset for help on using the changeset viewer.