summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-02-22 21:11:31 +0000
committertron <tron@openttd.org>2006-02-22 21:11:31 +0000
commitc9d540c0f028934c996a93bb8966947ed187cee5 (patch)
tree0aa7b30e27be4069bfbd87fff0bb5bc65a4aa462
parent9d4400c89f5faaa4d94f8aca41dc6924a40bd080 (diff)
downloadopenttd-c9d540c0f028934c996a93bb8966947ed187cee5.tar.xz
(svn r3653) -Fix: You didn't pay for terraforming at the end tile when building a tunnel
-rw-r--r--tunnelbridge_cmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index a8e07e787..eb2a68518 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -519,9 +519,8 @@ int32 CmdBuildTunnel(int x, int y, uint32 flags, uint32 p1, uint32 p2)
} else {
ret = DoCommandByTile(end_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (CmdFailed(ret)) return ret;
- cost += ret;
}
- cost += _price.build_tunnel;
+ cost += _price.build_tunnel + ret;
if (flags & DC_EXEC) {
SetTileType(start_tile, MP_TUNNELBRIDGE);