1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-17 15:17:37 +00:00

some work on the savemem feature

This commit is contained in:
Zeno Rogue
2018-01-26 01:45:49 +01:00
parent 2f9e5186f6
commit 22d3d2590f
8 changed files with 84 additions and 6 deletions

View File

@@ -549,6 +549,15 @@ namespace yendor {
auto hooks = addHook(clearmemory, 0, [] () {
yendor::yii = NOYENDOR; yendor::yi.clear();
}) + addHook(hooks_removecells, 0, [] () {
eliminate_if(yendor::yi, [] (yendorinfo& i) {
for(int j=0; j<YDIST; j++) if(is_cell_removed(i.path[j])) {
DEBSM(printf("removing a Yendor\n");)
if(&yi[yii] == &i) yii = NOYENDOR;
return true;
}
return false;
});
});
};