From 7ca6b2b8b0d6f66966fa2ff01e3e9961314dfcc4 Mon Sep 17 00:00:00 2001 From: tron Date: Fri, 7 Jan 2005 17:02:43 +0000 Subject: (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY] --- ai_new.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ai_new.c') diff --git a/ai_new.c b/ai_new.c index 8a6dc0dd1..91219642e 100644 --- a/ai_new.c +++ b/ai_new.c @@ -606,8 +606,8 @@ static void AiNew_State_FindStation(Player *p) { // where we get the most cargo and where it is buildable. // TODO: also check for station of myself and make sure we are not // taking eachothers passangers away (bad result when it does not) - for (x = GET_TILE_X(tile) - AI_FINDSTATION_TILE_RANGE; x <= GET_TILE_X(tile) + AI_FINDSTATION_TILE_RANGE; x++) { - for (y = GET_TILE_Y(tile) - AI_FINDSTATION_TILE_RANGE; y <= GET_TILE_Y(tile) + AI_FINDSTATION_TILE_RANGE; y++) { + for (x = TileX(tile) - AI_FINDSTATION_TILE_RANGE; x <= TileX(tile) + AI_FINDSTATION_TILE_RANGE; x++) { + for (y = TileY(tile) - AI_FINDSTATION_TILE_RANGE; y <= TileY(tile) + AI_FINDSTATION_TILE_RANGE; y++) { new_tile = TILE_XY(x,y); if (IS_TILETYPE(new_tile, MP_CLEAR) || IS_TILETYPE(new_tile, MP_TREES)) { // This tile we can build on! -- cgit v1.2.3-54-g00ecf