- Timestamp:
- Mar 12, 2009, 5:05:18 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSystem.cc
r2710 r2778 38 38 39 39 40 /* WEAPONSYSTEM 41 * creates the WeaponSystem and the ability to use weapons and munition 42 * loads the weapon the whole weaponSystem setting from an xml file 40 /* WeaponSystem 43 41 * 42 * www.orxonox.net/wiki/WeaponSystem 44 43 */ 45 44 … … 84 83 } 85 84 86 //returns the Pointer to the munitionType 85 void WeaponSystem::setNewSharedMunition(std::string munitionType, Munition * munitionToAdd) 86 { 87 this->munitionSharedSet_[munitionType] = munitionToAdd; 88 } 89 90 //returns the Pointer to the munitionType, if this munitionType doesn't exist returns 0, see Weapon::attachNeededMunition 87 91 Munition * WeaponSystem::getMunitionType(std::string munitionType) 88 92 { 89 93 //COUT(0) << "WeaponSystem::getMunitionType " << munitionType << std::endl; 90 std::map<std::string, Munition *>::const_iterator it = this->munitionS et_.find(munitionType);91 if (it != this->munitionS et_.end())94 std::map<std::string, Munition *>::const_iterator it = this->munitionSharedSet_.find(munitionType); 95 if (it != this->munitionSharedSet_.end()) 92 96 return it->second; 93 97 else … … 96 100 97 101 98 /* 99 //the first weaponSet is at n=0 100 void WeaponSystem::setActiveWeaponSet(unsigned int n) 101 { 102 if (n < this->weaponSets_.size()) 103 this->activeWeaponSet_ = this->weaponSets_[n]; 104 else 105 this->activeWeaponSet_ = this->weaponSets_[0]; 106 } 107 */ 102 108 103 109 104 110 105 //n is the n'th weaponSet, starting with zero 111 //SpaceShip.cc only needs to have the keybinding to a specific Set-number n 106 //SpaceShip.cc only needs to have the keybinding to a specific Set-number n (=firemode) 112 107 void WeaponSystem::fire(WeaponMode::Enum n) 113 108 {
Note: See TracChangeset
for help on using the changeset viewer.