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/WeaponPack.cc

    r6076 r6078  
    9696            return;
    9797
    98         assert( std::find(this->weapons_.begin(), this->weapons_.end(), weapon)!=this->weapons_.end() );
    99         this->weapons_.erase( std::find(this->weapons_.begin(), this->weapons_.end(), weapon) );
     98        std::vector<Weapon*>::iterator it = std::find(this->weapons_.begin(), this->weapons_.end(), weapon);
     99        assert(it != this->weapons_.end());
     100        this->weapons_.erase(it);
    100101        weapon->setWeaponPack(0);
    101102    }
Note: See TracChangeset for help on using the changeset viewer.