From bd432258cbbf29a2d37154914aa2361bdc218fbb Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 6 Apr 2008 22:32:20 +0000 Subject: (svn r12596) -Feature: show what cargos a station could be supplied with. Patch by Roujin. --- src/station_cmd.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/station_cmd.cpp') diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index fad63166c..555689149 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -465,12 +465,13 @@ void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile, for (int yc = y1; yc != y2; yc++) { for (int xc = x1; xc != x2; xc++) { - if (!(IsInsideBS(xc, x, w) && IsInsideBS(yc, y, h))) { - TileIndex tile = TileXY(xc, yc); + TileIndex tile = TileXY(xc, yc); + if (!IsTileType(tile, MP_STATION)) { GetProducedCargoProc *gpc = _tile_type_procs[GetTileType(tile)]->get_produced_cargo_proc; if (gpc != NULL) { - CargoID cargos[2] = { CT_INVALID, CT_INVALID }; + CargoID cargos[256]; // Required for CBID_HOUSE_PRODUCE_CARGO. + memset(cargos, CT_INVALID, 256); gpc(tile, cargos); for (uint i = 0; i < lengthof(cargos); ++i) { -- cgit v1.2.3-54-g00ecf