From bc912a2fbbdbd525175d420db4016e6643090045 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 2 Aug 2019 18:55:56 +0200 Subject: [PATCH] setdist with d > BARLEV no longer pointlessly calls itself recursively --- landgen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/landgen.cpp b/landgen.cpp index 77f44b26..5b56bbf9 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -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);