From 32bfe0dddde81d016cb8de15e6a41bca3506d7be Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 3 Jan 2005 12:56:22 +0000 Subject: (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() --- misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'misc.c') diff --git a/misc.c b/misc.c index 4a9789ede..b9f8e0dcf 100644 --- a/misc.c +++ b/misc.c @@ -565,8 +565,8 @@ uint GetTileDistAdv(TileIndex xy1, TileIndex xy2) bool CheckDistanceFromEdge(TileIndex tile, uint distance) { - return IS_INT_INSIDE(GET_TILE_X(tile), distance, TILE_X_MAX + 1 - distance) && - IS_INT_INSIDE(GET_TILE_Y(tile), distance, TILE_Y_MAX + 1 - distance); + return IS_INT_INSIDE(GET_TILE_X(tile), distance, MapSizeX() - distance) && + IS_INT_INSIDE(GET_TILE_Y(tile), distance, MapSizeY() - distance); } void OnNewDay_Train(Vehicle *v); -- cgit v1.2.3-54-g00ecf