From b17b9351dd4e27fe15642655cd58bd6a3731d788 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 24 Jun 2007 16:44:06 +0000 Subject: (svn r10306) -Fix [FS#890]: the fix in r10219 was not enough to stop this bug from happening. --- src/tunnelbridge_cmd.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/tunnelbridge_cmd.cpp') diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index bd944b813..1a3bc0243 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -522,6 +522,15 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, uint32 flags, uint32 p1, uint32 /* slope of end tile must be complementary to the slope of the start tile */ if (end_tileh != ComplementSlope(start_tileh)) { + /* Some (rail) track bits might be terraformed into the correct direction, + * but that would still leave tracks on foundation. Therefor excavation will + * always fail for rail tiles. On the other hand, for road tiles it might + * succeed when there is only one road bit on the tile, but then that road + * bit is removed leaving a clear tile. + * This therefor preserves the behaviour that half road tiles are always removable. + */ + if (IsTileType(end_tile, MP_RAILWAY)) return_cmd_error(STR_1008_MUST_REMOVE_RAILROAD_TRACK); + ret = DoCommand(end_tile, end_tileh & start_tileh, 0, flags, CMD_TERRAFORM_LAND); if (CmdFailed(ret)) return_cmd_error(STR_5005_UNABLE_TO_EXCAVATE_LAND); } else { -- cgit v1.2.3-70-g09d2