diff options
author | dP <dp@dpointer.org> | 2020-05-12 02:21:14 +0300 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2020-05-13 08:43:01 +0100 |
commit | f2a9a1e2a5282d91760783bd04df3603badd2ba9 (patch) | |
tree | 202b462b0f617bf0b24995685547cb4671d00d88 /src/industry_cmd.cpp | |
parent | 7bd52970a1e83cb88069e73e26479eb71bd17726 (diff) | |
download | openttd-f2a9a1e2a5282d91760783bd04df3603badd2ba9.tar.xz |
Fix #8137: New clients can't join (desync) after funding an industry
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 39fc0d6f1..35def4609 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1697,9 +1697,11 @@ static void PopulateStationsNearby(Industry *ind) return; } - ForAllStationsAroundTiles(ind->location, [ind](Station *st) { + ForAllStationsAroundTiles(ind->location, [ind](Station *st, TileIndex tile) { + if (!IsTileType(tile, MP_INDUSTRY) || GetIndustryIndex(tile) != ind->index) return false; ind->stations_near.insert(st); st->AddIndustryToDeliver(ind); + return true; }); } |