summaryrefslogtreecommitdiff
path: root/tunnelbridge_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-03 12:56:22 +0000
committertron <tron@openttd.org>2005-01-03 12:56:22 +0000
commit32bfe0dddde81d016cb8de15e6a41bca3506d7be (patch)
tree04b3f2dd580a9cd8387358c91a0cfcf95a525153 /tunnelbridge_cmd.c
parent4c14afba4eae4bbfe3d448eeaa072e11b326c78a (diff)
downloadopenttd-32bfe0dddde81d016cb8de15e6a41bca3506d7be.tar.xz
(svn r1337) Use MapMax[XY]() (or MapSize[XY]() if appropriate) instead of TILE_MAX_[XY]
While here replace one erroneous TILE_MAX_X with MapMaxY()
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r--tunnelbridge_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index f301d7be7..53dc96c9f 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -431,7 +431,7 @@ static int32 DoBuildTunnel(int x, int y, int x2, int y2, uint32 flags, uint exc_
TileInfo ti;
uint z;
- if ( (uint) x > TILE_X_MAX * 16 - 1 || (uint) y > TILE_X_MAX * 16 - 1)
+ if ((uint)x > MapMaxX() * 16 - 1 || (uint)y > MapMaxY() * 16 - 1)
return CMD_ERROR;
/* check if valid, and make sure that (x,y) is smaller than (x2,y2) */