diff options
author | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-09-26 19:31:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-26 19:31:55 +0200 |
commit | 38a64eb2aab6a70f749403ad2c20ebc53f84581f (patch) | |
tree | d1659e00e5608e530bc864b82fc460c95455e3e9 /src/station_cmd.cpp | |
parent | 11dece205c83b530d7ddaa1290efde04f4dfdeb9 (diff) | |
download | openttd-38a64eb2aab6a70f749403ad2c20ebc53f84581f.tar.xz |
Change: Allow all tiles around docks to be docking tiles (#9578)
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index ab21d4424..1a188252c 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2635,23 +2635,15 @@ void ClearDockingTilesCheckingNeighbours(TileIndex tile) /** * Check if a dock tile can be docked from the given direction. * @param t Tile index of dock. - * @param d DiagDirection adjacent to dock being tested. + * @param d DiagDirection adjacent to dock being tested. (unused) * @return True iff the dock can be docked from the given direction. */ bool IsValidDockingDirectionForDock(TileIndex t, DiagDirection d) { assert(IsDockTile(t)); - /** Bitmap of valid directions for each dock tile part. */ - static const uint8 _valid_docking_tile[] = { - 0, 0, 0, 0, // No docking against the slope part. - 1 << DIAGDIR_NE | 1 << DIAGDIR_SW, // Docking permitted at the end - 1 << DIAGDIR_NW | 1 << DIAGDIR_SE, // of the flat piers. - }; - StationGfx gfx = GetStationGfx(t); - assert(gfx < lengthof(_valid_docking_tile)); - return HasBit(_valid_docking_tile[gfx], d); + return gfx >= GFX_DOCK_BASE_WATER_PART; } /** |