1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

intra:: be more careful in infinite spaces

This commit is contained in:
Zeno Rogue 2021-10-03 18:07:32 +02:00
parent 36f3a0cf7b
commit f52b02b638

View File

@ -295,6 +295,19 @@ EX void start(int id IS(0)) {
current = id;
data[current].gd.restoregame();
ginf[gProduct] = data[current].gi;
again:
int missing = 0;
for(auto p: intra_id)
for(int i=0; i<p.first->type; i++) {
cell *c1 = p.first->move(i);
if(!c1) continue;
if(intra_id.count(c1) == 0) {
intra_id[c1] = p.second;
missing++;
}
}
if(missing) goto again;
}
#if HDR