summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuXarick <43006711+SamuXarick@users.noreply.github.com>2020-05-09 21:27:06 +0100
committerGitHub <noreply@github.com>2020-05-09 22:27:06 +0200
commita95fbd59a3356d31e91a8bf24a79c71964868b66 (patch)
treeeadb646af764df580d79a17e9ba70b31b404c44e
parent61e1a4510058192ea9266554ad7a8e1e495a71d4 (diff)
downloadopenttd-a95fbd59a3356d31e91a8bf24a79c71964868b66.tar.xz
Fix #8119, f538179: Update docking tile area when placing a diagonal rail next to a dock end (#8124)
-rw-r--r--src/rail_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 7de00327e..527e02cb8 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -568,7 +568,6 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u
default: {
/* Will there be flat water on the lower halftile? */
bool water_ground = IsTileType(tile, MP_WATER) && IsSlopeWithOneCornerRaised(tileh);
- bool docking = IsPossibleDockingTile(tile) && IsDockingTile(tile);
CommandCost ret = CheckRailSlope(tileh, trackbit, TRACK_BIT_NONE, tile);
if (ret.Failed()) return ret;
@@ -587,7 +586,7 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u
MakeRailNormal(tile, _current_company, trackbit, railtype);
if (water_ground) {
SetRailGroundType(tile, RAIL_GROUND_WATER);
- SetDockingTile(tile, docking);
+ if (IsPossibleDockingTile(tile)) CheckForDockingTile(tile);
}
Company::Get(_current_company)->infrastructure.rail[railtype]++;
DirtyCompanyInfrastructureWindows(_current_company);