- Timestamp:
- Dec 3, 2008, 5:13:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.cc
r2327 r2331 63 63 { 64 64 wPack->setParentWeaponSystem(this); 65 this->weaponSets_[firemode]->attachWeaponPack(wPack); 66 this->weaponPacks_[firemode] = wPack; 65 if (firemode < this->weaponSets_.size()) 66 this->weaponSets_[firemode]->attachWeaponPack(wPack); 67 this->weaponPacks_.push_back(wPack); 67 68 } 68 69 … … 85 86 Munition * WeaponSystem::getMunitionType(std::string munitionType) 86 87 { 87 return this->munitionSet_[munitionType]; 88 std::map<std::string, Munition *>::const_iterator it = this->munitionSet_.find(munitionType); 89 if (it != this->munitionSet_.end()) 90 return it->second; 91 else 92 return 0; 88 93 } 89 94
Note: See TracChangeset
for help on using the changeset viewer.