mirror of https://github.com/OpenTTD/OpenTTD.git
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.
This commit is contained in:
parent
43ced57794
commit
6b92b83128
|
@ -3829,7 +3829,7 @@ void FindStationsAroundTiles(const TileArea &location, StationList *stations, bo
|
|||
/* 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. */
|
||||
|
|
Loading…
Reference in New Issue