1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-09 15:39:55 +00:00

fixed ensure_shifts

This commit is contained in:
Zeno Rogue 2024-06-25 17:07:43 +02:00
parent 8c98d2f30e
commit f6ce5a81e4

View File

@ -1409,16 +1409,22 @@ EX namespace hybrid {
EX void ensure_shifts(cell *c) {
if(S3 >= OINF) return;
if(!make_shift(c)[c->type]) return;
forCellEx(c1, c)
if(geometry == gNormal) {
forCellEx(c1, c) if(celldist(c1) < celldist(c)) { ensure_shifts(c1); }
}
for(int a=0; a<c->type; a++) {
cellwalker cw0(c, a);
cellwalker cw = cw0;
while(cw != cw0) {
do {
get_shift(cw);
cw += wstep;
cw += a;
cw ++;
}
while(cw != cw0);
}
make_shift(c)[c->type] = 0;
}