Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 17, 2009, 1:36:21 AM (14 years ago)
Author:
landauf
Message:

delete weaponpacks which were defined in xml but don't fit onto the weaponslots (in the future we could put them into the inventory).

+ some small changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/particles2/src/orxonox/weaponsystem/WeaponSystem.cc

    r6076 r6078  
    221221
    222222        // Remove the WeaponPack from the WeaponSystem
    223         assert( std::find(this->weaponPacks_.begin(),this->weaponPacks_.end(),wPack)!=this->weaponPacks_.end() );
    224         this->weaponPacks_.erase( std::find(this->weaponPacks_.begin(),this->weaponPacks_.end(),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);
    225226    }
    226227
Note: See TracChangeset for help on using the changeset viewer.