Mercurial > hg > openttd
changeset 7042:6ce0b3b18d8e draft
(svn r10306) -Fix [FS#890]: the fix in r10219 was not enough to stop this bug from happening.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 24 Jun 2007 16:44:06 +0000 |
parents | f4cdaf92173e |
children | 116bea6834a1 |
files | src/tunnelbridge_cmd.cpp |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -522,6 +522,15 @@ /* 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 {