summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-06 22:32:20 +0000
committerrubidium <rubidium@openttd.org>2008-04-06 22:32:20 +0000
commitbd432258cbbf29a2d37154914aa2361bdc218fbb (patch)
tree397ef733d88fb8d1a2ef21941b6a693ad03870e0 /src/station_cmd.cpp
parent949762fc65121d152d85f82902e2a67f95546db0 (diff)
downloadopenttd-bd432258cbbf29a2d37154914aa2361bdc218fbb.tar.xz
(svn r12596) -Feature: show what cargos a station could be supplied with. Patch by Roujin.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp7
1 files changed, 4 insertions, 3 deletions
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) {