- Timestamp:
- Dec 25, 2009, 1:18:03 PM (15 years ago)
- Location:
- code/branches/pickup2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2
- Property svn:mergeinfo changed
-
code/branches/pickup2/src/orxonox/weaponsystem/WeaponSystem.cc
r5929 r6412 202 202 } 203 203 204 this->weaponPacks_. insert(wPack);204 this->weaponPacks_.push_back(wPack); 205 205 wPack->setWeaponSystem(this); 206 206 … … 221 221 222 222 // Remove the WeaponPack from the WeaponSystem 223 this->weaponPacks_.erase(wPack); 223 std::vector<WeaponPack*>::iterator it = std::find(this->weaponPacks_.begin(),this->weaponPacks_.end(), wPack); 224 assert(it !=this->weaponPacks_.end()); 225 this->weaponPacks_.erase(it); 224 226 } 225 227 … … 227 229 { 228 230 unsigned int i = 0; 229 for (std:: set<WeaponPack*>::const_iterator it = this->weaponPacks_.begin(); it != this->weaponPacks_.end(); ++it)231 for (std::vector<WeaponPack*>::const_iterator it = this->weaponPacks_.begin(); it != this->weaponPacks_.end(); ++it) 230 232 { 231 233 ++i; … … 258 260 259 261 // Check if the WeaponPack belongs to this WeaponSystem 260 std:: set<WeaponPack *>::iterator it1 = this->weaponPacks_.find(wPack);262 std::vector<WeaponPack *>::iterator it1 = std::find( this->weaponPacks_.begin(), this->weaponPacks_.end(), wPack ); 261 263 if (it1 == this->weaponPacks_.end()) 262 264 return;
Note: See TracChangeset
for help on using the changeset viewer.