- Timestamp:
- Oct 26, 2015, 11:34:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/fabienHS15/src/orxonox/weaponsystem/Munition.h
r10688 r10713 39 39 namespace orxonox 40 40 { 41 enumDeployment41 namespace MunitionDeployment 42 42 { 43 DEPLOYMENT_SHARE, 44 DEPLOYMENT_STACK, 45 DEPLOYMENT_SEPARATE 46 }; 47 43 enum Value 44 { 45 Share, 46 Stack, 47 Separate 48 }; 49 } 48 50 49 51 class _OrxonoxExport Munition : public BaseObject … … 77 79 { return this->maxMunitionPerMagazine_; } 78 80 inline bool getUseSeparateMagazines() const 79 { return deployment_ == DEPLOYMENT_SEPARATE; }81 { return deployment_ == MunitionDeployment::Separate; } 80 82 inline bool getStackMunition() const 81 { return deployment_ == DEPLOYMENT_STACK; }83 { return deployment_ == MunitionDeployment::Stack; } 82 84 83 85 bool canTakeMunition(unsigned int amount, WeaponMode* user) const; … … 105 107 unsigned int maxMagazines_; 106 108 unsigned int magazines_; 107 std::map<WeaponMode*, Magazine*> currentMagazines_; 109 std::map<WeaponMode*, Magazine*> currentMagazines_; // Maps weapon modes to magazines that are currently used. 108 110 109 Deployment deployment_;111 MunitionDeployment::Value deployment_; // Defines the behaviour how munition and magazines are distributed to the consuming weapon modes. 110 112 111 113 bool bAllowMunitionRefilling_; … … 113 115 114 116 float reloadTime_; 117 WeaponMode* lastFilledWeaponMode_; // Pointer to the weapon mode that got the last munition during the last call of addMunition. 115 118 116 119 private:
Note: See TracChangeset
for help on using the changeset viewer.