(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
This commit is contained in:
4
ai_new.c
4
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!
|
||||
|
Reference in New Issue
Block a user