From 76aa40cecfda06accccbd126275754738c3d4511 Mon Sep 17 00:00:00 2001 From: tron Date: Wed, 15 Mar 2006 19:53:25 +0000 Subject: [PATCH] (svn r3891) Fix r3885 --- tunnelbridge_cmd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index 9806d59be9..0034f10f72 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) {