From 8db091816272f59a13e43618626ee6be80a3f31a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 1 Sep 2017 22:15:26 +0200 Subject: [PATCH] Great Wall continuity --- landgen.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/landgen.cpp b/landgen.cpp index 3f989f84..b6ea2ac4 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -3511,6 +3511,19 @@ void setdist(cell *c, int d, cell *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); + + // this fixes the following problem: + // http://steamcommunity.com/app/342610/discussions/0/1470840994970724215/ + if(from && d >= 7) { + int cdi = celldist(c); + if(celldist(from) > cdi) { + forCellCM(c2, c) if(celldist(c2) < cdi) { + setdist(c2, d, c); + from = c2; + break; + } + } + } if(d <= 3) lastexplore = shmup::on ? shmup::curtime : turncount;