mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 12:19:18 +00:00
fixed a bug in fixStorage
This commit is contained in:
parent
fc964ec7b2
commit
e5d5678900
10
shmup.cpp
10
shmup.cpp
@ -2861,12 +2861,14 @@ void activateMonstersAt(cell *c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void fixStorage() {
|
void fixStorage() {
|
||||||
|
|
||||||
vector<monster*> restore;
|
vector<monster*> restore;
|
||||||
|
|
||||||
for(auto it = monstersAt.begin(); it != monstersAt.end(); it++)
|
for(auto it = monstersAt.begin(); it != monstersAt.end(); it++)
|
||||||
if(it->second->base != it->first) {
|
restore.push_back(it->second);
|
||||||
restore.push_back(it->second);
|
|
||||||
monstersAt.erase(it++);
|
monstersAt.clear();
|
||||||
}
|
|
||||||
for(monster *m: restore) m->store();
|
for(monster *m: restore) m->store();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user