diff options
author | tron <tron@openttd.org> | 2005-01-03 12:56:22 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-03 12:56:22 +0000 |
commit | 32bfe0dddde81d016cb8de15e6a41bca3506d7be (patch) | |
tree | 04b3f2dd580a9cd8387358c91a0cfcf95a525153 /water_cmd.c | |
parent | 4c14afba4eae4bbfe3d448eeaa072e11b326c78a (diff) | |
download | openttd-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 'water_cmd.c')
-rw-r--r-- | water_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/water_cmd.c b/water_cmd.c index 9201a374f..9815e3a6f 100644 --- a/water_cmd.c +++ b/water_cmd.c @@ -265,8 +265,8 @@ static int32 ClearTile_Water(uint tile, byte flags) { return CMD_ERROR; // Make sure it's not an edge tile. - if (!(IS_INT_INSIDE(GET_TILE_X(tile),1,TILE_X_MAX-1) && - IS_INT_INSIDE(GET_TILE_Y(tile),1,TILE_Y_MAX-1))) + if (!(IS_INT_INSIDE(GET_TILE_X(tile), 1, MapMaxX() - 1) && + IS_INT_INSIDE(GET_TILE_Y(tile), 1, MapMaxY() - 1))) return_cmd_error(STR_0002_TOO_CLOSE_TO_EDGE_OF_MAP); if (m5 == 0) { |