diff options
author | tron <tron@openttd.org> | 2005-01-07 17:02:43 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-07 17:02:43 +0000 |
commit | 7ca6b2b8b0d6f66966fa2ff01e3e9961314dfcc4 (patch) | |
tree | e4137b60a824b45ce09f668d58520e36dba10256 /ai_new.c | |
parent | f5c33e50733c46cee14e84ade6da0c171d96064b (diff) | |
download | openttd-7ca6b2b8b0d6f66966fa2ff01e3e9961314dfcc4.tar.xz |
(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
Diffstat (limited to 'ai_new.c')
-rw-r--r-- | ai_new.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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! |