1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 11:19:59 +00:00

savemem:: make sure it is not the same altmap

This commit is contained in:
Zeno Rogue 2024-01-11 15:23:05 +01:00
parent 4c6c44cc26
commit 072041db06

View File

@ -116,8 +116,12 @@ EX void save_memory() {
} }
} }
while(celldist(at->c7) > d-LIM) at = at->move(0); while(celldist(at->c7) > d-LIM && at != orig) at = at->move(0);
// make sure it is not the same altmap
auto atalt = at->alt; if(atalt) atalt = atalt->alt;
while(atalt && at != orig && at->alt && at->alt->alt == atalt) at = at->move(0);
// go back to such a point X that all the heptagons adjacent to the current 'at' // go back to such a point X that all the heptagons adjacent to the current 'at'
// are the children of X. This X becomes the new 'at' // are the children of X. This X becomes the new 'at'
if(true) { if(true) {