Fixed weapons not stopping to fire after pickup.
This commit is contained in:
parent
779cc36c57
commit
518ec95549
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||||
|
|
Reference in a new issue