1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

Fix #14604: Clearing tiles to build objects did not update town ratings (#14616)

This commit is contained in:
Jonathan G Rennison
2025-09-27 18:11:42 +01:00
committed by GitHub
parent bfe5fb7339
commit 9307e1929e

View File

@@ -303,10 +303,10 @@ CommandCost CmdBuildObject(DoCommandFlags flags, TileIndex tile, ObjectType type
for (TileIndex t : ta) {
if (HasTileWaterGround(t)) {
if (!IsWaterTile(t)) {
Command<CMD_LANDSCAPE_CLEAR>::Do(DoCommandFlags{flags}.Reset(DoCommandFlag::NoWater).Set(DoCommandFlag::NoModifyTownRating), t);
Command<CMD_LANDSCAPE_CLEAR>::Do(DoCommandFlags{flags}.Reset(DoCommandFlag::NoWater), t);
}
} else {
Command<CMD_LANDSCAPE_CLEAR>::Do(flags | DoCommandFlag::NoModifyTownRating, t);
Command<CMD_LANDSCAPE_CLEAR>::Do(flags, t);
}
}
}