summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
authorSamuXarick <43006711+SamuXarick@users.noreply.github.com>2021-01-09 11:18:31 +0000
committerGitHub <noreply@github.com>2021-01-09 12:18:31 +0100
commit8da5cff21065501303db98e2e575ac1202157985 (patch)
treee4e14402b0fad964abfdb19478a45b53ecebe0d0 /src/town_cmd.cpp
parent8e6574dcdb6362edd0124d400d9c4a00071b22a1 (diff)
downloadopenttd-8da5cff21065501303db98e2e575ac1202157985.tar.xz
Fix #8462: Don't check whether to grow a town road on water (#8471)
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r--src/town_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 3a2cd7087..e87c4437f 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -932,8 +932,8 @@ static bool IsRoadAllowedHere(Town *t, TileIndex tile, DiagDirection dir)
* If that fails clear the land, and if that fails exit.
* This is to make sure that we can build a road here later. */
RoadType rt = GetTownRoadType(t);
- if (DoCommand(tile, ((dir == DIAGDIR_NW || dir == DIAGDIR_SE) ? ROAD_Y : ROAD_X) | (rt << 4), 0, DC_AUTO, CMD_BUILD_ROAD).Failed() &&
- DoCommand(tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR).Failed()) {
+ if (DoCommand(tile, ((dir == DIAGDIR_NW || dir == DIAGDIR_SE) ? ROAD_Y : ROAD_X) | (rt << 4), 0, DC_AUTO | DC_NO_WATER, CMD_BUILD_ROAD).Failed() &&
+ DoCommand(tile, 0, 0, DC_AUTO | DC_NO_WATER, CMD_LANDSCAPE_CLEAR).Failed()) {
return false;
}
}