Changeset - r23468:75c935eb854b
[Not reviewed]
master
0 1 0
peter1138 - 5 years ago 2019-03-13 07:29:11
peter1138@openttd.org
Fix #7372: FindStationsAroundTiles() with caching returns no result for industry tiles.

Currently this can only be triggered by NewGRF house tiles querying for cargo acceptance history
of nearby stations (var 0x64) with a tile offset, and providing an offset that happens to point
to an industry tile. This serves no useful purpose.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -3829,7 +3829,7 @@ void FindStationsAroundTiles(const TileA
 
		/* Industries and towns maintain a list of nearby stations */
 
		if (IsTileType(location.tile, MP_INDUSTRY)) {
 
			/* Industry nearby stations are already filtered by catchment. */
 
			stations = &Industry::GetByTile(location.tile)->stations_near;
 
			*stations = Industry::GetByTile(location.tile)->stations_near;
 
			return;
 
		} else if (IsTileType(location.tile, MP_HOUSE)) {
 
			/* Town nearby stations need to be filtered per tile. */
0 comments (0 inline, 0 general)