Fix #9867: Industry::stations_near not filled at industry creation
This commit is contained in:

committed by
Michael Lutz

parent
ed0b0b80d3
commit
b3893878bb
@@ -1707,6 +1707,7 @@ static void PopulateStationsNearby(Industry *ind)
|
|||||||
|
|
||||||
ForAllStationsAroundTiles(ind->location, [ind](Station *st, TileIndex tile) {
|
ForAllStationsAroundTiles(ind->location, [ind](Station *st, TileIndex tile) {
|
||||||
if (!IsTileType(tile, MP_INDUSTRY) || GetIndustryIndex(tile) != ind->index) return false;
|
if (!IsTileType(tile, MP_INDUSTRY) || GetIndustryIndex(tile) != ind->index) return false;
|
||||||
|
ind->stations_near.insert(st);
|
||||||
st->AddIndustryToDeliver(ind, tile);
|
st->AddIndustryToDeliver(ind, tile);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user