Fix building objects, trees and buoys on water/shore not clearing neighbour flooding states

This commit is contained in:
Jonathan G Rennison
2021-04-13 00:00:11 +01:00
parent 0422e2fe1e
commit 1a29a1ee74
5 changed files with 5 additions and 1 deletions

View File

@@ -115,6 +115,7 @@ void BuildObject(ObjectType type, TileIndex tile, CompanyID owner, Town *town, u
assert(o->town != nullptr);
TILE_AREA_LOOP(t, ta) {
if (IsWaterTile(t)) ClearNeighbourNonFloodingStates(t);
WaterClass wc = (IsWaterTile(t) ? GetWaterClass(t) : WATER_CLASS_INVALID);
/* Update company infrastructure counts for objects build on canals owned by nobody. */
if (wc == WATER_CLASS_CANAL && owner != OWNER_NONE && (IsTileOwner(tile, OWNER_NONE) || IsTileOwner(tile, OWNER_WATER))) {