From cdeefe7bd8eed44189757eaabe3358a9b6f8686b Mon Sep 17 00:00:00 2001 From: dP Date: Mon, 5 Sep 2022 23:58:06 +0300 Subject: [PATCH] Fix #9903: Don't build houses around half-tile roads after a bridge or tunnel --- src/town_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index cc8364b0a1..c486e427b3 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1592,6 +1592,9 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t return; } + /* Don't build houses around half-tile roads in the rare case we ended up on one. */ + if (HasExactlyOneBit(cur_rb)) allow_house = false; + /* Possibly extend the road in a direction. * Randomize a direction and if it has a road, bail out. */ target_dir = RandomDiagDir();