summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-15 19:53:25 +0000
committertron <tron@openttd.org>2006-03-15 19:53:25 +0000
commit8208ee5ea251c1dee8ac2ba6559cc077e2329990 (patch)
tree3bcee0dd613ba068079e1f4afa56cc48cb16758d
parent0c9a269bd3a9d3d78e84786ba5f211e680ba0e45 (diff)
downloadopenttd-8208ee5ea251c1dee8ac2ba6559cc077e2329990.tar.xz
(svn r3891) Fix r3885
-rw-r--r--tunnelbridge_cmd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index 9806d59be..0034f10f7 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -820,8 +820,12 @@ int32 DoConvertTunnelBridgeRail(TileIndex tile, uint totype, bool exec)
if (GB(_m[tile].m3, 0, 4) == totype) return CMD_ERROR;
- SB(_m[tile].m3, 0, 4, totype);
- SB(_m[endtile].m3, 0, 4, totype);
+ if (exec) {
+ SB(_m[tile].m3, 0, 4, totype);
+ SB(_m[endtile].m3, 0, 4, totype);
+ MarkTileDirtyByTile(tile);
+ MarkTileDirtyByTile(endtile);
+ }
cost = 2 * (_price.build_rail >> 1);
delta = TileOffsByDir(GetBridgeRampDirection(tile));
for (tile += delta; tile != endtile; tile += delta) {