setdist with d > BARLEV no longer pointlessly calls itself recursively

This commit is contained in:
Zeno Rogue 2019-08-02 18:55:56 +02:00
parent 9f51df9720
commit bc912a2fbb
1 changed files with 1 additions and 1 deletions

View File

@ -2494,7 +2494,7 @@ void setland_randomwalk(cell *c) {
void setdist(cell *c, int d, cell *from) {
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;
// printf("setdist %p %d [%p]\n", c, d, from);