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
1 changed files with 6 additions and 2 deletions

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'
// are the children of X. This X becomes the new 'at'
if(true) {