Fixed weapons not stopping to fire after pickup.

This commit is contained in:
Felix Ableitner 2013-09-17 23:06:17 +02:00
parent 779cc36c57
commit 518ec95549

View file

@ -121,9 +121,9 @@ World::applyMovement(std::shared_ptr<Sprite> sprite, int elapsed) {
void void
World::think(int elapsed) { World::think(int elapsed) {
for (auto it = mCharacters.begin(); it != mCharacters.end(); ) { for (auto it = mCharacters.begin(); it != mCharacters.end(); ) {
if ((*it)->getDelete() && (*it)->getCategory() != Sprite::CATEGORY_ACTOR) { if ((*it)->getDelete()) {
mCharacters.erase(it); mCharacters.erase(it);
auto& d = mDrawables[(*it)->getCategory()]; auto& d = mDrawables[Sprite::CATEGORY_ACTOR];
d.erase(std::find(d.begin(), d.end(), *it)); d.erase(std::find(d.begin(), d.end(), *it));
} }
else { else {