mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-09-27 21:58:13 +00:00
setdist with d > BARLEV no longer pointlessly calls itself recursively
This commit is contained in:
parent
9f51df9720
commit
bc912a2fbb
@ -2494,7 +2494,7 @@ void setland_randomwalk(cell *c) {
|
|||||||
void setdist(cell *c, int d, cell *from) {
|
void setdist(cell *c, int d, cell *from) {
|
||||||
|
|
||||||
if(c->mpdist <= d) return;
|
if(c->mpdist <= d) return;
|
||||||
if(c->mpdist > d+1 && d != BARLEV) setdist(c, d+1, from);
|
if(c->mpdist > d+1 && d < BARLEV) setdist(c, d+1, from);
|
||||||
c->mpdist = d;
|
c->mpdist = d;
|
||||||
// printf("setdist %p %d [%p]\n", c, d, from);
|
// printf("setdist %p %d [%p]\n", c, d, from);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user