1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-15 01:39:57 +00:00

fixed a bug in fixStorage

This commit is contained in:
Zeno Rogue 2018-05-22 20:40:52 +02:00
parent fc964ec7b2
commit e5d5678900

View File

@ -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++);
}
monstersAt.clear();
for(monster *m: restore) m->store();
}