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() {
|
||||
|
||||
vector<monster*> restore;
|
||||
|
||||
for(auto it = monstersAt.begin(); it != monstersAt.end(); it++)
|
||||
if(it->second->base != it->first) {
|
||||
restore.push_back(it->second);
|
||||
monstersAt.erase(it++);
|
||||
}
|
||||
restore.push_back(it->second);
|
||||
|
||||
monstersAt.clear();
|
||||
|
||||
for(monster *m: restore) m->store();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user