mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-01 03:39:16 +00:00
fixed a freeze in spherical Dungeon
This commit is contained in:
parent
381071ab4c
commit
9ebd5342ec
@ -445,11 +445,12 @@ int parent_id(cell *c, int which, const cellfunction& cf) {
|
|||||||
for(int i=0; i<c->type; i++) {
|
for(int i=0; i<c->type; i++) {
|
||||||
|
|
||||||
if(cf(c->cmove(i)) == d) {
|
if(cf(c->cmove(i)) == d) {
|
||||||
|
int steps = 0;
|
||||||
again:
|
again:
|
||||||
if(!which) return i;
|
if(!which || steps == c->type) return i;
|
||||||
int i2 = c->c.fix(i+which);
|
int i2 = c->c.fix(i+which);
|
||||||
if(cf(c->cmove(i2)) == d) {
|
if(cf(c->cmove(i2)) == d) {
|
||||||
i = i2; goto again;
|
i = i2; steps++; goto again;
|
||||||
}
|
}
|
||||||
else return i;
|
else return i;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user