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 dP
parent 64bcf034bd
commit a3f0cad534

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);
}
}
}