1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

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

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);