1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-28 00:49:11 +00:00

(svn r3421) - Revert r3412 as it didn't work.

- Fix station builder issue by checking the tile is in bounds.
This commit is contained in:
2006-01-23 19:12:35 +00:00
parent 93082104dd
commit 70efa805cb
2 changed files with 3 additions and 8 deletions

View File

@@ -704,11 +704,10 @@ static void DrawStationCoverageText(const AcceptedCargo accepts,
}
void DrawStationCoverageAreaText(int sx, int sy, uint mask, int rad) {
int x = _thd.pos.x;
int y = _thd.pos.y;
TileIndex tile = TileVirtXY(_thd.pos.x, _thd.pos.y);
AcceptedCargo accepts;
if (x != -1) {
GetAcceptanceAroundTiles(accepts, TileVirtXY(x, y), _thd.size.x / 16, _thd.size.y / 16 , rad);
if (tile < MapSize()) {
GetAcceptanceAroundTiles(accepts, tile, _thd.size.x / 16, _thd.size.y / 16 , rad);
DrawStationCoverageText(accepts, sx, sy, mask);
}
}