Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 26, 2015, 11:34:23 PM (10 years ago)
Author:
fvultier
Message:
 
File:
1 edited

Legend:

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

    r10688 r10713  
    3939namespace orxonox
    4040{
    41     enum Deployment
     41    namespace MunitionDeployment
    4242    {
    43         DEPLOYMENT_SHARE,
    44         DEPLOYMENT_STACK,
    45         DEPLOYMENT_SEPARATE
    46     };
    47 
     43        enum Value
     44        {
     45            Share,
     46            Stack,
     47            Separate
     48        };
     49    }
    4850
    4951    class _OrxonoxExport Munition : public BaseObject
     
    7779                { return this->maxMunitionPerMagazine_; }
    7880            inline bool getUseSeparateMagazines() const
    79                 { return deployment_ == DEPLOYMENT_SEPARATE; }
     81                { return deployment_ == MunitionDeployment::Separate; }
    8082            inline bool getStackMunition() const
    81                 { return deployment_ == DEPLOYMENT_STACK; }
     83                { return deployment_ == MunitionDeployment::Stack; }
    8284
    8385            bool canTakeMunition(unsigned int amount, WeaponMode* user) const;
     
    105107            unsigned int maxMagazines_;
    106108            unsigned int magazines_;
    107             std::map<WeaponMode*, Magazine*> currentMagazines_;
     109            std::map<WeaponMode*, Magazine*> currentMagazines_; // Maps weapon modes to magazines that are currently used.
    108110
    109             Deployment deployment_;
     111            MunitionDeployment::Value deployment_; // Defines the behaviour how munition and magazines are distributed to the consuming weapon modes.
    110112
    111113            bool bAllowMunitionRefilling_;
     
    113115
    114116            float reloadTime_;
     117            WeaponMode* lastFilledWeaponMode_; // Pointer to the weapon mode that got the last munition during the last call of addMunition.
    115118
    116119        private:
Note: See TracChangeset for help on using the changeset viewer.